Template talk:Ability

From Dota 2 Wiki
Jump to: navigation, search

Cargo query problems[edit]

It seems like the way we are handling talent values in this template won't work with Cargo. When storing a value, that is generated by querying another value stored by the same template, Cargo always stores <em>No results</em> instead of that new value (it gets displayed correctly on the page though). See my idea for a solution below:

Possible fix: Setting variables for each value and accessing those variables instead of querying Cargo.

  • Example:
    • Before: {{calc|v1+{{show|T|Ancient Apparition|talent3right_value}}/100|v1={{show|A|Ancient Apparition|Ice Vortex|value3}}|%}}
    • After: {{calc|v1+{{show|T|Ancient Apparition|talent3right_value}}/100|v1={{#var:Ancient Apparition#Ice Vortex#value3}}|%}}
  • Advantages:
    • Good performance
    • Does not introduce any additional syntax/templates
  • Disadvantages:
    • Values can only be accessed after they are set (e.g. they can't be used in the ability description).

This is obviously not ideal, and if anyone has a better idea, please let me know. --Litzsch 08:56, 27 April 2018 (UTC)

Update: It's worse that I initially thought; the problems don't seem to be limited to values stored by the same template, but also affect other values stored on the same page. I think (needs more testing) all values stored by the same template and below it are affected. --Litzsch 09:09, 27 April 2018 (UTC)
Is Lua error: Expression error: Unexpected < operator.. the same problem? --Elite stay (talk) 13:20, 30 April 2018 (UTC)
Yes. It's due to Module:Calculate getting <em>No results</em> as one of it's parameters and the passing that to the #expr parser function. --Litzsch 13:48, 30 April 2018 (UTC)

var order[edit]

Items like Guardian Greaves icon.png Guardian Greaves have error with the cooldown. --Elite stay (talk) 12:17, 23 June 2019 (UTC)

I don't see any issue with the page. Can you describe further? -- Sanhard 17:48, 23 June 2019 (UTC)
I think that it's "-1". Medok 17:56, 23 June 2019 (UTC)
Yeah, that's caused by "Order of Evaluation" of template parameters when variables are being initialised. Should be resolved. -- Sanhard 13:21, 24 June 2019 (UTC)

Instant attack and instant kill under damagetype[edit]

Instant attack and instant kill should be addedas options under damagetype, together with magical/physical/pure.

There are a lot of spell that use instant attack, and quite a few instantly killing effects. Right now, we use physical for instant attacks, and hp removal for instant kill effects, which are both technically wrong (attacs can be magical and pure, too, and instant kill is not the same as hp removal). As for colors, maybe green for instant attacks and purple for instant kills~~ Bu3ny (talk) 23:19, 24 August 2019 (UTC)

Could you add explanations in Damage types so that the links work when added to the template? Thanks -- Sanhard 08:07, 25 August 2019 (UTC)
Link instant attack to Attack damage#Instant attacks, and instant death to Damage types#Instant kill. ~~ Bu3ny (talk) 10:52, 25 August 2019 (UTC)