BetterFallDamage
Makes fall damage make more sense, as well as highly customizable.
| Date uploaded | a month ago |
| Version | 1.2.0 |
| Download link | LokisHorseChild-BetterFallDamage-1.2.0.zip |
| Downloads | 1193 |
| Dependency string | LokisHorseChild-BetterFallDamage-1.2.0 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2304AinaVT-LethalConfig
Provides an in-game config menu for players to edit their configs, and an API for other mods to use and customize their entries.
Preferred version: 1.4.6README
Better Fall Damage
Overhauls how fall damage is calculated while improving quality of life.
Features
- Smoother fall damage calculations
- Includes carry-weight in fall damage calculations
- More challenging defaults
- Customizable to every skill level
- Light-weight networking allowing players to receive settings from the host player
Added Settings
DisableServerSideConfig:
Stops you from receiving the settings your host player is using.
Useful if you want to essentially run the game at a higher/lower difficulty than them.
DisableFallDamage:
Prevents you from taking any fall damage.
FallTimeDamage:
How long the player needs to be falling for before fall damage starts racking up.
I wouldn't recommend setting this to 0.
FallTimeInstaKill:
How long the player needs to be falling for before they instantly die on impact.
You probably shouldn't set this to 0 either.
FallTimeDamageExponent:
Changes the rate that fall damage accumulates while falling.
Some useful defaults:
- 1.0 - Linear build up
- 1.7 - Natural-feeling build up (Default)
- 0.5 - Punishing, front-heavy build up
DisableWeightScaling:
Stops weight from affecting your fall damage
WeightScalingFactor:
How much weight it takes to halve FallTimeDamage and FallTimeInstaKill
The lower this number is, the harder your games will be
The Math
The base game currently deals fall damage in tiers based on how long you have been falling:
- 1s - 30 dmg
- 1.05s - 50 dmg
- 1.18s - 80 dmg
- 1.28s - 100 dmg
Better Fall Damage calculates the damage by smoothly increasing the final damage as you fall.
If you have weight-scaling enabled, this is how I calculate the damage you take when you hit the ground:
WeightScale = (PlayerCarryWeight / WeightScalingFactor) + 1
WSFallTimeDamage = FallTimeDamage / WeightScale
WSFallTimeInstaKill = FallTimeInstaKill / WeightScale
WSTranslatedFallTimeInstaKill = WSFallTimeInstaKill - WSFallTimeDamage
WSDistanceAlongDamageRamp = (CurrentFallTime - WSFallTimeDamage) / (WSTranslatedFallTimeInstaKill)
DamageAmount = (WSDistanceAlongDamageRamp^fallTimeDamageExponent) * 100
If you do not have weight-scaling enabled, this is how I calculate the damage you take when you hit the ground:
TranslatedFallTimeInstaKill = FallTimeInstaKill - FallTimeDamage
DistanceAlongDamageRamp = (CurrentFallTime - FallTimeDamage) / (TranslatedFallTimeInstaKill)
DamageAmount = (DistanceAlongDamageRamp^FallTimeDamageExponent) * 100
If you would like to play around with the numbers to get settings you like, you can mess around with This Desmos Page
CHANGELOG
v1.2.0
Updated the netcode to be compatible with Unity 2022.3.62 Added dependency on LethalConfig Settings now all update correctly when changing them in-game Changed EnableWeightScaling to DisableWeightScaling Server settings now get sent every time the ship lands
v1.1.1
This technically isn't an update. I've just made sure that the vanilla fall damage changes don't break this mod or vice versa.
v1.1.0
Clients now receive config information from the host when they join a lobby
- This can be disabled with the new DisableServerSideConfig setting
- DisableFallDamage has been moved from "Disable" to "General"
v1.0.4
Had to R the FM - https://harmony.pardeike.net/articles/patching-prefix.html#changing-the-result-and-skipping-the-original Turns out the game's original fall damage was still in place and running in tandem with mine so... The damage was doubled. Cut me some slack. This is my first mod
v1.0.3
Added "DisableFallDamage"
v1.0.2
Made some more reasonable defaults for the config
v1.0.1
Listen. The documentation didn't say to add the DLL to the zip
v1.0.0
Added the basics need to do some more rigorous testing