
Mods / Jaunt: Entity Movement System
Authors: safwyl, sekelsta, Freakyuser396, Shintharo12
Side: Both
Created: Jun 8th at 4:11 AM
Last modified: 4 days ago
Downloads: 4444
Follow Unfollow 136
Recommended download (for Vintage Story 1.20.11 - 1.20.12):
jaunt_1.1.6.zip
1-click install
This mod does nothing useful on its own. Install if another mod requires it.
Jaunt is a library mod to extend entities with rideable behaviors. It provides an extended gait (movement pacing) system allowing for multiple forward gaits plus idle and backwards movement; as well as a stamina behavior for entities.
While Jaunt itself is a code mod it is designed to be fully implemented and configured through entity json files and does not require content mods to be converted to code mods to utilize it. Just add Jaunt to your mod's dependencies and follow the guide below on "Entity Json Implementation"
Gaits and rideable are independent behaviors but using jaunt:rideable requires jaunt:gait also be configured or it will fail to initialize.
When an entity uses both behaviors it allows the rider to cycle through available gaits according to the order specified in the rideableGaitOrder array in jaunt:rideable's behaviorConfig.
For more information on configuring available gaits see the Entity Json Implementation section below.
Below is an example setup utilized by Equus: Wild Horses that implements four forward gaits.
- Walkback (Backward)
- Idle (Stationary)
- Walk (Forward Speed 1 - Slowest)
- Trot (Forward Speed 2)
- Canter (Forward Speed 3)
- Gallop (Forward Speed 4 - Fastest)
They are progressive in that you must move through each gait to get to the next, cycling gait up is done via the Sprint Key (see controls section for more details). Cycling down can be done with the S key or by releasing the forward key when using the snaffle bit.
The gaits are indicated on the HUD with icons which can be supplied by the mod (see Entity Json Implementation for more details). Jaunt also provides the default icons used in Equus: Wild Horses which can be referenced by your mod.
When an entity uses the jaunt:stamina behavior it will be given an additional stat - "stamina" (go figure). This stat behaves much like you'd probably expect with certain actions causing stamina drain (fatigue) and when these actions are not being performed it will naturally regenerate.
- Drain/Regen rates are fully configurable in entity json behaviorConfigs, as well as values for maximum stamina, penalties for wounded or mounted animals, as well an exhaustion threshold and the option to cancel fleeingEntity behaviors when below the exhaustion threshold (allowing players to run down animals they might not otherwise be able to).
- Stamina draining activites include swimming and fleeing, and can be added to any gait in the gait config. Stamina is regenerated when not in any of those situations, regen penalties (if configured) are applied if the horse is mounted or injured (below 70% health).
- When a entity's stamina is below 50% there is a gait shift down chance that is quadratically proportional (chance increases more dramatically as the stamina decreases) to the stamina percentage below 50%. (i.e. At 50% stamina, 0% chance; at 0% stamina, 100% chance; moving along a quadratic curve)
- If the gait shift down chance is triggered the entity will reduce to a their moderateStamina state if remaining stamina is greater than 10%, or to their lowStaminaState if below 10%. These states are configured in the rideable behaviorConfigs section.
- If stamina fully drains while swimming, nothing will occur (don't worry about the entity drowning) but it signficantly reduces their ability to move quickly upon exiting the water.
With the addition of the Gait System and Stamina Behavior for entities you'll find that when mounted there are two additional HUD items visible.
Gait Indicator: This icon is a dynamic image that changes with your mount's gait to help give a visual indicator of the current gait. Custom icons are can be supplied through the entity json.
Stamina Bar: The stamina bar shows your horse's current stamina level, if the stamina level drops below 30% the bar will flash
The placement for the gait indicator and stamina bar are fully configurable from the mod config file but apply to all mods using the jaunt library.
StaminaBarLocation can be any of the following:
- "AboveHealth"
- "AboveHunger"
- "AboveTemporal"
StaminaBarOffsets are then applied as x/y values from that location.
Please be aware other mods may share this location and offsets may need to be applied when working with mods such as Hydrate or Diedrate or Rustbound Magic.
Default Locations:
Snaffle Bit:
W: Hold to move forward, release to stop
A/D: Left/Right
S: Press without releasing W to decrease gait -OR- from idle walk back
Sprint Key (Default Ctrl): Increase gait, when galloping this key will also swap back and forth between canter and gallop
Curb Bit:
W: Press to move forward
A/D: Left/Right
S: Decrease gait -OR- from idle walk back
Sprint Key (Default Ctrl): Increase gait, when galloping this key will also swap back and forth between canter and gallop
Jaunt includes a mod config with options for hud placement (typically to be exercised by players for compatibility with other mods' hud items) as well as default values for most configurable options. Keep in mind any changes here apply to all mods utilizing Jaunt so modifying the entity json is the preferred method for implementing stamina and gait values.
GlobalDebugMode enables a lot of logging statements around gait changes, for performance reasons keep this disabled during normal play.
Default Config
{
"GlobalMaxStaminaMultiplier": 1.0,
"GlobalStaminaRegenMultiplier": 1.0,
"GlobalSwimStaminaCostMultiplier": 1.0,
"GlobalSprintStaminaCostMultiplier": 1.0,
"EnableStamina": true,
"HideStaminaOnFull": false,
"StaminaBarLocation": "AboveHealth",
"StaminaBarWidthMultiplier": 1.0,
"StaminaBarXOffset": 0.0,
"StaminaBarYOffset": 0.0,
"ShowGaitIcon": true,
"IconOffsetX": -400.0,
"IconOffsetY": -99.0,
"IconSize": 42.0,
"DefaultMaxStamina": 100.0,
"DefaultSprintFatigue": 0.2,
"DefaultSwimFatigue": 0.2,
"DefaultBaseFatigueRate": 1.0,
"DefaultStaminaRegenRate": 1.0,
"DefaultRegenPenaltyWounded": 0.5,
"DefaultRegenPenaltyMounted": 0.3,
"GlobalDebugMode": false
}
All configuration is done similarly to vanilla behaviors, by adding them to the entity json file. To implement these behaviors you will need to add them to the client and server behavior lists and the appropriate configuration options in the behaviorConfigs dict. For reference below is the wildhorse.json entity file from Equus which implements both behaviors.
idleGait - The default idle gait for this entity
gaits - List of all available gaits for this entity, order is not important
code - unique code for this gait
moveSpeed - movement speed for this gait
backwards - boolean for if this gait should move backwards
turnRadius - turning radius for this gait
staminaCost - stamina cost for this gait
fallbackGaitCode - fallback gait code for this gait, utilized by stamina system for slowing down when tired
sound - sound that should play while this gait is active
iconTexture - icon svg file to display in the HUD for this gait
"jaunt:gait": {
"idleGait": "idle",
"gaits": [
{
"code": "walkback",
"movespeedByType": {
"*-ferus": 0.013
},
"backwards": true,
"turnRadius": 3.5,
"staminaCost": 0.0,
"sound": "game:creature/hooved/trot",
"iconTexture": "equus:hud/walkback"
},
{
"code": "idle",
"turnRadius": 4,
"iconTexture": "equus:hud/idle"
},
{
"code": "walk",
"movespeedByType": {
"*-ferus": 0.013
},
"turnRadius": 3.5,
"staminaCost": 0.0,
"sound": "game:creature/hooved/trot",
"iconTexture": "equus:hud/walk"
},
{
"code": "trot",
"movespeedByType": {
"*-ferus": 0.036
},
"turnRadius": 3,
"staminaCost": 0.0,
"fallbackGaitCode": "walk",
"sound": "game:creature/hooved/trot",
"iconTexture": "equus:hud/trot"
},
{
"code": "canter",
"movespeedByType": {
"*-ferus": 0.08475
},
"turnRadius": 2,
"staminaCost": 0.0,
"fallbackGaitCode": "trot",
"sound": "game:creature/hooved/trot",
"iconTexture": "equus:hud/trot"
},
{
"code": "gallop",
"movespeedByType": {
"*-ferus": 0.16
},
"turnRadius": 1.5,
"staminaCost": 0.2,
"fallbackGaitCode": "canter",
"sound": "game:creature/hooved/gallop",
"iconTexture": "equus:hud/gallop"
},
{
"code": "jump",
"movespeedByType": {
"*-ferus": 0.013
},
"turnRadius": 3.5
},
{
"code": "swim",
"movespeedByType": {
"*-ferus": 0.02
},
"turnRadius": 3.5
}
]
}
maxStamina - The entity's maximum stamina value
sprintFatigue - Fatigue rate applied when the animal is sprinting (separate from the gait fatigue rates specified in each gait). Currently applies when fleeEntityTaskAi is active.
swimFatigue - Fatigue rate applied when the animal is swimming
baseFatigueRate - A multiplier for all fatiguing actions
staminaRegenRate - A multiplier for stamina regen
dontFleeWhenExhausted - Prevents the fleeEntityTaskAi from starting when the entity is below the exhaustionThreshold
regenPenaltyWounded - Penalty reduction from the staminaRegenRate for entities with health below 70%
regenPenaltyMounted - Penalty reduction from the staminaRegenRate for entities while mounted.
exhaustionThreshold - The stamina threshold percentage (0.1 = 10%) at which exhaustion is toggled. Currently used for fleeEntityTask overrides.
"jaunt:stamina": {
"maxStamina": 100,
"sprintFatigue": 0.2,
"swimFatigue": 0.2,
"baseFatigueRate": 1,
"staminaRegenRate": 1,
"dontFleeWhenExhausted": true,
"regenPenaltyWounded": 0.5,
"regenPenaltyMounted": 0.3,
"exhaustionThreshold": 0.1
},
behaviorConfigs > jaunt:rideable
The rideable config options are very similar to the vanilla setup, with a few added items.
rideableGaitOrder - Ordered array of gaits to be used for riding, should always be ordered from most negative (backwards) to most positive movement speed.
controls - The rideable controls dict supports adding any of the available gaits as an additional control, with some extra configuration items for how to pass that information into the gate and stamina systems.
moveSpeedMultiplier - float value that applies a multiplier to the gait's movespeed
moveSpeed - override option for raw movespeed, overrides the gait's movespeed. Setting this will ignore movespeeds specified per gait and movespeedmultipliers set here
"jaunt:rideable": {
"interactMountAnySeat": true,
"seats": [
{ "apName": "Rider", "selectionBox": "MidAP", "bodyYawLimit": 0.2, "controllable": true,
"mountOffsetByType": { "*adult-*-ferus": { "x":-0.1,"y":-0.4,"z":0},
"*": { "x":0,"y":-0.5,"z":0} } }
],
"rideableGaitOrder": ["walkback", "idle", "walk", "trot", "canter", "gallop"],
"controls": {
"idle": {
"weight": 1,
"riderAnim": {
"animation": "rideelk-idle",
"animationSpeed": 1,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"swim": {
"moveSpeedMultiplier": 1,
"animation": "Swim",
"animationSpeed": 1,
"weight": 10,
"blendMode": "Average",
"riderAnim": {
"animation": "rideelk-walk",
"animationSpeed": 1,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"walk": {
"moveSpeedMultiplier": 1,
"animation": "Walk",
"weight": 10,
"animationSpeedByType": {
"*-ferus": 1.125,
"*": 1.125
},
"blendMode": "Average",
"riderAnim": {
"animation": "rideelk-walk",
"animationSpeed": 1,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"trot": {
"moveSpeedMultiplier": 0.98,
"animation": "Trot",
"weight": 10,
"animationSpeedByType": {
"*-ferus": 2.5,
"*": 2.5
},
"blendMode": "Average",
"riderAnim": {
"animation": "rideelk-walk",
"animationSpeed": 1,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"walkback": {
"moveSpeedMultiplier": 1,
"animation": "walkback",
"weight": 10,
"animationSpeedByType": {
"*-ferus": 1.125,
"*": 1.125
},
"easeInSpeed": 1,
"easeOutSpeed": 3,
"blendMode": "Average",
"riderAnim": {
"animation": "rideelk-walk",
"animationSpeed": 1,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"canter": {
"moveSpeedMultiplier": 0.85,
"animation": "Canter",
"weight": 10,
"animationSpeedByType": {
"*-ferus": 2.2,
"*": 2.2
},
"blendMode": "Average",
"riderAnim": {
"animation": "rideelk-run",
"animationSpeed": 1,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"gallop": {
"moveSpeedMultiplier": 0.75,
"animation": "Gallop",
"easeOutSpeed": 4,
"weight": 10,
"animationSpeedByType": {
"*-ferus": 3.1,
"*": 3
},
"blendMode": "Average",
"riderAnim": {
"animation": "rideelk-run",
"animationSpeed": 2,
"weight": 1,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 80,
"UpperTorso": 80,
"UpperFootR": 80,
"UpperFootL": 80,
"LowerFootR": 80,
"LowerFootL": 80
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
},
"jump": {
"moveSpeedMultiplier": 1,
"animation": "Jump",
"weight": 100,
"blendMode": "Average",
"animationSpeed": 1.4,
"easeOutSpeed": 40,
"easeInSpeed": 40,
"riderAnim": {
"animation": "rideelk-jump",
"animationSpeed": 1,
"weight": 10,
"withFpVariant": true,
"blendMode": "Average",
"elementWeight": {
"LowerTorso": 160,
"UpperTorso": 160,
"UpperFootR": 160,
"UpperFootL": 160,
"LowerFootR": 160,
"LowerFootL": 160
},
"elementBlendMode": {
"LowerTorso": "Average",
"UpperTorso": "Average",
"UpperFootR": "Average",
"UpperFootL": "Average",
"LowerFootR": "Average",
"LowerFootL": "Average"
}
}
}
}
}
Mod Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
1.1.6 | 1024 | 4 days ago | jaunt_1.1.6.zip | 1-click install | ||
| ||||||
1.1.5 | 2497 | Jun 21st at 2:33 AM | jaunt_1.1.5.zip | 1-click install | ||
| ||||||
1.1.4 | 387 | Jun 19th at 9:11 PM | jaunt_1.1.4.zip | 1-click install | ||
| ||||||
1.1.2 | 13 | Jun 19th at 8:19 PM | jaunt_1.1.2.zip | 1-click install | ||
| ||||||
1.1.0 | 168 | Jun 15th at 5:31 PM | jaunt_1.1.0.zip | 1-click install | ||
| ||||||
1.0.0-pre.7 | 276 | Jun 8th at 6:18 PM | jaunt_1.0.0-pre.7.zip | 1-click install | ||
| ||||||
1.0.0-pre.6 | 79 | Jun 8th at 4:24 AM | jaunt_1.0.0-pre.6.zip | 1-click install | ||
|
safwyl seems to be fine. Can't say I tested it thoroughly, though
stormtrooper_34 should be fixed in 1.1.6, let me know if you still experience issues
stormtrooper_34 thank you for this detailed bug report, working on a fix now. Looks like mount sounds weren't getting properly disposed when changing.
UPD: NOT THIS MOD'S FAULT, IT WAS CARTWRIGHTS CARAVAN. It messed up elk's sound
UPD2: No, problem persists. Without Cartwright's Caravan sounds of riding are back, but after some time (usually, mounted combat) all sounds are gone and it happends only on horse
After some more testing, it seems that aggressive combat with lots of manuvering and speed switching or getting attacked while riding causes that. I couldn't recreate bug in creative, but fully generated surivival world did the trick
It seems, jaunt crashes OpenAL and makes game completely mute
At first it produces them "properly", but with no actual sound played in game:
4.7.2025 16:23:49 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:23:51 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:23:52 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:23:53 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:23:53 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:23:54 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:23:55 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
But after some time OpenAL fails due to overloaded sound schedule and stops producing any sounds at all:
4.7.2025 16:29:04 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:29:05 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:29:06 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:29:09 [Notification] Play sound game:sounds/environment/mediumsplash skipped because max concurrent sounds of 250 reached (1 more skipped)
4.7.2025 16:29:09 [Notification] [jaunt] Side: Server, Meta: walk
4.7.2025 16:29:09 [Notification] [jaunt] Now playing sound: game:sounds/creature/hooved/trot
4.7.2025 16:29:09 [Notification] [jaunt] Side: Client, Meta: walk
4.7.2025 16:29:11 [Notification] [jaunt] Side: Server, Meta: trot
4.7.2025 16:29:11 [Notification] [jaunt] Side: Client, Meta: trot
4.7.2025 16:29:11 [Error] Could not load sound game:sounds/creature/hooved/trot.ogg
4.7.2025 16:29:11 [Error] Exception: Unable to get sourceId
at Vintagestory.Client.LoadedSoundNative.createSoundSource() in VintagestoryLib\Client\ClientPlatform\ClientNative\LoadedSound.cs:line 332
4.7.2025 16:29:11 [Warning] OpenAL Error during construction of sound game:sounds/creature/hooved/trot.ogg: OutOfMemory
It may be some sort of incomatibility with other mods or something, but I have no clue what could cause it
Is there a way to make gait controls use double press W/S ? I use normal sprint on foot but im kinda used to double pressing W and S from Mount&Blade: Bannerlord. Otherwhise cool mod, thank you a lot for this system ! :)
Jonizhere ah i found the issue, right now you have to check "Mouse click modifiers locked to Sneak/Sprint keys" in order for the remap to work. I'll see if I can fix that for the next release though
safwyl That's interesting! I've switched my sprint and sneak keys, but it didn't transfer while riding an elk.
It only worked when I've switched the keys back to their default settings.
Jonizhere at the moment it should respect rebinds for Shift/Ctrl and movement keys. But there's no way to split them from Seraph movement controls.
What were you wanting to change exactly?
Is it possible to change controls? The option doesn't appear to pop up.
Silverfang same here for now, I'm not currently modifying the vanilla jump behavior
How does jumping work with this? I know Feverstone Wilds' horses could not jump over fences due to some vanilla coding.
Would it be possible to add stamina scaling by generation? So that higher generation animals can have higher max stamina/stamina regen?
amazing! 😲.