edited July 2019 in ORK Support
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?
Post edited by Kirb on
Tactics RPG Grid Battle System for ORK
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
  • You could get over efficiency problem by passing on initial formula value and multiplying calculated formula value by this.
    image

    Attack Attributes, that could use some min/max clamping options.
  • 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.
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • 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).
    1 * 0.2 = 0.2

    Maybe the results are just rounded?

  • 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!
  • Thanks!

    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?
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • 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!
  • Woot, thanks. :D
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
Sign In or Register to comment.