SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

Stamina Mod

TBy traugdor

Adds stamina to animals. Exhaustion slows them. Tired predators give up the chase.

Description

<h1>Stamina Mod</h1> <p>Ever been chased by a bear for 2,500 blocks in a dead-straight line because the game's AI never gets tired? This mod fixes that &mdash; and then compensates for it, so wildlife isn't just nerfed into pushovers.</p> <h2>The Problem</h2> <p>Vanilla predators will pursue a target forever with zero cost. Prey will flee forever too. And everything &mdash; predator or prey &mdash; moves unrealistically fast in water. Meanwhile, *you* burn hunger the whole time you're sprinting. Animals had no equivalent limiter. Now they do.</p> <h3>Features</h3> <p><strong>Core stamina system</strong><br />- Every wild animal (wolf, bear, hyena, fox, raccoon, deer, elk, gazelle, goat, moose, pig, sheep, hare &mdash; adults and babies) gets a stamina pool, sized roughly by body weight. A moose can run longer than a hare.<br />- Sprinting, fleeing, and swimming drain stamina. Casual wandering and foraging don't.<br />- As stamina drops, movement speed is throttled &mdash; animals don't just stop, they visibly tire out.<br />- Once stamina bottoms out, a chasing predator gives up and breaks off the pursuit &mdash; unless it's actively defending itself from an attack, in which case it'll still fight back even while exhausted.<br />- Prey do the same in reverse: a critically gassed animal won't start a fresh panic-flee. An emergency "cornered" escape response still works regardless of stamina, since that's a reflex, not a choice.<br />- Stamina regenerates automatically once an animal stops exerting itself.</p> <p><strong>Balance compensation</strong><br />- <strong>Predators hit harder.</strong> Any AI-controlled attacker with a stamina pool deals bonus melee damage, offsetting the fact that it can't just run you down forever anymore.<br />- <strong>Predator haste.</strong> Wolves, bears, hyenas, foxes, and raccoons are actually *faster than vanilla* while their stamina is above 80% &mdash; they only settle into normal speed once they've been working for it, then throttle down further as they tire.</p> <p><strong>Deer panic mode</strong><br />- An injured deer gets a one-time adrenaline speed burst that overrides the normal fatigue throttle for a few seconds. It only triggers while hurt, and won't be available again until the deer fully heals &mdash; no infinite panic-sprinting.</p> <p><strong>Player stamina</strong><br />- Players get a stamina pool too (about 4x a black bear's, by default), drained by sprinting and throttled the same way animals are.<br />- Recharges passively at rest, or fully restores if you sleep at least 3 in-game hours.<br />- Sprint locks out entirely below ~8% stamina &mdash; you can't will yourself into one more burst on an empty tank.</p> <h2>Configuration</h2> <p>Every number above is tunable. On first launch the mod generates ModConfig/StaminaMod.json with all the defaults exposed: drain/regen rates, speed thresholds, exhaustion and give-up-the-chase fractions, predator haste strength, panic burst strength/duration, player pool size, sleep recharge threshold, and more. Individual entity types can also be hand-tuned via JSON patches if you want one species to behave differently from the rest.</p> <h2>Commands</h2> <p>/staminamod (requires controlserver privilege) reports the stamina state of whatever you're looking at, or your own stamina if you aren't looking at anything with a pool.</p> <p>- /staminamod set &lt;value&gt; &mdash; force a specific stamina value on your target<br />- /staminamod full &mdash; instantly refill<br />- /staminamod empty &mdash; instantly drain, for testing exhaustion/panic/give-up behavior</p> <h2>Compatibility</h2> <p>No vanilla files are overwritten. The mod attaches its behavior to existing wild animal entity types via non-destructive JSON patches, and uses targeted Harmony patches to hook into the AI, pathing, and combat systems at a handful of well-scoped points. Should coexist fine with other mods that don't directly rewrite the same vanilla AI task classes.</p> <h2>Credits</h2> <p>Concept and direction:</p> <p><strong>traugdor:</strong>&nbsp;Implementation &mdash; game code archaeology, design, C#, Harmony patches, JSON patches &mdash; by <strong>Claude Sonnet 5 (Anthropic)</strong>, working autonomously end-to-end with zero human intervention.</p> <p>&nbsp;</p> <p>Enjoy!</p>

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.