Template:Attribute/doc: Difference between revisions
Jump to navigation
Jump to search
Added documentation for modifiers from items json |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 20: | Line 20: | ||
| Output | | Output | ||
|- | |- | ||
| {{ | | <nowiki>{{Attribute|BOOST_ABILITY_SURGECUT|+5}}</nowiki> | ||
| ⇒ | | ⇒ | ||
| {{Attribute|BOOST_ABILITY_SURGECUT|+5}} | | {{Attribute|BOOST_ABILITY_SURGECUT|+5}} | ||
| Line 29: | Line 29: | ||
| Output | | Output | ||
|- | |- | ||
| {{ | | <nowiki>{{Attribute|MAX_ARMOR|+15}}</nowiki> | ||
| ⇒ | | ⇒ | ||
| {{Attribute|MAX_ARMOR|+15}} | | {{Attribute|MAX_ARMOR|+15}} | ||
|} | |} | ||
== Notes == | == Notes == | ||
Do not place a * or : before the Attributes template. If you need to display a list of attribute, use a <nowiki><br></nowiki> tag after the first call of the template. | |||
<includeonly> | <includeonly> | ||
<!-- Categories/interwikis for the template itself --> | <!-- Categories/interwikis for the template itself --> | ||
Latest revision as of 23:11, 17 June 2021
Description
- Use this template whenever you want to display an Attribute from the Attributes JSON file (Treasure effect on an item)
- If you only want to display an Attribute icon, or use a larger image of the icon, use the Attribute icon template.
- If you only want to display an Attribute Label (what the attribute looks like in-game), use the Attribute label template.
Syntax
- Type {{Attribute|name|bonus}} where you want the Attribute icon, label, and modifier to display.
Parameters
- name
- The name of the Attribute as listed in the Attributes json.
- bonus
- The modifier found on the item.
- "{MAX_ARMOR}{15}", (From Basic Boots in items json) = {{Attribute|MAX_ARMOR|+15}}
Sample output
- Basic usage
Code = Output {{Attribute|BOOST_ABILITY_SURGECUT|+5}} ⇒ {{ #replace: http://cdn.projectgorgon.com/v461/icons/icon_3601.png | http://cdn.projectgorgon.com/v461/icons/icon_Error: Attribute not found.png | Error: Attribute not found }} {{ #replace:Surge Cut Damage| http://cdn.projectgorgon.com/v461/icons/icon_Error: Attribute not found.png |
Error: Attribute not found }}+5
Code = Output {{Attribute|MAX_ARMOR|+15}} ⇒ {{ #replace: http://cdn.projectgorgon.com/v461/icons/icon_101.png | http://cdn.projectgorgon.com/v461/icons/icon_Error: Attribute not found.png | Error: Attribute not found }} {{ #replace:Max Armor| http://cdn.projectgorgon.com/v461/icons/icon_Error: Attribute not found.png |
Error: Attribute not found }}+15
Notes
Do not place a * or : before the Attributes template. If you need to display a list of attribute, use a <br> tag after the first call of the template.