KCDS 1.0.9
KCDS 1.0.9
New in the SDK
- Weapons (client, new): the local player's weapon sets and torch, through the game's own actions and animations.
- Weapons.state(): { slot, hasWeapon, drawn, allowed, torch, busy } for the selected set (0 to 3) and the torch in the left hand; null outside the world.
- Weapons.select(slot): selects a set without drawing it, as the game's quick access does.
- Weapons.draw(), Weapons.holster(), Weapons.toggle(): draw or put away the selected set with the game's animation, as the game's draw key does.
- Weapons.drawTorch(), Weapons.holsterTorch(), Weapons.toggleTorch(): a torch from the inventory into the left hand and back, whatever the weapon set does.
- Every call returns null once started, or why not: 'notInWorld', 'unavailable', 'noWeapon', 'alreadyDrawn', 'notAllowed' (no such set for what the player wears), 'locked' (cuffed or frozen), 'busy' or 'refused'.
- New client event weaponActionEnded(action, ok, reason): 'draw', 'holster', 'torchDraw' or 'torchHolster' ran to its end, was 'interrupted' by the game, or was 'refused' (a torch call without a torch).
- The game's own B key (draw/holster) now also works with a tap in a KCDS world, not only when held.
- Inventory.use(row) and Inventory.useState(row) (client, new): use an inventory row's item as the game does, for a hotbar of your own.
- Food and potions are eaten or drunk as the food quick slot does it: the server decides as for all eating (playerConsuming), then the game's own use runs.
- Documents open in the game's reading screen.
- useState returns { available, enabled, reason, label }: whether the item has an action, whether it can run now, the game's text key of why not (such as 'cant_use_in_combat') and the action's text key (such as 'ui_invhint_read').
- New client event itemUseEnded(row, used, reason): whether the game used the item, else the game's reason such as 'you_are_full' or 'you_cant_eat_raw', or 'refused', 'noItem', 'failed'.
- Controls.setCursor(style) (client, new): the pointer while your resource shows it with Controls.showCursor, for a wheel menu or a page of your own.
- null: the game's own pointer, as before.
- 'hidden': no pointer is drawn, the mouse stays free and Controls.cursorPosition keeps reporting, so you draw your own.
- { image, hotspot }: a picture your resource ships (.png, .bmp, .gif, .jpg or .ico, at most 256 x 256 pixels and 32 KB), its hotspot { x, y } in pixels from the top left.
- The resource that last showed the pointer decides. The game's own screens and a focused web view keep the game's pointer, and a stopped resource gives its style back.
- CharacterCreator: more control over the stage.
- New CharacterCreator.turn(degrees): turns only the figure about its feet, for a drag in your own page.
- New CharacterCreator.orbit(degrees): moves the camera around the still figure, keeping the framing.
- New CharacterCreator.previewClothes(items): dresses the figure in clothing and armour by class name or GUID for an outfit chooser, without giving the player anything; [] or null takes the preview off.
- CharacterCreator.open: new options for a keyboard-driven creator and a bare stage (no gilded framework or panels).
- Vendors: shelves up to 5000 rows.
- New server.json key "vendorShelfLimit" (env KCDS_VENDOR_SHELF_LIMIT): the most rows Vendor.setShelf and Vendor.setOffers take, 128 by default, up to 5000 (above 128 is marked experimental).
- Large shop and inventory screens are now sent in parts (a new control message that is split and joined again), so a tailor with 500 or more items opens.
- Player.setLantern: the game's own lamp hold, as its NPCs carry a lamp at night.
- In the left hand the arm is bent and the lamp is held out from the body, for men and women, walking and running.
- The lamp hangs upright from its handle.
- On a horse it goes to the free right hand (the left holds the reins) and comes back to the chosen hand on foot.
- Player.lantern reads { model, hand } as chosen.
- Crafting.defineWorkpiece: takes a character model only (.cdf / .chr), as the anvil needs. A static .cgf crashed the game when a smith took it in the tongs. The helm-smithing example now forges a real helmet from a flat sheet, with the hammer's deformation and the heat glow.
- Follow: the docs now say it works on horseback; start it once the player sits in the saddle (mountChanged ends a follow).
Server
- The server console now says every 30 minutes when a newer KCDS release is out: "KCDS x.y.z is out; this server runs a.b.c. Update the server: ...". The advice fits the server: KCDS-Admin's Update or the new package on a Linux server package, pulling the new image in Docker, or the new server package elsewhere. Console only; players are not told.
- Fast travel works on servers with the movement check: a step along the travel's way no longer counts as speeding and the player is no longer put back to where the travel began.
Fixes
- Frame generation (OptiScaler with XeFG or FSR-FG): OptiScaler no longer takes the game for quitting a few seconds after the start. That switched its frame generation off (no extra frames in KCDS) and crashed the main menu in OptiScaler's dxgi.dll (0xc0000005) or libxess_fg.dll.
- KCDS's loading screen made a swap chain of its own. OptiScaler took it for the game's, put its menu on it, and when the loading screen closed believed the game was quitting.
- The loading screen now draws without a swap chain.
- The overlay's own probe now uses Windows' DXGI.
- The overlay lets go of its back buffers whenever the game's window resizes, including through a frame generation layer.
- Women: the inventory figure now shows clothes worn before the inventory was first opened (a cotehardie and every other piece). Before, they appeared only after being taken off and put on again.
- Fog by day no longer glares white like a flashbang: World.setFog keeps the weather's own exposure and bloom.
- Snow no longer vanishes next to houses and a chicken coop in Trosecko's villages: roofs keep their snow next to the camera, and the bare-roof box covers one building.
- A crash at WHGame+0x18646df is gone: KCDS switched an AI camera option every 3 seconds, and now writes it once.
- NPCs no longer jump to the end of their walk when the camera turns away. Only distance (60 m) decides when a stuck walker may be moved.
- An added level's people (such as KCD1 map people) walk their rounds with levelPeople on, instead of crashing the server's script runtime.
- Inventory.set with an empty quickslot now empties the game's own slot, so a weapon moved out of a resource's hotbar can no longer be drawn with the game's key.
- The game's random events (a man by the road, a riddler, an ambush, a crier) no longer spawn in a server's world. Each player saw their own, and fast travel stopped at them.