Space Engineers

Space Engineers

52 ratings
Stamina
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Other
File Size
Posted
Updated
1.238 MB
15 Jul, 2020 @ 6:59am
5 Aug, 2020 @ 8:14am
9 Change Notes ( view )

Subscribe to download
Stamina

Description
Adds a simple stamina mechanic, capped by health. Physical exertion now hurts.

Mostly tested in single-player; has only seen limited testing in Dedicated Server mode. Do report bugs!

Basics

This mod gives a reason to seek a medbay to recover beyond the 70% possible in pressurised environments. You now also can't sprint away from hostiles at low health, run back to base after crashing in the desert, or have designs that require constant jumping.

Exhaustion rate is dependent on gravity (scales linearly) and movement type. Sprinting and jumping are the most "expensive", while sitting in a chair/cockpit or crouching lets you recover the fastest. Mind you, crouch-walking has a cost!

Operating a jetpack currently neither has a cost nor provides a bonus.

Configuration

... is done per-save.

Go to save directory (%appdata%\SpaceEngineers\Saves on Windows 10), then to a particular save's Storage\2166947275.sbm_Stamina directory. Edit config.xml.

There are several "gain"/"cost" classes for different movement types. For current class assignments, see the PlayerStats.cs file in your mod directory (%steam%\steamapps\workshop\content\244850\2166947275\Data\Scripts\Stamina on Windows 10), or online:

https://github.com/keyspace/Stamina/blob/v0.1.1/Data/Scripts/Stamina/PlayerStats.cs#L132-L171

Source code

https://github.com/keyspace/Stamina

This mod was made due to Daily Needs having a restrictive license, which forbids anyone but the licensers to make modifications (not cool!). That mod itself is a derivation of Hunting, which is of unknown license status to me.

There are multiple other issues I find with the mod(s) game-wise, ranging from ore gen re-definitions through balancing and progression to visual style.

So, I just wrote the part I wanted, as harsh as wanted.
51 Comments
Ugga 22 Nov, 2022 @ 3:51pm 
@keyspace We really liked your mod. If you can fix it for DS, we will be very happy. :)
Of course, we understand that when an error is not permanent, it is difficult to find and fix it. I hope there are more players from Dedicated Servers and could help with reports.
keyspace  [author] 22 Nov, 2022 @ 1:27pm 
@Ugga

Thank you for reporting! I suspect it's a bug with the mod itself, but one that I'm not sure how to reproduce. :(
Ugga 15 Nov, 2022 @ 5:19pm 
@keyspace I am a DS administrator. The mod was on the server for 2 days.
On the first day, players began to complain that stamina was not restored to 100% after restoring health.
Everything was OK with me. Stamina was restored.
The next day, my health dropped to 99% from suffocation and did not recover to 100%. Looked at the file. Their stamina froze at 27, 46, 84%...
I disabled the mod until the reasons were clarified so as not to spoil the gameplay.

I assume that this is a mod conflict or a glitch in this mod. No mod other than "Eat. Drink. Sleep. Repeat!" does not affect the change of characteristics of the character after death.
keyspace  [author] 15 Nov, 2022 @ 12:07pm 
@Ugga

I've also just tested with what seems relevant from your mod list - "Eat. Drink. Sleep. Repeat!" (id 2547246713).

"Stamina" seems to work same way as described below.
keyspace  [author] 15 Nov, 2022 @ 11:49am 
@Ugga

> In the stats.xml file, the health are not reset to 1.

`stats.xml` doesn't track health, it's only one field per player, called "Stamina".

I guess you meant stamina instead of health?.. This mod does not track health.

Are you checking the correct save's Storage folder?

Does the DS have write permissions to this folder?

Are there any errors in the server's console/log?

What is different in your server setup compared to mine (except the extra mods)?
keyspace  [author] 15 Nov, 2022 @ 11:48am 
@Ugga

Actually, never mind, turns out I never uninstalled the DS, so testing now (Through the Windows-based launcher SpaceEngineersDedicated.exe).

In my "Mars Planet" test game, there are no other mods than this one (id 2166947275), plus its dependency TextHUD API (pulled in automatically).

I have verified that after taking damage (from a fall) the Stamina field is saved to `stats.xml`.

After healing up in a medbay _or_ a survival kit, the character's health is increased, stamina rises as expected, and the changes are reflected in `stats.xml` after next auto-save.

To be specific, the `stats.xml` file I'm viewing is:

%appdata%\SpaceEngineersDedicated\Saves\Mars Planet\Storage\2166947275.sbm_Stamina\stats.xml
keyspace  [author] 15 Nov, 2022 @ 11:06am 
@Ugga

Thank you for reporting.

Although I've installed SE again, it doesn't look like I'll be able to debug Dedicated Server Issues any time soon.

Can only suggest disabling the mod for now. :(
Ugga 14 Nov, 2022 @ 4:32am 
@keyspace
I couldn't find mod incompatibilities. In stats.xml, for each character on the DS, health decreases after bad weather or a battle. Recovery in a survival kit does not raise the stamina cap. In the stats.xml file, the health are not reset to 1.
After the death of the character and re-entry, everything is OK.

Installed mods "Eat. Drink. Sleep. Repeat!" and "AiEnabled".

In single player everything is OK.
keyspace  [author] 13 Nov, 2022 @ 11:05am 
@Ugga

AFAIR this was common on DS, especially when used with other mods that set health <100% after re-spawn.

Stamina is capped by health. Have you found a bug where stamina is below health, and no longer rising?..
Ugga 12 Nov, 2022 @ 5:13pm 
@keyspace
Dedicated Server bug. After losing HP and recovering, stamina does not return to 100% again.