Hi. I'm having a few problems with the way our game handles abilities. In our game, the player can equip equipment to abilities to change their properties. So, equipping certain items could cause a simple attack ability to also cause a status effect, or even completely change it into a healing ability. This all works just fine with ORK. I have custom schematics attached to each piece of equipment. When an ability is used, the battle animation schematic checks if anything is equipped and, if so, the schematic attached to the equipment is called with the Custom Selected Data Schematic node. That schematic then will change the properties of the ability (through variables mostly) then use the original ability, or even use a whole new ability using the Use Ability Calculation node.

The first issue is minor, but just a little odd. Local selected data that I set in the first schematic is not available in the second schematic that is called with the Custom Selected Data Schematic node. I have to set the selected data to global to be able to access it. It's not a critical issue, but seems to go against what I read about schematics in the documentation.

The second issue is more troubling. We need to be able to know if abilities used are critical hits or not, but when I call an ability with the Use Ability Calculation node, there doesn't seem to be any way of doing that. Even if I use the Determine Action Outcome node either in the first schematic or the second schematic, abilities called from Use Ability Calculation can either be critical hits or not regardless of the outcome of that node. There's also just no way to know in the schematic itself if it was critical even after it happens. The only way really seems to be the different damage amounts or different flying text in game, as far as I can tell at least. My ideal solution to all of this, would be if I could just force each ability used either through the Calculate Action node or the Use Ability Calculation node to either be a critical hit or not (and miss and block as well, I guess), maybe just with some checkbox you could tick or maybe tied to a variable somehow. Any help with this is very appreciated. Maybe I'm doing something wrong, or maybe there's a better way to call different abilities from a schematic other than the Use Ability Calculation node.

The third issue is something a bit different, but I didn't want to make a whole separate forum thread about it. There does not seem to be any way to let an ability target either "All Allies" or "All Enemies". Setting Target Selection Settings > Target Type to "All" and Target Range to "Group" for an ability makes it so the ability targets every single combatant in the battle, both allies and enemies. This is actually a nice thing to be able to do, but I feel like there needs to be a Target Type: Either option that lets you select from just the two options "All Enemies" or "All Allies", or maybe some checkbox when you select "All" that limits it to individual groups and not every target in the battle.

Sorry for the wall of text. Thank you gamingislove or anyone else that can help with this issue. Oh also, I'm on Unity 2022.1.17f1 and ORK 3.7.0, just in case that's relevant.
  • 1) Generally, schematics started by schematics can share local selected data and variables, but the schematics called via Custom Selected Data Schematic node are a bit different.
    Since they're on equipment, items or abilities, those create their own local selected data with the equipment/item/ability stored in them as 'action' data and don't share with the schematic that called it. Local variables are still shared, though.

    2) Determining if an ability is a critical hit (or reacting to it) is only possible within schematics used by the ability. The Use Ability Calculation node only does that - calculate the outcome but doesn't use any schematics.
    A different approach could be using the Use Battle Action node with Add Action set to Sub Action. That way the action is used as part of the ongoing action and can also use it's schematics, etc.

    3) Hm, yeah - that's currently not possible.
    I'll look into it.


    Generally, regarding your ability setup being customizable via equipment: Another way would be to have the status changes on targets depend on defined conditions (which can check for equipment as well). Otherwise, all needs to be handled in the schematics animating it.
    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!
  • OK, I've had some time to mess with everything some more.
    gamingislove said: 1) Generally, schematics started by schematics can share local selected data and variables, but the schematics called via Custom Selected Data Schematic node are a bit different.
    Since they're on equipment, items or abilities, those create their own local selected data with the equipment/item/ability stored in them as 'action' data and don't share with the schematic that called it. Local variables are still shared, though.
    OK, that makes sense. As I said, not a big issue for our game, I just got a little confused by it and wasn't sure if it was a bug.
    gamingislove said: 2) Determining if an ability is a critical hit (or reacting to it) is only possible within schematics used by the ability. The Use Ability Calculation node only does that - calculate the outcome but doesn't use any schematics.
    A different approach could be using the Use Battle Action node with Add Action set to Sub Action. That way the action is used as part of the ongoing action and can also use it's schematics, etc.
    So, I've fiddled with Use Battle Action a bit and it does seem useful. There's so many options in ORK I just somehow missed it before. As far I can tell, the key difference for the way I'm using them is Use Battle Action will use that second ability's battle animation schematics and Use Ability Calculation will not.

    I've actually also come to realize that I can just use the Determine Action Outcome node once and then set a local variable, such as a bool "forceCritical" to true. Then, my formula that determines if abilities are critical or not can just always check for that variable existing and if it is true/false before falling back on the original formula. It works. I can force all abilities used with either Use Ability Calculation, Calculate Action, and Use Battle Action to be critical or not after that first check. Sorry, I should have come up with that solution earlier. I'm very likely going to still need to use the Use Battle Action node though, so thank you for bringing that to my attention.
    gamingislove said: 3) Hm, yeah - that's currently not possible.
    I'll look into it.
    Haha, OK thanks. It just seemed like the one type of target selection ORK couldn't do, so I thought it was a little weird. We're still prototyping, so don't rush on our account, but it would be useful so thanks for considering it and looking into it.
    gamingislove said: Generally, regarding your ability setup being customizable via equipment: Another way would be to have the status changes on targets depend on defined conditions (which can check for equipment as well). Otherwise, all needs to be handled in the schematics animating it.
    I think I understand what kind of setup you mean with this. I'm not positive it'll work for what we have in mind (or rather, it may not be easy to maintain moving forward), but again, thanks for the idea. I never even considered it in the first place, but I'm still learning ORK.

    I don't have any other questions for now. You definitely cleared up some things for me, so thank you very much for that and for your continued support of ORK.
  • rrldev said: I think I understand what kind of setup you mean with this. I'm not positive it'll work for what we have in mind (or rather, it may not be easy to maintain moving forward), but again, thanks for the idea. I never even considered it in the first place, but I'm still learning ORK.
    This can e.g. be useful for smaller adjustments based on the equipment - e.g. adding a status effect change, additional damage, etc.
    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!
Sign In or Register to comment.