Simon van Luxemburg
LCLegDayMod
"Take a lot of steps and get a stamina boost, but stagnate or die and lose the gains!"
A mod with the goal to be small yet impactful, by delivering a stamina mod for people who want more depth than "more stamina" or "customizable stamina".
I also used this as a fun, little writing exercise, by writing the Fitness Witness.
LCLegDayMod: A mod meant to gamify the "more stamina mod"-idea by tying it to your taken steps in a day
Gamifying Quality-of-Life:
This mod was created to offer a solution to players who wanted increased stamina and did not want a mod that simply altered numbers. Plenty of mods double or triple the stamina or make it infinite or let players set it through a menu.

This mod intends to be part of the core game loop. If you collect more items, you take more steps. And if you have more stamina, you can take more steps, allowing you to collect more items. So there’s a positive feedback loop to motivate players.
Code on Update(), counting how many steps the player has taken, counting their current location and state, to apply bonus- and penalty-steps at the end of the day
On top of that, the mod makes a distinction between steps taken in safe and hazardous environments, to try to push people towards the fun of the game.
Video demo of the mod general loop, stating how your stamina will change at the end of the day, based on your playstyle during the day
Implementing Conditions:
Lethal Company already uses a ‘stepsTaken’-variable per player to track the “laziest employee” per in-game day, so I could use this too.
Code that runs at the end of an ingame day, determining whether stamina has increased by adding up all bonus- and penalty-steps, and seeing what tier it falls into, and thus by how much to change the player's stamina. It also gives visual feedback by relaying this change in stamina to a quote that will be printed to the screen.


This mod keeps track on Update if stepsTaken has increased and adds new steps taken to the daily total.
It also checks the player’s state: are they carrying heavy items, trudging through water, or inside the safe ship? Depending on these states, bonuses and penalties are applied, and then it calculates how many steps will in- or decrease the stamina by how much.

Debug print explaining the steps taken, modifiers such as player amount, tiers, amount of deaths in a row, quote to print, and new stamina
It also takes into account things such as how many other teammates there are that would do some of the lifting for you, so everyone still has a chance to increase their stamina by doing their own very best.
It then applies the stamina, and saves it to a local XML save file.
Video demo of debug tool used to print whenever a new step has been taken, how many have been taken so far, and in what state
Feedback and Aesthetics:
And finally, to clarify all this under-the-hood information and add a personal touch to the mod, at the end of an in-game day I use display how many steps the players has taken and whether it has increased or decreased their stamina.
Players can choose for a simple “Stamina Up!/Down!” message, but this mod’s most prominent feature is the Fitness Witness.

A pop-up at the end of the day will show if the steps taken increased stamina, decreased stamina, or didn't change it. Printed right above the inventory



The Fitness Witness is written to be purposefully snarky, creating a sort of bond to this “character” and adding a layer of comedy. It can applaud you, laugh at you, give you a hint on what you should be doing better, not be paying attention, quote a pop-culture reference, and more.

Some of the Fitness Witness quotes, explaining how to do better the next day, or if you've done well and should keep it up
I wrote over 100 different short lines of monologue, with roughly 10 tips for each different state of how much the player’s stamina has changed and why, and people love this feature, so I see it as a successful addition to the play experience.
Video demo showing all the Fitness Witness's quotes
If you would like to enjoy this mod too, you can download it through the Thunderstore Mod Manager, following this link: Link to the page
