tModLoader Stamina

hamstar

Terrarian

Stamina

v2.1.1.2

Mirror


Note: Requires Mod Helpers


This mod gives your player a stamina bar. Running, jumping, dashing, grappling, and item use all draw stamina, and will leave you briefly exhausted if over done. Exhaustion increases fatigue, which temporarily lowers max stamina. Gain enough fatigue, and you'll exercise your stamina (read: permanently increase your max stamina), but only after your fatigue wears off.

Also, consuming Fallen Stars recovers stamina, and a craftable Energy Potion is also available to temporary regenerate stamina quickly. Drinking Water Bottles recovers fatigue.

You can adjust mod settings in the configuration file found in 'Documents/My games/Terraria/ModLoader/Mod Configs/Stamina Config.json'.

Source code now available. API now available (now featuring Mod.Call() bindings).

  • V3Jsdw4.png
    Energy Potion (potion)- Increases stamina regeneration for a short while. Crafted at a bottle/alchemy station with:
    • 1 Bottled Honey
    • 1 Swiftness Potion
    • 1 Daybloom
    • 1 Fallen Star
    • 1 Purification Powder
  • KNKUVvT.png
    Athlete Potion (potion)- Increases max stamina by 100 for some time. Crafted at a bottle/alchemy station with:
    • 1 Bottled Water
    • 1 Bone
    • 1 Strange Plants
  • EcBrjZt.png
    Rage Headband (accessory)- Trades exhaustion for damage. Crafted at a tinkerer's workshop with:
    • 1 Magma Stone
    • 4 Hook
    • 5 Silk
  • yLIEntw.png
    Exercise Supplements (accessory)- Increases gains from exercising. Crafted at a tinkerer's workshop with:
    • 1 Vitamins
    • 15 Pink Gel
    • 15 Stinger
    • 5 Pumpkin Pie
  • nE42hbL.png
    Champion Belt (accessory)- Reduces stamina drain from item use. Crafted at a tinkerer's workshop with:
    • 1 Titan Glove
    • 1 Avenger Emblem
    • 10 Leather
  • SmxPXqg.png
    Joint Bracer (accessory)- Reduces stamina drain from non-jump movement. Also gives knockback resistance. Crafted at a tinkerer's workshop with:
    • 1 Dual Hook
    • 25 Cogs
    • 1 Basic knockback resist shield (Cobalt Shield, Obsidian Shield)
    • 4 Weighted Pressure Plates (any)
  • TAjlxdG.png
    Leg Springs (accessory) - Reduces stamina drain from jumping. Also gives fall resistance. Crafted at a tinkerer's workshop with:
    • 1 Ninja Item (tabi or black belt)
    • 1 Frog Legs
    • 10 Iron Bars
  • SvNLaoy.png
    Powered Exoskeleton Frame (accessory)- Reduces general stamina drain. Also gives fall and knockback resistance. Crafted at a tinkerer's workshop with:
    • 1 Champion Belt
    • 1 Joint Bracer
    • 1 Leg Springs
    • 2 Lihzahrd Power Cell
    • 50 Conveyor Belts


Installation

Requires tModLoader (+0.11). Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.


v2.1.1.2
  • Fixed crash issue with a config setting
v2.1.1
  • Updated for TML11.5
  • Added FloatInputElement for float config settings
  • Added ranges to some config settings
v2.1.0.2
  • Fixed stamina meter MP draw fail (again)
v2.1.0.1
  • Fixed stamina meter MP fail
v2.1.0
  • Updated to TML11.4 and MH5b
  • Changed CustomItemUseRate to use ItemDefinition
  • Set interface config settings to specific types
v2.0.7.1
  • Fixed incorrect adding with AddMaxStamina(...)
v2.0.7
  • Restructured StaminaLogic code files to better separate exercise and stat-only stuff
  • Added StaminaLogic.AddMaxStamina(Player, int)
  • Added StaminaAPI.AddMaxStamina(Player, int)
  • Added AddMaxStamina clamping against negative/low values
  • Fixed trying to display on-player stamina bar displaying while dead
  • Minor internal changes
v2.0.6
  • Updated to MH v4.2.3 (including conventions)
  • Changed snake case to camel case
v2.0.5
  • Updated to Mod Helpers v2.0.2
  • Assorted config updates
  • Fixed occasional draw error
  • Restructured player code
  • Added MP player load bug failsafe
v2.0.4.9
  • Fixed possible crash on load
  • Removed stamina drains from re-jumping (non-responsive mid-air jumps)
v2.0.3
  • Minor internal refactoring
  • Added API Mod.Call() bindings
  • Fixed config field CustomItemUseRate default values
  • Nerfed stamina accessory drain reduction (70% -> 80%)
v2.0.2
  • Changed Joint Bracer recipe
  • Recolored Athlete Potion
  • Fixed (hopefully) player stamina bar overlay
  • Slightly buffed Energy Potion
v2.0.1.4
  • (Hopefully) fixed a crash/rendering issue
v2.0.1.2
  • Fixed 'ExhaustionBlocksItems' config setting
v2.0.1.1
  • Rage headband now gives more correct damage
  • Exhaustion effect glitching fixed
v2.0.0
  • Added mini stamina bar beneath player (can be repositioned)
  • Tweaked stamina use default settings
  • Nerfed Energy Potion
  • Added Athlete Potion (adds max stamina)
  • Added 5 new accessories
  • Improved API
  • Assorted internal refactoring
v1.5.0.1
  • Added mod icon
  • Added support for Hamstar Helpers v1.2.0 issue report
  • Refactored net protocol
  • Assorted refactoring
  • Added a basic API class
v1.4.12
  • Exercise increases max stamina by +3 (was +2)
  • Reduced stamina drain from magic items doesn't apply for Space Gun and Laser Rifle while wearing Meteor Armor
  • Minor refactoring
v1.4.11
  • Updated for TML 0.10
  • Offloaded utility/helper code to Hamstar's Helpers mod (now a dependency)
  • Numerous fixes and tweaks
v1.4.10
  • Added config setting 'Enabled' (allows disabling mod without unload)
v1.4.9
  • Tweaked item use rate
  • Removed deathweed from Energy Potion recipe
v1.4.8
  • Toned down drain from item use slightly
  • Removed Jungle Grass Seeds from Energy Potion recipe
  • Removed old config ("Stamina 1.2.0.json")
v1.4.7
  • Greatly reduced gravitation potion drain rate + added config setting.
v1.4.6
  • Changed default config settings for exercise growth and magic item use rate.
v1.4.5
  • Changed some default config settings.
  • Added new config settings.
  • Config file relocated to Mod Configs.
  • Minor code improvements.
v1.4.4
  • Fixed config reloading between game sessions.
v1.4.3
  • Lowered exercise threshold percent and added config settings.
v1.4.2
  • Added config settings for exercising.
  • Lowered threshold before fatigue produces exercise.
  • Added sound + new visuals for exercise.
v1.4.1
  • Fixed popup number failing to display for exercised stamina increase.
  • Set water bottles to remove 50 fatigue.
  • Set exercise to occur when fatigue 25 away from max.
  • Increased default fatigue gain.
v1.4.0
  • Added config option to override stamina bar position.
  • Expending stamina increases fatigue (temporarily lowers max stamina).
  • Maxing fatigue and then recovering it to full exercises stamina (increases max stamina).
  • Drinking water bottles recovers fatigue.
  • Altered Energy Potion recipe (uses Jungle Grass Seeds instead of Fireflies).
  • Gravitation Potion reduces stamina recovery by half.
  • Taking damage gives small bursts of stamina.
  • Various stamina settings tweaks (see config).
  • Magic weapons use half stamina.
v1.3.4
  • Fixed star eat fail.
v1.3.0-2
  • Nerfed Energy Potion and changed its recipe: Bottled Honey, Daybloom, Deathweed, Fallen Star, Firefly, Purification Powder
  • Tweaked stamina drain settings.
  • Added various code improvements.
v1.2.0
  • Added visual indicator of low stamina (sweat drops).
  • Added stamina bar color change when < 33%.
  • Wing floating no longer draws stamina.
v1.1.5
  • Added proper multiplayer support. Just 'cause.
v1.1.4
  • Exposed classes for DLL reference use. No gameplay changes.
v1.1.1-3
  • (Hopefully) fixed a crash bug.
v1.1.0
  • Added a craftable Energy Potion for stamina recovery (Bottled Water, Pink Gel, Fallen Star, Purification Powder)
  • Lots of improvements and fixes to stamina draining.
  • Fallen Stars can be consumed raw for small stamina boosts.

Stamina.png


 
Last edited:
That's cool and all, going on a modding adventure to make Terraria more realistic again, but we actually want the dating sim mod.
v1.1.0 for the new tModLoader update. Added a craftable Energy Potion for stamina recovery, and heavily tweaked the stamina system.
 

Attachments

  • Stamina v1.1.0.zip
    11.6 KB · Views: 299

Attachments

  • Stamina v1.1.1.zip
    11.6 KB · Views: 282
  • Like
Reactions: 000
thank you, and there is nothing to apologize, it is only normal , these things happen while creating sth new and awesome like your mod. And about durability, it is nicely brutal, I wasn't paying attention and didn't dig enough ores. Now I am like a fish out of ocean, time to find some bombs :p I dare not use Lives yet :D
Edit: Opps, about durability; seems like I boxed myself with wood blocks at my spawn with out those bombs so I am stuck , lol. I can spawn a pickaxe or load world with another character, but do think there can be a solution within the mod (like a wooden pickaxe with terrible durability)? or do you think this is the point/importance of the mod and I should just create new character/world?
 
Last edited:
thank you, and there is nothing to apologize, it is only normal , these things happen while creating sth new and awesome like your mod. And about durability, it is nicely brutal, I wasn't paying attention and didn't dig enough ores. Now I am like a fish out of ocean, time to find some bombs :p I dare not use Lives yet :D
Edit: Opps, about durability; seems like I boxed myself with wood blocks at my spawn with out those bombs so I am stuck , lol. I can spawn a pickaxe or load world with another character, but do think there can be a solution within the mod (like a wooden pickaxe with terrible durability)? or do you think this is the point/importance of the mod and I should just create new character/world?
It's sorta the point. Albeit it's not super obvious up front that you can get a merchant for a renewable supply of pickaxes, axes, and shuriken and a demoman for grenades and such. I don't have a really good solution for that.

Edit: New version exposes classes for DLL reference use. No gameplay changes.

Edit Edit: Added proper multiplayer support. Just 'cause.
 

Attachments

  • Stamina v1.1.5.zip
    12.6 KB · Views: 260
Last edited:
It's sorta the point. Albeit it's not super obvious up front that you can get a merchant for a renewable supply of pickaxes, axes, and shuriken and a demoman for grenades and such. I don't have a really good solution for that.

ok. I will create new character/world. (Since it was the very beginning of world (like first 2 days), I also died and dropped money , so I only have 5 silver 14 copper coins, merchant npc wouldn't spawn)
 
v1.2.0
  • Added visual indicator of low stamina (sweat drops).
  • Added stamina bar color change when < 33%.
  • Wing floating no longer draws stamina.
 

Attachments

  • Stamina v1.2.0.zip
    13 KB · Views: 292
It's me! Your self-proclaimed biggest fan!
First off- Before you added the stamina bar color change, I WAS gonna suggest just that! I am so glad you added it.

Something I think this mod needs tho: Auto-Stamina button. Could there be a way to bound a button, so that said button automatically uses Fallen Stars in the inventory to recover stamina?
You really need stamina to jump around and dodge enemies and the like (If you don't want to spend Energy potions), so being able of using Fallen Stars quickly would help.
 
That'll come in a later version. There is an Energy Potion available now, though (and you can eat Fallen Stars for brief spurts). Meanwhile:

New to v1.3.0
  • Nerfed Energy Potion and changed its recipe: Bottled Honey, Daybloom, Deathweed, Fallen Star, Firefly, Purification Powder
  • Tweaked stamina drain settings.
  • Added various code improvements.
New to 1.3.2:
  • More tweaks to formula.
1.3.4:
  • Fixed star eat fail.
 

Attachments

  • Stamina v1.3.1.zip
    13.6 KB · Views: 257
  • Stamina v1.3.2.zip
    15.1 KB · Views: 287
  • Stamina v1.3.4.zip
    15.1 KB · Views: 349
Last edited:
Could you maybe make a UI element for stamina in the same fashion as health and magica ? (take a look at the custom bars mod)

Also you could make it that after so many actions you gain more stamina ?
 
This mod is great. Adds a really cool new dynamic to the game that makes it a lot harder to just cheese certain aspects of the game (Digging a shaft directly into Hell, for one).

One thing I would really like to see is a consumable that actually increases your maximum Stamina, exactly like how Life Crystals and Mana Crystals improve their respective resources. I consider Stamina a resource in a similar vein, and believe that it should also have something that increases the maximum amount of Stamina that is not simply an accessory. Having accessories to complement Stamina (Similarly to how there are accessories that complement Life and Mana, but you are able to increase it without reliance on an accessory) would be awesome though. However, to compensate, I would like to see the beginning Stamina lowered a decent bit, as it would feel like your character gains greater endurance over the course of the game.

Having some way to utilize Stamina in different ways would be awesome too; maybe holding the Space bar would let you jump higher for a large expense of Stamina. Or maybe pressing a key would allow you to Sprint, giving you a speed boost (A la Skyrim). I think this would add a lot of depth to the Stamina system and also make it feel like a true resource that you can actively use.

Another note; I don't think that Spells should necessarily use Stamina. Those are already restricted by Mana, and it doesn't really feel right to have casting a spell drain your Stamina as well.
 
Back
Top Bottom