How is that supposed to work?
Pretend there are two health mods.
- Nintendo’s Flat HP mod, which adds a configurable integer based health system. When your HP runs out it trigger’s the player death event through the Mechaenetia API. This mod has its own API for determining the current player HP and max HP.
- Eidos’s Body HP mod, which keeps track of hitpoints for each body part. By default it is configured such that when the core/torso or head body parts run out of HP, the player death event is triggered. This mod has its own API for determining health for each body part, body part specific hurt events, etc.
Now imagine some more mods that build off of these basic health systems.
- Mario’s Hitpoint Pie mod, which requires Nintendo’s Flat HP mod to query player HP and max HP. HP is rendered as a circle with each individual hitpoint represented by a slice. If HP > 2/3 of max HP, the color is green. If HP < 1/3 of max HP, the color is red. Otherwise the slices are yellow.
- Link’s Heart Display mod, which requires Nintendo’s Flat HP mod. HP is rendered as hearts on the top of the HUD.
- Nintendo’s HP Alert mod, which requires Nintendo’s Flat HP mod and beeps if player HP falls below 1/3 (configurable) max HP.
- JC’s Health Display mod, which requires Eidos’s Body HP mod and displays the body in a diagram with a small green HP bar next to each part. Each body part will change from green, to yellow, to orange, to red depending on its HP as a percentage of max HP for that part.
- JC’s Cripple mod, which requires Eidos’s Body HP mod and applies a negative movement speed modifier to the player when their legs are damaged.
- DarthMaul’s Teras Kasi mod, which requires Eidos’s Body HP mod and allows for bare-hand martial arts attacks that hit specific body parts.
Let’s say our player wants the Teras Kasi mod, but also wants Nintendo’s HP Alert mod. Therefore our player installs four mods:
- Nintendo’s Flat HP
- Nintendo’s HP Alert
- Eidos’s Body HP
- DarthMaul’s Teras Kasi
He starts up the game with a friend to try out the Teras Kasi (basically kung fu). They start fighting, and expect to hear Nintendo’s beeping noises when one’s HP is low. Then a player dies without hearing any beeps. What happened?
The Teras Kasi attacks use Eidos’s Body HP API to deal damage to specific body parts. Eventually the Eidos health system tells Mechaenetia that the player has died. The attacks do not affect Nintendo’s Flat HP whatsoever, as DarthMaul didn’t write the mod to use that health system. The HP Alert only goes off when Nintendo’s API says the player is low on health, but the Nintendo health system is unaffected by Teras Kasi attacks.
~Max