---
# System prepended metadata

title: Fully fledged stamina system

---

# Fully fledged stamina system

<!-- It's not necessary to follow this format, as long as you provide a coherent and structured document -->

## Abstract
Currently, our disarm system is semi-RNG with zero relation to any other character statuses and effects besides an arbitrary protag "endurance" skill. Nothing effects how much it takes to capture a marine. 

A full health fresh deployed marine can get captured just as easily as a neuro'd marine on the brink of crit with 9 fracs can.

This intends to change this by utilizing our mostly unused stamina system, overhauling it to modern standards, and integrating systems that should effect stamina like health status,pain,neuro,etc. 

<!-- An abstract is a short blurb, about a paragraph or two, succinctly describing your feature. This should mostly be "why", but can include "what". -->

## Goals
1. Create a system that ties in with other systems to create depth
    Depth is our goal here. Doing this will also allow for more skilled gameplay.
2. Make capturing much more sensible
    Gone with the static semi-RNG, this makes sense now.
3. Elevate the importance of health
    Marines with 9 fracs on the frontline should be easier to capture than someone who just deployed. We can also potentially buff heavy armor by making it cap resistant


<!-- This is a numbered list clearly detailing your goals for the feature. As per usual, this should be a mixture of both why and what. -->

## Non-goals
1. Majorly disrupt capture balance
    It is inevitable that we will we affect balance by overhauling the entire system but, we still want xenos to be able to cap to a similar degree than before.
2. Be OP/underpowered blah blah
<!-- Just like goals, but the opposite! Every feature has boundaries it won't step over. These should be written as if they start with "We will not...". -->

## Content
The challenges for this system are not in design but are mostly in implementation.

How this works is simple, we craft an algorithm that takes all these factors combined like health, fracs, endurance, armor etc.

```
Example: Fracs do -5 stamina max each
Starving decreases stamina
```

This will be used to calculate a stamina number for humans. 

Each hit of xeno disarm and neuro will reduce stamina for X amount of time. When it reaches below a certain threshold, the marine will be stunned. Further stamina damage will not effect stamina past this threshold and stamina below this threshold will be denoted as "reserve"

Existing xeno disarm numbers would be ported to stamina damage and then balanced accordingly. An entirely new system would require new balance numbers so this will be an additional challenge.


Important numbers:
- Stamina: Level of stamina you have. You slow down the lower you go.
- Stamina Max: Maximum level of stamina that is decreased by character status. Additional thresholds can be placed on stamina max like if it is below a certain level, you cannot resist.
- Reserve threshold: Reserve threshold that is only removable by the marines themselves. Ideally they should already be stunned by the time they are down to this. 
- Recovery rate (optional): A rate of recovery for stamina. We can apply a similar algorithm to recovery rates to make injured marines take longer to recover stamina.
### Xeno indications
Xenos can tell a marine's general stamina level and by extention, health status by injury overlays. Existing injury overlays will be upgraded and we can add some bloody character effects. Perhaps making fractures/splints visible aswell

This would help with their gameplay as they can spot out weaker marines and eliminate or capture them while being weary of the strong ones and handling them accordingly.

Additional hud overlays can be added too but this is a last resort option.

### Recovery
After a bit of not being stamina damaged, stamina will recover. A similar algorithm can be used for recovery rates, though it is not nessesary.
### Resisting (optional)
A marine can trade a large portion of their "reserve" stamina to resist and start crawling away. This will grant them a very short temporary immunity to stam dam. Should they continue to be stunned after, their resists will be thwarted. However should their stamina recover past their reserve threshold, they can get up.

This gives a "last chance" mechanic where marines can have their last hope of getting away. It is still biased toward xenos as marines don't instantly get up,but it gives some player input to an otherwise one sided interaction.

Marines with a maximum stamina below a certain threshold (ea injured, has a bunch of fracs and shit) will not be afforded such chance.

Should be combo'd with buffs to devour/carry time accordingly.


### Other integrations

We can also integrate Mess sargent cooked food and other things as minor temp buffs to stamina. though this is entirely optional.
<!-- Now's where you get into clear detail about everything your feature does. **You should still be explaining 'why' things are that way, *as* you describe what.** Be as detailed as possible. -->

### Addendum: Balance Impact
On further discussion, this has a much more profound effect on combat then what was initally thought with the disarms slowing down and the entire combat dynamic of some castes like drone being changes. Therefore increasing the scope to a general combat rework is nessesary.

This would also be a general marine nerf as they would have more slowdowns and would have to deal with stam recovery. In addion it would slow down the game further, which is probably good considering the average round length of one hour.


## Alternatives
tg combat mode?
- we want our own native system. tgstation isnt tdm so it may not fit our game loop

<!-- Provide potential alternatives to your feature, either ones that align with your design values, or ones that don't that you suspect will be suggested. If you are including the latter, make sure to explain why you didn't choose that. -->

## Potential Changes
* Recovery rate can be added in/adjusted in accordance to balance
* Stamina maximum and calculations can be adjusted in accordance to balance
* Various thresholds for things like resisting can be adjusted easily.
* Resisting can be gutted entirely should it prove to be an issue.
* Cap to the maximum amount of stamina damage a person can recieve at a time
    Nerfs stacking so several xenos won't be able to instacap a marine by disarming them at the same time. We need to find a niche between teamwork and stacking though.

<!-- Most of the time you're not going to get the best design first try. It helps to try your best to predict what *could* go wrong, and suggest alternatives that can be taken, without sacrificing your design. -->
