Difference between revisions of "Template:EnemyAttributes"
Jump to navigation
Jump to search
(check for nonexisting enemy) |
(updated to RtR datastring) |
||
Line 8: | Line 8: | ||
--- Return value of the attribute specified by parameter, otherwise return zero --- | --- Return value of the attribute specified by parameter, otherwise return zero --- | ||
-->{{#switch: {{{1|}}} | -->{{#switch: {{{1|}}} | ||
|STR = {{#explode: {{#var:Datastring}}|;| | |STR = {{#explode: {{#var:Datastring}}|;|40}} | ||
|AGL = {{#explode: {{#var:Datastring}}|;| | |AGL = {{#explode: {{#var:Datastring}}|;|41}} | ||
|PRC = {{#explode: {{#var:Datastring}}|;| | |PRC = {{#explode: {{#var:Datastring}}|;|43}} | ||
|VIT = {{#explode: {{#var:Datastring}}|;| | |VIT = {{#explode: {{#var:Datastring}}|;|42}} | ||
|WIL = {{#explode: {{#var:Datastring}}|;| | |WIL = {{#explode: {{#var:Datastring}}|;|44}} | ||
|#default = 0 }}}}</includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude> | |#default = 0 }}}}</includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude> |
Latest revision as of 10:32, 27 February 2025
This template can be used to return an Enemy's attributes. It loads a given enemy's data from the respective Enemy data page and returns the selected attribute value.
Template requires at least one parameter - the attribute to return.
- STR
- AGL
- PRC
- VIT
- WIL
If you don't specify an attribute (or input something else), the template will always return zero.
Examples:
Enemy Pages
{{EnemyAttributes|AGL}}
On Ringleader_(Sword) page, returns the Agility of the Ringleader.
Outside of Enemy Pages
If you are on a wikipage that isn't an enemy page, the template also returns zero.
{{EnemyAttributes|AGL}}
0
You can specify a wikipage name of an enemy to load attributes from that enemy, for example:
{{EnemyAttributes|AGL|Ringleader (Sword)}}
This will return the Agility of Ringleader_(Sword).
18