I ran into an issue involving my core damage formula. Nothing super complex; STR - DEF = Damage Done.
The thing is that several abilities use the same damage formula, and then vary on Efficiency. One ability might have 2.0 efficiency, while another might have .2 efficiency, etc.
The problem I'm running into is this:
I never want the Player to deal 0 points of damage on these particular abilities, and the Formula covers this by having 1 as a minimum value. However, since efficiency is calculated after the Formula, we run into attacks where an attack that should deal 1 point of damage, after adding .2 efficiency, deals 0 damage. (It also runs into Attack Attributes, which potentially may cut the final number even lower).
Is there a way to add a minimum value so I can always round up to at least 1 damage? I don't really want to create an exponential amount of additional formulas as a workaround. D:
tl;dr: can I force a minimum final value on ability AFTER factoring in the ability's efficiency and Attack Attributes, in some way?
Thanks, nice! With this formula using Initial Value instead of efficiency is a good workaround. But yeah, unfortunately I still run into the problem where 1 turns to 0 the instant there's any Attack Attribute resistance.
Kirb said: However, since efficiency is calculated after the Formula, we run into attacks where an attack that should deal 1 point of damage, after adding .2 efficiency, deals 0 damage. (It also runs into Attack Attributes, which potentially may cut the final number even lower).
I'll look into a solution - maybe adding a simple minimum change setting :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Although it's a bit odd; there will still be situations where I think we'd WANT damage to be 0, such as if attack attributes on an enemy are set to 0. (thus gaining complete immunity to that attribute or even absorbing it, if it's set to a negative value). But if it's higher than absolute immunity (0), then a minimum change value, maybe?
There'll be a rounding setting available in the next update. That should solve your use cases - e.g. using Ceil rounding would round 0.2 to 1, and 0 would stay 0 :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Attack Attributes, that could use some min/max clamping options.
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
Maybe the results are just rounded?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Although it's a bit odd; there will still be situations where I think we'd WANT damage to be 0, such as if attack attributes on an enemy are set to 0. (thus gaining complete immunity to that attribute or even absorbing it, if it's set to a negative value). But if it's higher than absolute immunity (0), then a minimum change value, maybe?
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames