Difference between revisions of "Template:Autoinfobox zkunit"

From Zero-K
Jump to navigation Jump to search
m (Undo revision 9325 by Histidine (talk))
Tag: Undo
(Undo revision 9857 by RandomX (talk) ...because it doesn't work.)
Tag: Undo
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>[[Category:ZK Infoboxes]]</noinclude>
+
<includeonly>{{ Infobox zkunit
<includeonly>
 
{{ Infobox zkunit
 
 
<!-- Required fields -->
 
<!-- Required fields -->
 
|defname = {{{defname}}}
 
|defname = {{{defname}}}
Line 8: Line 6:
 
|unitname =  
 
|unitname =  
 
|description = {{{description|{{#invoke:UnitData|getData|{{{defname}}}|description}}}}}
 
|description = {{{description|{{#invoke:UnitData|getData|{{{defname}}}|description}}}}}
|image = {{{image|http://manual.zero-k.info/unitpics/{{{defname}}}.png}}}
+
|image = {{{image|{{{defname}}}}}}
 
|icontype = {{{icontype|{{#invoke:UnitData|getData|{{{defname}}}|icontype}}}}}
 
|icontype = {{{icontype|{{#invoke:UnitData|getData|{{{defname}}}|icontype}}}}}
 
|cost = {{{cost|{{#invoke:UnitData|getData|{{{defname}}}|cost}}}}}
 
|cost = {{{cost|{{#invoke:UnitData|getData|{{{defname}}}|cost}}}}}
Line 22: Line 20:
 
|gridlink = {{{gridlink|{{#invoke:UnitData|getData|{{{defname}}}|gridlink}}}}}
 
|gridlink = {{{gridlink|{{#invoke:UnitData|getData|{{{defname}}}|gridlink}}}}}
  
|abilities = {{{weapons|{{#invoke:UnitData|printAbilityInfoboxes|{{{defname}}}|true}} }}}
+
|abilities = {{{abilities|{{#invoke:UnitData|printAbilityInfoboxes|{{{defname}}}|true}} }}}
 
|weapons = {{{weapons|{{#invoke:UnitData|printWeaponInfoboxes|{{{defname}}}|true}} }}}
 
|weapons = {{{weapons|{{#invoke:UnitData|printWeaponInfoboxes|{{{defname}}}|true}} }}}
}}
+
}}</includeonly>
</includeonly>
 
 
<noinclude>
 
<noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Please add categories and interwiki links to /doc subpage, not here! -->
 
<!-- Please add categories and interwiki links to /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Latest revision as of 21:21, 2 September 2024


Template documentation[view] [edit] [history] [purge]

This template uses Module:UnitData to autogenerate unit infoboxes, transcluding and filling in Template:Infobox zkunit data from Module:UnitData/data. Specific tags can be overridden by manually specifying them, if necessary.

Example usage:

{{Autoinfobox zkunit
|defname=striderdetriment
|name=Name override
}}

The module can also be invoked directly without this template to generate an infobox (note that output may not be identical in some cases; observed with automatic detection of buildpic on Reef):

{{#invoke:UnitData|printInfobox|defname=striderdetriment|name=Name override}}

When invoking from module, defname may be passed as an anonymous parameter instead.

For more information, see the module page.