Template:Technology box: Difference between revisions
+requires |
added template params; support for any boolean for "stack"; auto value 0 for "stack" to enable checkbox in visual editor; +C:Template starter-kit |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{stack|}}}|yes|<div style="display:inline-block; vertical-align:top; margin:5px;">}} | <includeonly>{{#ifeq:{{yesno|{{{stack|}}}}}|yes|<div style="display:inline-block; vertical-align:top; margin:5px;">}} | ||
{| class="wikitable" | {| class="wikitable" | ||
{{#if:{{{color|}}}| | {{#if:{{{color|}}}| | ||
Line 43: | Line 43: | ||
{{!}}-}} | {{!}}-}} | ||
|} | |} | ||
{{#ifeq:{{{stack|}}}|yes|</div>}}</includeonly> | {{#ifeq:{{yesno|{{{stack|}}}}}|yes|</div>}}</includeonly> | ||
<noinclude> | <noinclude> | ||
{{doc}} | {{doc}} | ||
[[Category:Info templates]] | [[Category:Info templates]] | ||
</noinclude> | [[Category:Template starter-kit]] | ||
<templatedata> | |||
{ | |||
"params": { | |||
"stack": { | |||
"label": "Stack?", | |||
"description": "If fed \"yes\", allows multiple technology boxes to sit in the same line, rather than all boxes being one below the other. ", | |||
"type": "line", | |||
"suggestedvalues": [ | |||
"yes", | |||
"no" | |||
], | |||
"default": "no", | |||
"autovalue": "0", | |||
"suggested": true | |||
}, | |||
"color": { | |||
"label": "Color", | |||
"description": "The hexadecimal code for the color of the header bar. Overrides \"discipline\" parameter. Do not prepend a \"#\".", | |||
"example": "EEAC34", | |||
"type": "line", | |||
"suggested": true | |||
}, | |||
"discipline": { | |||
"label": "Discipline", | |||
"description": "The discipline of the technology. Feeding Industry, Arsenal, Experimental, or CS will make the color of the header bar match the discipline. This behavior can be overridden with \"color\" parameter.", | |||
"type": "line", | |||
"suggestedvalues": [ | |||
"Industry", | |||
"Arsenal", | |||
"Experimental", | |||
"CS" | |||
], | |||
"required": true | |||
}, | |||
"name": { | |||
"label": "Name", | |||
"description": "The name of the technology. Please match the capitalization and spelling used in-game.", | |||
"example": "Ripley APLU, H.O.N.K. Mech", | |||
"type": "line", | |||
"required": true | |||
}, | |||
"image": { | |||
"label": "Image", | |||
"description": "The filename of an image to accompany the technology name, preferably the one used in-game. DO NOT prepend the file namespace (File:). ", | |||
"type": "wiki-file-name", | |||
"suggested": true | |||
}, | |||
"tier": { | |||
"label": "Tier", | |||
"description": "The tier of the technology (1, 2, or 3). ", | |||
"type": "number", | |||
"suggestedvalues": [ | |||
"1", | |||
"2", | |||
"3" | |||
], | |||
"required": true | |||
}, | |||
"cost": { | |||
"label": "Cost", | |||
"description": "The cost of the technology.", | |||
"example": "7500", | |||
"type": "number", | |||
"required": true | |||
}, | |||
"requires": { | |||
"label": "Requires", | |||
"description": "The technologies required prior to researching the current one. Use a bullet list, separate with new lines.", | |||
"example": "* Uranium Munitions * Advanced Riot Control", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"unlocks": { | |||
"label": "Unlocks", | |||
"description": "The items unlocked by this technology, in bullet list form. It's highly suggested you use the {{Item}} template. ", | |||
"example": "* {{item|high-capacity power cell|cap=1}} * {{item|Turbo recharger machine board|cap=1}} * {{item|advanced SMES machine board|cap=1}}", | |||
"type": "string", | |||
"required": true | |||
} | |||
}, | |||
"description": "A simple template to display information about technologies, mostly for the Science article, made as a replacement for the current usage of {{Callout}}.", | |||
"paramOrder": [ | |||
"name", | |||
"image", | |||
"tier", | |||
"discipline", | |||
"cost", | |||
"requires", | |||
"unlocks", | |||
"color", | |||
"stack" | |||
] | |||
} | |||
</templatedata></noinclude> |
Revision as of 05:51, 5 July 2025
A simple template to display information about technologies, mostly for the Science article, made as a replacement for the current usage of {{Callout}}
.
Do not substitute this template.
Parameter | Definition |
---|---|
name |
The name of the technology. Please match the capitalization and spelling used in-game (e.g., Ripley APLU, H.O.N.K. Mech). |
image |
The filename of an image to accompany the technology name, preferably the one used in-game. Do not prepend the file namespace (File: ).
|
tier |
The tier of the technology (1, 2, or 3). |
discipline |
The discipline of the technology. Feeding Industry , Arsenal , Experimental , or CS will make the color of the header bar match the discipline. This behavior can be overridden with color .
|
cost |
The cost of the technology. |
requires |
The technologies required prior to researching the current one. |
unlocks |
The items unlocked by this technology, in list form. It's highly suggested you use the {{Item}} template.
|
color |
The hexadecimal code for the color of the header bar. Overrides discipline . Do not prepend a # .
|
stack |
If fed yes , allows multiple technology boxes to sit in the same line, rather than all boxes being one below the other.
|
An example
The following code...
{{Technology box
|name = Advanced Powercells
|image = Turbo recharger-East-34323.png
|tier = 1
|discipline = Industrial
|cost = 7500
|unlocks =
* {{item|high-capacity power cell|cap=1}}
* {{item|Turbo recharger machine board|cap=1}}
* {{item|advanced SMES machine board|cap=1}}
}}
...outputs this:
A simple template to display information about technologies, mostly for the Science article, made as a replacement for the current usage of {{Callout}}.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Name | name | The name of the technology. Please match the capitalization and spelling used in-game.
| Line | required |
Image | image | The filename of an image to accompany the technology name, preferably the one used in-game. DO NOT prepend the file namespace (File:). | File | suggested |
Tier | tier | The tier of the technology (1, 2, or 3).
| Number | required |
Discipline | discipline | The discipline of the technology. Feeding Industry, Arsenal, Experimental, or CS will make the color of the header bar match the discipline. This behavior can be overridden with "color" parameter.
| Line | required |
Cost | cost | The cost of the technology.
| Number | required |
Requires | requires | The technologies required prior to researching the current one. Use a bullet list, separate with new lines.
| String | suggested |
Unlocks | unlocks | The items unlocked by this technology, in bullet list form. It's highly suggested you use the {{Item}} template.
| String | required |
Color | color | The hexadecimal code for the color of the header bar. Overrides "discipline" parameter. Do not prepend a "#".
| Line | suggested |
Stack? | stack | If fed "yes", allows multiple technology boxes to sit in the same line, rather than all boxes being one below the other.
| Line | suggested |