How to make damage values not be affected by spell amp in tooltips.

edited July 2017 in General

So I'm not sure where to put this, cuz its not really a tutorial. I've not seen this stated before but thought I would let people know.

So, to my knowledge, if you have an ability that deals damage, but you don't have the damage being amped, and you don't want the tooltip damage values to showcase the amped damage; you'll need to create an ability special and not use the default damage ability tag. Generally speaking naming the new ability special as damage makes sense, or some other variation of damage, but in this instance you'll want to avoid using "damage" as a way to describe well...damage.

For example I have an ability that deals damage to enemies and deals damage to allies. Say we want the damage done to enemies to be amped, we can just use the default damage tag. If, however, we don't want spell amp to affect the ally damage, then we would have to write a script to subtract health. Simple and easy, but you'll probably notice, if you named the ability special for the damage done to allies as damage_something, the damage done to allies looks, on the tooltip, like its being amped even though it actually isn't. A very simple solution is to simply rename damage_something to something_something.

I could be wrong on this but it seems to work for me, which makes me think that the engine looks for a damage string for spell amp.


  • Posts: 272

    You are right. Dota detects strings that contains the word "damage" and automatically calculates spell amped damage. There is something you should know: If you don't want to change the name of your ability special you can use CalculateSpellDamageTooltip like this:

       "var_type"                     "FIELD_INTEGER"
       "damage_something"             "10"
       "CalculateSpellDamageTooltip"  "0"

    Another use of CalculateSpellDamageTooltip is to force dota to calculate spell amped value of the ability special that doesn't contain "damage" in its name/string like this:

       "var_type"                      "FIELD_INTEGER"
       "health_drain"                  "60 90 120 150"
       "CalculateSpellDamageTooltip"   "1"
  • Posts: 71

    :O i never knew that! Thank you!