edited April 2023 in ORK Support
Is there a way to set the reuse-time of an ability depending on the level of a research item?

I know the easiest way is to use the ability's level system. But in my case i cant use it, because i have many research items and e.g. some of them only increase the range of an ability others the damage, ... and so on. To be able to mix different research items i cant use the level system.

I think it can be a bit messy when I use the level system only for the reuse time. Any changes you need to make after setup, you need to make those changes in all levels.
Post edited by Tzunamii on
  • edited April 2023
    Out of the box that'd be possible via formulas ... but that'd mean you need a formula for each research item. If only one research item impacts all reuse times, easy - but if each ability has it's own research item for the reuse time, that can get out of hand :)

    However, your research items can also change variables or use schematics on completion. I.e. you can use that to e.g. set a variable on the combatant or via schematic change variables on an ability and have that impact the reuse time (via formula).
    Post edited by gamingislove on
    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 April 2023
    Yes, that can really get out of control ^^.

    Okay. I have the following setup: (Maybe as additional info: Abilities are used from more than one combatant, so I must use variables which are saved on abilty instance)

    Setup
    Ability use a formula Cooldown with a initial value of it's start cooldown (e.g. 3). The formula itself does not much except to subtract the initial value with a local variable cooldown which is set under Abiltiy Variables as local origin.

    If this is correct so far:

    What a schematic I need to use on Finished Schematic on the research item? I know I must increment the local cooldown-variable from the instanced ability. How can i get the "linked" ability? Under type I use None so i dont have the local selected data action?
    Post edited by Tzunamii on
  • edited April 2023
    I have another general question to my question above: When I read the documentation about variable: There is no possibility to give an ability a variable or Im missing something? How can I give an ability a "local" variable which are changeable and saved to this instance?
    Post edited by Tzunamii on
  • The schematic should have the ability (if it's an Ability research item) available as local selected data via the data key action.

    The Ability Variables you set up on the ability are created for each individual instance of the ability. In-game, accessing/changing them (e.g. via schematics) always uses the variables of the individual ability's instance.
    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!
  • 1) That wouldn't be a problem if I could also use my own image and text like Type: None and if it's not a problem to learn an ability (level 1) twice (not tested yet, because cant use own image/text).

    2) I have a comprehension problem with the variables, which origin I have to choose:

    Local – This would be my first choice, but it resets its value because it is not persistent (and the documentary say's it also, like a counter variable in a for loop, only useable in context, right?).
    Global – Globals are like static variables ( and not bound to an instance, right?)
    Object – Are bound to GameObjects and in an ability context it means I have to choose someone (E.g. Machines Object -> Player). So this variable are bound to a combatant, right?
    Selected Data – I think this is only for "selecting data" to use it somewhere else.

    And only Global and Object save its value in a savegame.

    So if Im correct I cant use a variable on an ability which save its value after a research item is ready and e.g. increments a variable on the ability by one.

    I hope you can explain me my mistake in reasoning?




  • 1) Otherwise, you can use a Select Ability node in the schematic to get the ability you want.

    2) Well ...

    Local depends on where it's used, e.g. in a schematic, the local variables are only 'alive' while the schematic runs (also shared in some cases, e.g. schematics animating a battle action all share their local variables, as well as formulas called by the schematic or ability/item).
    Setups for ability/item variables and similar things have the individual instance's variables as Local variables, etc.
    So, local is context-dependent :)

    Global - correct.

    Object - correct, with the addition that you can also access them without game objects via an Object ID. Also, all game objects using the same Object ID share their variables.
    Basically, using Object IDs allows you to create sub-global variables if you want :)

    Selected Data is a bit more complex. Generally, you can store any kind of thing into selected data, e.g. a combatant, an ability and a game object. Using the Selected Data variable origin will try to get variables from whatever is stored in the selected data.

    Yes, generally only global/object variables are saved, though local variables e.g. in context of ability/item/equipment variables can also be saved. Local variables of schematics or formulas are not saved, though.
    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 April 2023
    Alright. Thank you for this awesome explanation. Now it worked :)

    Edit: I must correct myself:
    [...]if I could also use my own image and text like Type: None[...]because cant use own image/text
    In the Override Content I can use my own images and text.

    Therefore I tested Type: Ability with a combatant that already know the ability, but the combatant cant research them. Then I changed to an ability which the combatant dont know and the combatant can learn it. So I think its not possible.

    But thats fine.
    Post edited by Tzunamii on
  • If you use a None type research item, you can still add any kind of content information to it. When editing the text (e.g. of the description), click on the small More button above the text area and select Data. There you can select all kinds of content information to add to the text, e.g. an ability's name or description.
    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.