Template:Infobox game mechanic/doc: Difference between revisions

From SlyMods
Jump to navigation Jump to search
Content added Content deleted
(Created template documentation)
 
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}

Use this template to add an [[Template:Infobox|Infobox]] to an article for a game mechanic.
Use this template to add an [[Template:Infobox|Infobox]] to an article for a game mechanic.


== Usage ==
== Usage ==
The template supports the following parameters.
The template supports the following parameters.
* title - Optional, default is the full page name
* <tt>name</tt> - The title above the infobox. Default is the full page name.
* image - Optional, an image representing the game mechanic
* <tt>image</tt> - An image to be displayed in the infobox. Default is {{tl|No image}}.
* Use the fill image syntax, eg. <nowiki>[[File:Sly 1 jt void zap.png]]</nowiki>
** Use '''just the name of the image''', eg. {{Color|limegreen|<nowiki>File:ITM anticrack firewall.png</nowiki>}}, not {{Color|red|<nowiki>[[File:ITM anticrack firewall]]</nowiki>}}
* <tt>caption</tt> - The caption below the image.
* official - Can by `y` or `n`. Denotes whether the title is the official name for the game mechanic.
* <tt>width</tt> - Width of the image/infobox body. Default is 360px.
* sly1=y - Adds the article to [[:Category:Game mechanics in Sly 1]]

* sly2=y - Adds the article to [[:Category:Game mechanics in Sly 2]]
== Template data ==
* sly3=y - Adds the article to [[:Category:Game mechanics in Sly 3]]
{{TemplateData header}}
<templatedata>
{
"params": {
"width": {},
"name": {
"type": "string"
},
"image": {
"type": "wiki-file-name"
},
"caption": {
"type": "string"
}
},
"description": "An infobox for use on game mechanic articles.",
"paramOrder": [
"name",
"image",
"caption",
"width"
]
}
</templatedata>


== Examples ==
== See also ==
{{Infobox game mechanic
* {{tl|Infobox data structure}}
* {{tl|Infobox subsystem}}
| title= Difficulty
* {{tl|Infobox map}}
| official= y
* {{tl|Infobox mod}}
| sly1= y
}}


<includeonly>
{{Infobox game mechanic
[[Category:SlyMods templates]]
| title= Damage
</includeonly>
| official= n
| sly2= y
| sly3= y
}}

Latest revision as of 18:20, 3 August 2022

Use this template to add an Infobox to an article for a game mechanic.

Usage

The template supports the following parameters.

  • name - The title above the infobox. Default is the full page name.
  • image - An image to be displayed in the infobox. Default is {{No image}}.
    • Use just the name of the image, eg. File:ITM anticrack firewall.png, not [[File:ITM anticrack firewall]]
  • caption - The caption below the image.
  • width - Width of the image/infobox body. Default is 360px.

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Infobox game mechanic

An infobox for use on game mechanic articles.

Template parameters

ParameterDescriptionTypeStatus
namename

no description

Stringoptional
imageimage

no description

Fileoptional
captioncaption

no description

Stringoptional
widthwidth

no description

Unknownoptional

See also