Skip to main content

Mounts

Mounts are rideable NPC entities that players can summon and ride.

Version: 1.3.0

How It Works

  1. Summon: Right-click a Mount Horn item
  2. Spawn: Mount NPC spawns instantly near the player (no cast time)
  3. Mount: Player is automatically placed on the mount
  4. Ride: WASD controls movement, mount position syncs for all players
  5. Dismount: Press F to dismount — mount NPC despawns after 500ms

Summoning is instant — there is no cast animation or cast time.

Drop Guard

If a player drops their Mount Horn while riding, the mount is automatically dismissed. This prevents orphaned mount NPCs if the summoning item is lost.

Multiplayer Sync

The mount system uses Hytale's native setMountEntityId() to link the player to the mount NPC. This ensures:

  • Position Sync: Mount position is automatically synced for all players by the engine
  • Animation Sync: An ECS ticking system copies movement states to the mount NPC, playing Walk/Run/Idle animations visible to all players
  • Dismount Sync: Native NPCMountSystems handles dismount broadcasting

Mount Types

TypeNPC RoleDescription
walkKS_Mount_Walk_RoleGround mount -- walk and run
flyKS_Mount_Fly_RoleWalk + Fly MotionController (flying is WIP)
swimKS_Mount_Swim_RoleSwim MotionController (WIP)

Mount Configuration

In the pet type JSON under mountConfig:

{
"mountConfig": {
"mountType": "walk",
"mountYOffset": 1.8,
"speed": 1.4,
"baseHealth": 80
}
}
FieldDescription
mountType"walk" or "fly" — determines which NPC role is used
mountYOffsetHow high above the mount the rider sits (in blocks)
speedSpeed multiplier for the mount
baseHealthMount NPC health

All Mounts

Uncommon

MountSpeedY-OffsetHealthEntity
Horse1.41.880Horse
Camel1.32.7100Camel
Wolf1.41.250Wolf_Black

Rare

MountSpeedY-OffsetHealthEntity
Moose1.32.5120Moose_Bull
Bison1.12.2150Bison
Polar Bear1.02.0100Bear_Polar

Epic

MountSpeedY-OffsetHealthEntity
Cave Rex1.53.5150Rex_Cave
Sabertooth1.61.8100Tiger_Sabertooth

Legendary

MountSpeedY-OffsetHealthEntity
Dragon1.85.2200Dragon_Frost

Mount Horns

Mount Horns are tradeable summoning items:

  • Item ID: Configured per mount type (e.g., Mount_Horn_Horse)
  • Metadata: BsonDocument with mount instance data
  • Right-click: Summon mount instantly or dismount if already riding
  • Data Sync: Mount stats are synced back to the horn on dismount

Mount Lifecycle

EventWhat Happens
SummonNPC spawned instantly with Interactable + NPCMountComponent
MountMountNPC packet sent, setMountEntityId set, MovementStates.mounting = true
RideECS system syncs animations, engine syncs position
Dismount (F key)Native system handles player state, entity removed after 500ms
Drop HornAuto-dismount triggered, mount NPC cleaned up
DeathMountSystem (DeathSystems.OnDeathSystem) auto-dismounts
DisconnectonPlayerDisconnect dismounts and cleans up
Server StartforceRemoveAllKSRoleNpcs() removes leftover mounts
Server StopSame cleanup via CountDownLatch on all worlds

Mount Controls

KeyAction
WASDMove the mount
FDismount
ShiftSprint (if mount supports it)

Mount UI

Access via /kspet mount or /kspet mounts:

  • Current Mount section with dismount button
  • Available Mounts grid with mount button per slot
  • Pagination when more than 3 mounts available
warning

Mount entities are cleaned up on server start/stop. If the server crashes while mounts are active, the NPCs may persist as "world NPCs" until the next clean start.