Skip to content

server.json horseTownLimit: with false, ridden horses keep every gait in towns - #341

Closed
Kharote wants to merge 2 commits into
mainfrom
feat/horse-town-limit-switch
Closed

Kharote wants to merge 2 commits into
mainfrom
feat/horse-town-limit-switch

Conversation

@Kharote

@Kharote Kharote commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

The game keeps a ridden horse from galloping in towns (Trosky, Kuttenberg): horse.speedScale scales every gait but does not lift that, and player.setPace only limits. A server wants full speed in its towns.

The player's mode in a settlement switches the game's horse speed limiter on and off with one function (on adds the horseSpeedLimiter tag to the player, which keeps the ridden horse from galloping).

  • New server.json key horseTownLimit (KCDS_SERVER_HORSE_TOWN_LIMIT), default true (the game's behaviour). It travels in the world config's flags byte (new bit kWorldNoHorseTownLimit).
  • New riding/town_gait.{hpp,cpp}: with the key off, the game client turns every request to switch the limiter on into one to switch it off, so a limiter set before goes too.
  • Docs: server.json horseTownLimit KCDS-DOCS#96.

How it was tested

  • world_config_test: the flag goes through encode and decode with the other flags.
  • Kit, one game on trosecko with horseTownLimit off: a horse mounted in Troskovice and ridden; the client logged the game switching the limiter on in the town (RIDING horse speed limiter on asked: lifted) and off again later. A scripted ride cannot ask for a gallop (the rider's speed input is not the player input the test drives), so the gallop itself was not seen.

Checklist

  • I read CONTRIBUTING.md and agree that my contribution is licensed as it says.
  • The change is my own work: no code, assets or dumps that are not mine or that come from the game.
  • python Dev/tools/format_source.py --check passes.
  • Tests cover the change, and the checks of this pull request pass.
  • Public behaviour that changed is documented (KCD-Synced/KCDS-DOCS) or needs no docs.

@Kharote
Kharote marked this pull request as ready for review November 24, 2026 13:00
@Kharote Kharote mentioned this pull request Nov 24, 2026
5 tasks done
@Kharote

Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Shipped in 1.2.1 (#349, release v1.2.1).

@Kharote Kharote closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant