Difference between revisions of "Template:TraitAbility"

From Holdfast: Nations At War
Jump to navigation Jump to search
m (Updated to be driven by sub-template data)
m (Fixed the image size, and the documentation)
Line 5: Line 5:
  
 
Usage:
 
Usage:
<pre>{{TraitAbility|enum=Enum of Ability|style=TBC|width=TBC}}</pre>
+
<pre>{{TraitAbility|enum=Enum of Ability}</pre>
  
{{TraitAbility|enum=AbleSwimmer|style=TBC|width=TBC}}
+
e.g.
 +
<pre>{{TraitAbility|enum=AbleSwimmer}</pre>
 +
{{TraitAbility|enum=AbleSwimmer}}
  
Note that this is now driven by sub-templates of the data:
+
This is driven by sub-templates for the data used (these also feed other uses of trait/ability data).  The Trait image is resized to 55x55px and should be named Trait_[enum].png, replacing [enum] with the name of the trait.
 
<pre>
 
<pre>
 
{{TraitAbility/Type|AbleSwimmer}}
 
{{TraitAbility/Type|AbleSwimmer}}
Line 16: Line 18:
 
</pre>
 
</pre>
  
{{TraitAbility/Type|AbleSwimmer}}
+
[[Template:TraitAbility/Type|{{TraitAbility/Type|AbleSwimmer}}]]
  
{{TraitAbility/Name|AbleSwimmer}}
+
[[Template:TraitAbility/Name|{{TraitAbility/Name|AbleSwimmer}}]]
  
{{TraitAbility/Description|AbleSwimmer}}
+
[[Template:TraitAbility/Description|{{TraitAbility/Description|AbleSwimmer}}]]
  
 
</noinclude>
 
</noinclude>
Line 27: Line 29:
 
{| class=wikitable style="margin-bottom:0px;margin-top:0px"
 
{| class=wikitable style="margin-bottom:0px;margin-top:0px"
 
|-
 
|-
| style="width: 100px;text-align: center" | [[File:{{TraitAbility/Type|{{{enum}}}}}_{{{ enum|blank }}}.png]]
+
| style="width: 100px;text-align: center" | [[File:{{TraitAbility/Type|{{{enum}}}}}_{{{ enum|blank }}}.png|55x55px]]
 
| style="width: 350px" | {{TraitAbility/Name|{{{enum}}}}}
 
| style="width: 350px" | {{TraitAbility/Name|{{{enum}}}}}
 
| style="width: 500px" | {{TraitAbility/Description|{{{enum}}}}}
 
| style="width: 500px" | {{TraitAbility/Description|{{{enum}}}}}
 
|}</includeonly>
 
|}</includeonly>

Revision as of 19:22, 22 February 2020

Used to create a single row detailing a trait / ability


Usage:

{{TraitAbility|enum=Enum of Ability}

e.g.

{{TraitAbility|enum=AbleSwimmer}


Trait AbleSwimmer.png Able Swimmer Lightly equipped. Your swimming speed is increased by 35%.

This is driven by sub-templates for the data used (these also feed other uses of trait/ability data). The Trait image is resized to 55x55px and should be named Trait_[enum].png, replacing [enum] with the name of the trait.

{{TraitAbility/Type|AbleSwimmer}}
{{TraitAbility/Name|AbleSwimmer}}
{{TraitAbility/Description|AbleSwimmer}}

Trait

Able Swimmer

Lightly equipped. Your swimming speed is increased by 35%.