Mega Man 8-Bit Deathmatch Forum

【Suggestion】Decimal damage formula hook
Stardust Motion • October. 21, 2026, 4:52 PM
October. 21, 2026, 4:53 PM (Edited by Stardust Motion) Copy Link
V6C added `preciseDamage` to allow decimal amount of damage in DECORATE and store the remainder, which is very noticeable on very low damage/multi hitting attacks and is nice.
Though currently, modders can't add their damage calculation logic in `core_preciseDamage`, and so have to make another decimal tracking system on their own.
Consider :

- Inflictor : a damage (4.2 * FIXED) projectile, with preciseDamage / storeRemainder
- Mod A : Victim has a x0.8 damage reduction powerup
- Mod B : Victim has a x1.5 damage vulnerability debuff
- Expected damage : 4.2 * 0.8 * 1.5 = 5 (with +0.04 remainder on next hit)


Mod A and B receive from DamageHook_GetEventResult the non-fixed damage ; it would be nice if core_preciseDamage had a hook to let modders add their math logic in the decimal damage calculation step
Trillster Administrator
what's a code
Administrator
what's a code
October. 21, 2026, 5:02 PM Copy Link
This suggestion seems based off of an incorrect assumption. If you have a `HF_ACTOR_DAMAGED_PREMOD`, then you should be receiving the fixed point damage as the `dmg` argument in that script. You can correctly check for the `user_preciseDamage` flag on inflictor then do `FixedMul` or whatever other fixed point operation.
October. 21, 2026, 5:23 PM (Edited by Stardust Motion) Copy Link
Damage buff/reduction should apply regardless of preciseDamage flag on inflictor, currently the vanilla decimal system can't be accessed in the case a projectile doesn't have the flag