I have abilities that reduces research cost for certain ability types, and I'm having trouble making this as a research formula cost, since I don't have access to the ability being researched in the formula.

Looking at the code briefly, I see that the Combatant is passed in as both the user and target for the formula, but I'm wondering if there is a way to access the research item or the ability into the formula as well.
  • You'll need to set up separate formulas if you want to have ability type specific stuff in there.
    In the formula itself, you can e.g. use a Select Ability node to get abilities from the user and use e.g. their variables.
    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!
  • Ability type isn’t the problem, I can write a node for that. The problem is unable to select the ability itself in a research item cost formula. So I can’t compare its type at all.

    Ended up circumventing research cost altogether with custom menu part, which checks the cost before research and deducts cost after.

    It works so yay :’)
  • What I meant was that you'd need to set up a formula per research item that uses an ability that needs a special calculation.
    E.g. if you want per ability type cost calculations, you'd need to set up a formula for each type separately and use the formula for research items using abilities of that type.
    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!
  • Ah, that also works :p would be a bit annoying to do in my case since my abilities can have multiple ability types and cost reduction formula would need to check all combinations of them :’)
Sign In or Register to comment.