KCDS 1.1.0

KCDS 1.1.0

New in the SDK

  • Carts: hint texts of your own.
    • Cart.setDefaultHints({ drive, letGo, getOn, search }) (server, new): the texts of the hints every cart shows, now and for carts spawned later: drive (on its horses, to take the reins), letGo (to let them go), getOn (on its body, to take a free passenger seat) and search (on its body with U, to open its storage). Each is a text of 1 to 64 characters, or null to hide that hint; one left out keeps what it had. Use it for your server's own language.
    • cart.setHints({ drive, letGo, getOn, search }) (server, new): the same for one cart, over the defaults.
    • World.addInteraction({ entity: cart, ... }) (server): a script's own hint on the cart's body, shown beside the cart's own. With a cart hint hidden (null), your hint can take its place.
  • Carts: the storage is reachable.
    • cart.addStorage(): players now open the cart's storage with the Search hint (U) on the cart's body. Before, its container stood where the cart was spawned, inside the body, and never moved with the cart, so nobody could reach it. storage.open(player) opens it for a player in reach of the cart.
  • Carts: boarding.
    • cart.boardMode (server, new; also Cart.spawn(..., { boardMode })): 'teleport' (the default) puts the player at the seat's climb start at once, turned to the seat, and the game's climb onto the seat plays; 'walk' has their game walk them round the cart to that start first, and on the way their use key or a movement key calls the boarding off.
    • cart.entranceOnly (server, new; also Cart.spawn(..., { entranceOnly })): true (the default) shows Get on only to a player within about 2 m of where a free seat's climb starts (the back for the benches, the front's sides for the front seats), so nobody climbs on from the cart's side. false offers it to anyone at the cart's body, from any side.
    • Get on takes the free seat whose entrance is nearest the player.
    • The server's movement check lets the jump to a seat's climb start pass: boarding by teleport no longer counts as an impossible step, and a player who got on and off a few times is no longer put back in the middle of their climb.
  • Carts: props riding on a cart.
    • cart.attachProp({ model, position, rotation, scale }) (server, new): a prop on the cart that rides with it, such as logs or sacks on its bed. position and rotation are an offset from the cart's root (its middle on the ground), up to 5 m. It has no physics, so it never holds the cart back, and it goes when the cart goes.
  • Carts: leading on foot is archived.
    • The driver of cart_b and of the c wagons walked beside the horses with the reins in hand (the Lead hint). Their horses now offer no hint, and the driver seat of those blueprints is refused, to players and to cart.seatPlayer (returns false).
    • Cart.driverWalks keeps working but is deprecated since 1.1.0 and left out of the TypeScript declarations.
    • For a horse that walks after a player, use Horse.follow(player, { rope: true }).
  • Trees: felling for gamemodes.
    • A lying trunk is hit along its whole length. The game's own collision of a tree covers only the foot of its trunk, so before, blows further along a felled trunk met nothing and only blows at the stump counted. An invisible beam of the trunk's thickness now lies along it until it is cut or grows back.
    • tree.cut(player?) (server, new): cuts a lying trunk at once, as its last blow would (event playerTrunkCut, the wood drops to the player or onto the ground), for chopping of your own.
    • Trees.configure({ axeWear }) (server, new key): the share of the axe's condition one counted blow costs, 0 for none, instead of the game's own wear; null, the default, keeps the game's wear.
  • World: the level's own items are off by default.
    • The items the single-player level places to pick up (tankards, tools, shop goods) are now off unless the server turns them on: every game hides them, players who join later too, and no pick-up is granted. Before, players took the single-player loot for free.
    • Turn them on with World.setLevelItemsEnabled(true) (server) or { "enabled": true } in level-items.json.
  • Web views: a focused view shows the pointer its page asks for (CSS cursor, such as cursor: none or cursor: url(...)), instead of always the game's pointer.

Carts in the game

  • A seated rider hangs from the cart's entity, as the game's own wagon riders do: they move with the cart in the same update, in every game. Riders no longer lag behind a driving cart, shake, or hang beside or above their seat (also after a bridge).
  • Getting on: the climb starts exactly at the seat's climb start (also from far away and from an open wagon), the view turns to the seat's way at once, and the sitting pose follows the climb straight away, with no standing up in between, on every screen.
  • Getting on again a few seconds after getting off now sits the player down properly (an old timer had stood them up on the cart, free to walk around).
  • Getting off keeps the game's own view, as without KCDS: the view no longer locks onto the sky or the feet.
  • Nobody jumps while on a cart. Boarding can be called off while walking to the seat.
  • A cart drives over bridges (their decks carry it) and stands on what the level has, not on invisible objects KCDS placed (such as the beam along a felled trunk).
  • Horses in harness stand still when the cart stands, without stepping in place.
  • The photo mode (F1) on a cart: the cart takes none of the player's keys while it is open and lets the driving keys go; the photo camera moves freely.

Replicas (what other players see of a player)

  • Smithing: a workpiece a resource defined with Crafting.defineWorkpiece shows on the other screens, and a smith holds the hammer on every screen instead of their drawn sword.
  • A sword in its scabbard, a quiver and its arrows show on other players. A weapon the owner took off leaves their weapon set and hand.
  • Bow: the arrow drawn from the quiver shows in the hand while it is drawn.
  • A fall that knocks the player out no longer leaves the game's black knock-out screen.

HUD

  • Hud.setCharacterStats: a server's own stats in the inventory's character panel (such as hunger and thirst of a needs resource) now show their new values at once while the inventory is open. Before, the panel showed them only after the inventory was closed and opened again.

Snow

  • The bare ground under a roof stays put: it no longer flickers or jumps between buildings as you walk up to a barn, a coop or through a passage.

Inventory

  • An item the game draws nothing for on the ground (water, oil, wine, spirits) can no longer be dropped: the units stayed lost before. A script's ground item of one throws as before.

Server performance

  • The replication and transport keep their per-entity and per-channel tables flat (entity baselines, the tables a snapshot build consults, channel states), and a snapshot build reuses its lists per thread instead of growing them for every client. What the server sends is unchanged, byte for byte.
  • A new test tool, tool_integration_server_digest, hashes everything the server sends in a fixed, seeded session, to prove an optimisation leaves the game's messages as they were.
  • The load tests of this version are on the website's performance page: https://kcdsynced.com/performance

Crash fixes

  • The inventory opening while a server took the player's horse away no longer crashes the game.
  • Recipe and workpiece table patches load one after another (several at once broke the game's memory a moment after joining).
  • A workpiece whose model is not a character (or did not load) no longer crashes the game in the tongs.
  • A photo mode left open when leaving a world no longer crashes the next world's loading.

Releases

  • Every release now publishes its antivirus scan: the release workflow scans every download and the programs inside it on VirusTotal, the result goes out with the release as KCDS-VirusTotal-<version>.json, and these notes list each file with its VirusTotal report. The download page shows the result for every file.
  • The release signing action has no known vulnerable dependency any more (undici updated; it finds its files with Node's own glob instead of a package with vulnerabilities).