edited July 30 in ORK Support
Hi @gamingislove

It would be great if you could implement having multiple Absorb Damage events per damage (status change) instance in all Target Change settings. Probably like in the other changes/bonuses where we can "Add Absorb Damage", something like this:

https://pasteboard.co/EPsZjYABNzI1.png

My use case is that I have 3 resources in my game:

HP
Mana (used for magic spells)
Stamina (used for physical abilities + running)

I am trying to implement having equipment that add Lifesteal/SpellVamp (HP), Mana Steal, and Stamina Drain, where different pieces of equipment can each add to how much the combatant can steal each resource using a formula which involves a Status Value for each resource steal (default value is 0).

Setting it up is workable enough, but currently the settings only allows us to Absorb Damage to 1 Status Value.

So for example, if my combatant is wearing equipment that add to resource steal for all three (or however many depending on game design) resources, currently there is no way to do it.

Thanks in advance!
Post edited by Leidustraum on
  • I'd recommend to use the status value's Change Schematics instead.

    They'll automatically play a schematic when a change happens on the status value - this can also be limited to defined sources (e.g. only abilities), only damages (checking for negative value), etc.
    The combatant causing the change (if available) is the Machine Object, the combatant who's status value changes is the Starting Object. The change value is available as local int variable change.
    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!
  • @gamingislove

    In the schematics, how do I call/get the value of the change in the status value(damage done) on the target, so that I may use it in the formula for the positive status change (resource steal) on the user?

    Because the resource steal is a percentage of/based on the value of damage done to the target, like in the built-in Absorb Damage settings. I am going to use that value and multiply it with a Lifesteal/Mana Steal/Stamina Steal coefficient, which is a Status Value of the user combatant.
  • edited July 31
    @gamingislove

    Also, when I use a schematic (any schematic) in the Change Schematic settings, it causes a stack overflow.

    I tried to use even just a very simple one that adds a flat HP value to damage dealer.

    https://ibb.co/2W0Lyzc

    https://ibb.co/jJsG9rV

    Error:

    https://drive.google.com/file/d/1KaaOPZuiKEIHsT0O-AxNLBMiDWiu-mSB/view?usp=sharing

    Not sure what I'm missing.

    Thanks


    This seems to be fixed by limiting the schematics to any one of the source types.

    However I still havent found a way to get the status value change (damage done) on the target. I tried using the variable key "change" (as stated in tooltip) within the formula for itself but it doesn't seem to work.

    https://ibb.co/mSrQnWn
    Post edited by Leidustraum on
  • The change that happened to the status value is available as local int variable change. When you use a formula in the schematic, the local variables will be shared, so it'll also be available in the formula.

    In your image, you're using a Float Variable, but you need to use an Int Variable.
    Next update will change it and provide the change variable as both int and float, but currently only int.
    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!
  • @gamingislove

    Ah ye, because the tooltip previously said float variable, haha. I changed it to int and it does look like it's working, but there are a couple of limitations currently:

    1. It looks like I can only implement Mana Steal and Stamina Steal in the Change Schematics settings. For HP Steal, I still have to set it through Absorb Damage settings on every Ability. Adding HP Steal into the Status Value Change Schematics, it seems to cause a recursive error where the user/attacker also has a status value change in his HP, which activates the schematics again...and it loops endlessly.

    Let me know if I'm wrong in this, or if there is a way to stop this loop within the schematic.


    2. Since a value used in the formula is a x% of the damage ('change'), the coefficient can be less than 1. Since currently it only allows for int variables , so will have to revisit this part after your next update where you will allow us to use float.

    Thanks!
  • 1) Ah, yeah - in this case you can set From Schematic to No, and/or limit the use to negative changes (so the positive absorb change doesn't play the schematic) via the Value Change Check settings (Is Less value 0).

    2) Formulas calculate in float values anyway, i.e. if you use the int variable to add to or set the formula value, the calculation is still float-based.
    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!
  • edited August 3
    @gamingislove

    1.) Great1 it works!


    Edit: I've figured out the issue below ;) but keeping it here for reference later. It's my variable origin not being set to selected data, key: action

    Thanks!

    One last thing on this topic-

    I wanted to limit the effect of the Lifesteal to "Physical Abilities" only (no Lifesteal effect from magic spells). I already have a classification of physical and magic abilities through Ability Types. However I cannot find any way in the Status Value > Change Schematics that can limit/check if the status value change came from a specified Ability Type.

    So I tried to do it this way instead:

    In each Ability>Ability Variables, I added a local string variable key "AbilityType", and then the value is set to either "Physical" or "Magic" depending on the ability.

    And then in the Status Value > Change Schematics, I added a condition that the local variable "AbilityType" must be set to "Physical" to run the Lifesteal schematics.

    This doesn't work.

    I also tried doing the variable check within the schematic itself using a variable fork node and it also doesn't work.

    I'm not sure I'm understanding Ability Variables right. Are their use only limited to schematics started by the ability itself? I cannot call them in the schematics started by others, in this case the status value change?



    Post edited by Leidustraum on
Sign In or Register to comment.