Template:Attribute: Difference between revisions
Adding combined template for testing. |
m Added modifier |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<div style="display:inline-block; vertical-align:middle"><div style="display:table-row;"><div class="extimage32px" style="display:table-cell; vertical-align:middle;">{{#if: {{{Attribute|}}}|{{Attribute icon|{{{Attribute}}}}}{{Attribute label|{{{Attribute}}}}}|{{Attribute icon|{{{1|None}}}}}{{Attribute label|{{{1|None}}}}}}}</div><div style="display:table-cell"> </div><div style="display:table-cell; vertical-align:middle">{{{ | <div style="display:inline-block; vertical-align:middle"><div style="display:table-row;"><div class="extimage32px" style="display:table-cell; vertical-align:middle;"> | ||
{{#if: {{{Attribute|}}}|{{Attribute icon|{{{Attribute}}}}} {{Attribute label|{{{Attribute}}}}}|{{Attribute icon|{{{1|None}}}}} {{Attribute label|{{{1|None}}}}}}}</div> | |||
<div style="display:table-cell"> </div><div style="display:table-cell; vertical-align:middle">{{{2|Attribute bonus}}}</div></div></div><noinclude> | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 17:43, 7 August 2019
{{ #replace: http://cdn.projectgorgon.com/v461/icons/icon_4003.png | http://cdn.projectgorgon.com/v461/icons/icon_Error: Attribute not found.png | Error: Attribute not found }} {{ #replace:4003| http://cdn.projectgorgon.com/v461/icons/icon_Error: Attribute not found.png |
Error: Attribute not found }}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
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:Attribute/doc. (View all subpages of this page.)