[General] Autofill - the mathz

Level 4
Joined
Oct 13, 2016
Messages
44
Is there any way to integrate math formula based on level in the auto-fill WITHOUT using fields of data from the spell as a reference?
Let's say i have a spell that deals damage through trigger, based on spell-level.
Is there any way i can integrate simple formula such as {50+25*level}?
 
Level 3
Joined
Sep 25, 2021
Messages
30
What is autofill?

I guess that you may have to locate where the data of the spell is, if you dont want to get its level.

Using the level of the ability, you could make a trigger such as:
An unit starts effect of ability
->Set life of targeted unit to (you need to enter an arithmetic) life of targeted unit - 50 + 25 * level of ability.
 
Level 4
Joined
Oct 13, 2016
Messages
44
Ok, lemme pull some screenshots. Here.

Exibit A: spell that does something through trigger. I need to insert info about how damage depends on level of ability
1632609042191.png


Exibit B:
1632609375054.png
16 levels of this ability. For each, i need to have proper description of spell with values of damage, according to current level. Right now, i'm doing it manually.
I wonder if there's a way to place some formula, like ${40+20*level}, use auto-fill to replace word 'level' with actual level of ability (once again, from 1 to 16) and in the end make tooltip display just one number of damage (60 for level 1, 360 for level 16), not a formula.
 
Level 20
Joined
Sep 26, 2009
Messages
2,144
While this is not exactly what you are asking for, you have the option to change spells' tooltips via triggers (can be both - globally, or for specific unit).

  • Globally change description
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Ability - Set Extended Tooltip of Holy Light to ABCDEF for level 0
  • Change Description for specific unit
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Ability - Set Ability: (Unit: Paladin 0000 <gen>'s Ability with Ability Code: Holy Light)'s String Level Field: Tooltip - Normal - Extended ('aub1') of Level: 0 to ABC

Note:
  • In the trigger action the "level 0" is actually level 1 of the spell. So both triggers change description of level 1 Holy Light
  • If you want to change description of hero ability for specific unit, then you can only do that after the hero learns the spell (doesn't matter which level)
  • To my knowledge, there is no trigger action that let's you retrieve values set in object editor for the spell.
    • You either have to have
      • duplicate values (one in trigger, other in object editor)
      • have everything in triggers and during map initialization use trigger actions to globally change the spells values
 
Level 4
Joined
Oct 13, 2016
Messages
44
While this is not exactly what you are asking for, you have the option to change spells' tooltips via triggers (can be both - globally, or for specific unit).

  • Globally change description
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Ability - Set Extended Tooltip of Holy Light to ABCDEF for level 0
  • Change Description for specific unit
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Ability - Set Ability: (Unit: Paladin 0000 <gen>'s Ability with Ability Code: Holy Light)'s String Level Field: Tooltip - Normal - Extended ('aub1') of Level: 0 to ABC

Note:
  • In the trigger action the "level 0" is actually level 1 of the spell. So both triggers change description of level 1 Holy Light
  • If you want to change description of hero ability for specific unit, then you can only do that after the hero learns the spell (doesn't matter which level)
  • To my knowledge, there is no trigger action that let's you retrieve values set in object editor for the spell.
    • You either have to have
      • duplicate values (one in trigger, other in object editor)
      • have everything in triggers and during map initialization use trigger actions to globally change the spells values
Well, not quite what i need, you right, but useful and also pretty interesting. Thanks!
 
Level 13
Joined
Oct 16, 2010
Messages
714
I've used the trigger method to change ability stats while also updating the descriptions, however these weren't hero abilities and didn't have levels so a lot easier than a levelled spell.

In terms of your object editor idea, you could easily create a dummy abilty that has the same number of levels as your main ability, then you'd be able to reference that spell's stats rather than the one you are actually casting. You would be able to get all info including things like mana costs and cooldowns with this method.

Just note that if you where planning this for multiple abilities then the trigger method maybe more adised, just because with OE method you would have to have a duplicate dummy ability for every custom ability that you need to autofill
 
Top