Would an ability (spell) which requires an event to calculate "use Cost" be able to execute that event,(to generate the correct useCost) and also set an ability modifier before the ability (the spell) is calculated.

'less hypothetical'
Using a spell slot system.
So for a Level One spell cast (ability)
The spell requires a Level One Spell slot to cast (useCost)
However, if no Level One spell slot is available, the user can 'overcast' by using higher level Spell Slots (2,3,4,etc.)
If 'overcast' occurs, using a level slot higher than level one the spell then incurs increased effects over the default level.

So, in practice if a user calls the spell (Level one) but has exhausted Level One slots, the useCost event checks for incremental (higher) spell slot availability (check level two, then check level three, then check level four, etc.)
If any 'overcast' opportunity exists then the spell is cast and the appropriate (higher) spell slot is consumed.

The primary question is, if 'overcast' sets an overcast variable, (user consumed a 'Level Three' slot for 'Level One' spell, can that variable [+2] be used/seen/accessed (Global variable) by the original spell to increase effects/power?

Or does the useCost framework occur after or outside of the spell effect itself?
  • The game events you can use in status changes (like use costs) are only used when actually calculating/using the costs, i.e. whatever you do in them doesn't affect any use cost display or would allow using the ability if the current slot's costs don't allow using it. You can work around that by setting up the use costs for all slots and use conditions in formulas to manage which one are actually used, e.g. slot 2 would check if slot 1 is available and set the outcome to 0 in that case.

    Other than that, your system should be doable and the use costs are always calculated before any other target (or user) changers. Depending on your Auto Consume settings this e.g. happens when selecting the ability, starting to perform it or when the outcome is calculated.
    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.