Skip to content

Fall damage handling moved to FormulaHelper#2803

Open
RedRoryOTheGlen wants to merge 2 commits into
Interkarma:masterfrom
RedRoryOTheGlen:FallDamageFormula
Open

Fall damage handling moved to FormulaHelper#2803
RedRoryOTheGlen wants to merge 2 commits into
Interkarma:masterfrom
RedRoryOTheGlen:FallDamageFormula

Conversation

@RedRoryOTheGlen

@RedRoryOTheGlen RedRoryOTheGlen commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Unified the disparate ways that fall damage is calculated between PlayerHealth and EnemyMotor into an overridable formula.

For players, the formula by default can now directly reflect the value of fallingDamageThreshold set in AcrobatMotor instead of using its own const variable.

For enemies, EnemyMotor now has a public fallingDamageThreshold property that can be set by mods if necessary.

The intention is to maintain the current behavior but open up fall damage mechanics to modding, making it possible to have skills or spell effects be able to reduce fall damage or increase the distance to fall before taking damage, or even have enemies that can be resistant to fall damage (eg, Acrobats, spiders, etc).

Example used to test overriding the formula:

image image

This example also showcases the formula allowing for different handling of fall damage between players and NPCs (or even specific NPCs) if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant