Difference between revisions of "Template:TraitAbility"

From Holdfast: Nations At War
Jump to navigation Jump to search
(Initial template for traits and abilities)
 
m (Testing Cargo)
Line 2: Line 2:
 
Used to create a single row detailing a trait / ability
 
Used to create a single row detailing a trait / ability
  
It'd be great to drive this with ParserFunctions and one of the simple data extensions like Cargo, External Data or Semantic MediaWiki so we can update in one place
+
 
 +
{{#cargo_declare:_table=TraitAbility|Type=String (allowed values=Trait,Ability;mandatory)|Enum=String (mandatory;unique)|Name=String|Description=Wikitext string (size=500)}}
 +
 
 +
Usage:
 +
<pre>{{TraitAbility|type=Trait/Ability|enum=Enum of Ability|name=Friendly name|description=Text description of ability}}</pre>
 +
 
 
</noinclude>
 
</noinclude>
 
<includeonly>
 
<includeonly>
 +
{{#cargo_store:
 +
_table=TraitAbility
 +
|Type={{type|Trait}}
 +
|Enum={{enum|Blank}}
 +
|Name={{name|Unknown}}
 +
|Description=={{description|Unknown Trait}}
 +
}}
 +
 
{| class=wikitable
 
{| class=wikitable
 
|-
 
|-
| <!-- Icon --> style="width: 250px" [[File:Trait_{{{ trait |blank }}}]]
+
| <!-- Icon --> style="width: 100px" [[File:{{{type}}}_{{{ enum|blank }}}]]
 
| <!-- Name --> style="width: 350px" {{{ name }}}
 
| <!-- Name --> style="width: 350px" {{{ name }}}
 
| <!-- Description --> style="width: 500px" {{{ description }}}
 
| <!-- Description --> style="width: 500px" {{{ description }}}
 
|}
 
|}
 
</includeonly>
 
</includeonly>

Revision as of 17:35, 15 August 2019

Used to create a single row detailing a trait / ability


{{#cargo_declare:_table=TraitAbility|Type=String (allowed values=Trait,Ability;mandatory)|Enum=String (mandatory;unique)|Name=String|Description=Wikitext string (size=500)}}

Usage:

{{TraitAbility|type=Trait/Ability|enum=Enum of Ability|name=Friendly name|description=Text description of ability}}