Template:Attribute/doc: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
Adding documentation. Now to fix bugs.
 
Added documentation for modifiers from items json
Line 5: Line 5:


== Syntax ==
== Syntax ==
:Type <nowiki>{{Attribute|name}}</nowiki> where you want the Attribute icon and label to display.
:Type <nowiki>{{Attribute|name|bonus}}</nowiki> where you want the Attribute icon, label, and modifier to display.


== Parameters ==
== Parameters ==
; name
; name
: The name of the Attribute as listed in the Attributes json.
: The name of the Attribute as listed in the Attributes json.
 
: bonus
: The modifier found on the item.
: <nowiki>"{MAX_ARMOR}{15}",</nowiki> (From Basic Boots in items json) = <nowiki>{{Attribute|MAX_ARMOR|+15}}</nowiki>
== Sample output ==
== Sample output ==
;Basic usage
;Basic usage
Line 18: Line 20:
| Output
| Output
|-
|-
| {{tlc|Attribute|BOOST_ABILITY_SURGECUT}}
| {{tlc|Attribute|BOOST_ABILITY_SURGECUT|+5}}
| &rArr;
| {{Attribute|BOOST_ABILITY_SURGECUT|+5}}
|}
:{| class="wikitable"
| Code
| {{=}}
| Output
|-
| {{tlc|Attribute|MAX_ARMOR|+15}}
| &rArr;
| &rArr;
| {{Attribute|BOOST_ABILITY_SURGECUT}}
| {{Attribute|MAX_ARMOR|+15}}
|}
|}
== Notes ==
== Notes ==

Revision as of 17:49, 7 August 2019

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
Template:Tlc

{{ #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
Template:Tlc

{{ #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