Template:Infobox/sandbox: Difference between revisions
What if the icon doesn't link? It never knew why it did that anyway, we're already on that page |
Replaced item/parsing with lua |
||
Line 64: | Line 64: | ||
{{Translation|Normal mode}}= | {{Translation|Normal mode}}= | ||
<table> | <table> | ||
{{Infobox/vrow |Cost |{{{cost|}}} |{{ | {{Infobox/vrow |Cost |{{{cost|}}} |{{#invoke:Infobox|item_parsing|{{{cost|}}} }} {{#if: {{{cost-multiplier|}}}|✖ <big>{{{cost-multiplier|}}}</big>}} }} | ||
</table> | </table> | ||
\-\ | \-\ | ||
{{Translation|Expensive mode}}= | {{Translation|Expensive mode}}= | ||
<table> | <table> | ||
{{Infobox/vrow |Cost |{{{cost|}}} |{{ | {{Infobox/vrow |Cost |{{{cost|}}} |{{#invoke:Infobox|item_parsing|{{{cost|}}} }} ✖ <big>{{{expensive-cost-multiplier|}}}</big>}} | ||
</table> | </table> | ||
</tabber> | </tabber> | ||
Line 77: | Line 77: | ||
{{Translation|Normal mode & expensive mode}}= | {{Translation|Normal mode & expensive mode}}= | ||
<table> | <table> | ||
{{Infobox/vrow |Cost |{{{cost|}}} |{{ | {{Infobox/vrow |Cost |{{{cost|}}} |{{#invoke:Infobox|item_parsing|{{{cost|}}} }} {{#if: {{{cost-multiplier|}}}|✖ <big>{{{cost-multiplier|}}}</big>}} }} | ||
</table> | </table> | ||
</tabber> | </tabber> | ||
Line 116: | Line 116: | ||
{{Infobox/row |Durability |{{{durability|}}} }} | {{Infobox/row |Durability |{{{durability|}}} }} | ||
{{Infobox/row |Magazine size |{{{magazine-size|}}} }} | {{Infobox/row |Magazine size |{{{magazine-size|}}} }} | ||
{{Infobox/row |Ammunition |{{{ammunition|}}} |{{ | {{Infobox/row |Ammunition |{{{ammunition|}}} |{{#invoke:Infobox|item_parsing|{{{ammunition}}} }} }} | ||
{{Infobox/vrow |Used as ammunition by |{{{used-as-ammo-by|}}} |{{ | {{Infobox/vrow |Used as ammunition by |{{{used-as-ammo-by|}}} |{{#invoke:Infobox|item_parsing|{{{used-as-ammo-by}}} }} }} | ||
{{Infobox/row |Efficiency |{{{efficiency|}}} }} | {{Infobox/row |Efficiency |{{{efficiency|}}} }} | ||
{{Infobox/row |Dimensions |{{{dimensions|}}} }} | {{Infobox/row |Dimensions |{{{dimensions|}}} }} | ||
Line 124: | Line 124: | ||
{{Infobox/row |Robot recharge rate |{{{robot-recharge-rate|}}} |{{Type|{{{robot-recharge-rate}}} }} }} | {{Infobox/row |Robot recharge rate |{{{robot-recharge-rate|}}} |{{Type|{{{robot-recharge-rate}}} }} }} | ||
{{Infobox/row |Internal buffer recharge rate|{{{internal-buffer-recharge-rate|}}}|{{Type|{{{internal-buffer-recharge-rate}}} }} }} | {{Infobox/row |Internal buffer recharge rate|{{{internal-buffer-recharge-rate|}}}|{{Type|{{{internal-buffer-recharge-rate}}} }} }} | ||
{{Infobox/vrow |Placed in |{{{equipped-in|}}} |{{ | {{Infobox/vrow |Placed in |{{{equipped-in|}}} |{{#invoke:Infobox|item_parsing|{{{equipped-in}}} }} }} | ||
{{Infobox/row |Robot limit |{{{robot-limit|}}} }} | {{Infobox/row |Robot limit |{{{robot-limit|}}} }} | ||
{{Infobox/row |Repair speed |{{{repair-speed|}}} }} | {{Infobox/row |Repair speed |{{{repair-speed|}}} }} | ||
Line 156: | Line 156: | ||
{{Infobox/row |Prototype type |{{{prototype-type|}}} |{{Prototype page|{{{prototype-type}}}}} }} | {{Infobox/row |Prototype type |{{{prototype-type|}}} |{{Prototype page|{{{prototype-type}}}}} }} | ||
{{Infobox/row |Internal name |{{{internal-name|}}} }} | {{Infobox/row |Internal name |{{{internal-name|}}} }} | ||
{{Infobox/vrow |Accepted equipment |{{{equipment|}}} |{{ | {{Infobox/vrow |Accepted equipment |{{{equipment|}}} |{{#invoke:Infobox|item_parsing|{{{equipment}}} }} }} | ||
{{Infobox/vrow |Required technologies |{{{required-technologies|}}} |{{Technology/parsing/sandbox|{{{required-technologies}}}|color=228B22}} |{{Translation|None required}}}} | {{Infobox/vrow |Required technologies |{{{required-technologies|}}} |{{Technology/parsing/sandbox|{{{required-technologies}}}|color=228B22}} |{{Translation|None required}}}} | ||
{{Infobox/vrow |Allows |{{{allows|}}} |{{Technology/parsing/sandbox|{{{allows}}}|color=228B22}} }} | {{Infobox/vrow |Allows |{{{allows|}}} |{{Technology/parsing/sandbox|{{{allows}}}|color=228B22}} }} | ||
{{Infobox/vrow |Effects |{{{effects|}}} |{{ | {{Infobox/vrow |Effects |{{{effects|}}} |{{#invoke:Infobox|item_parsing|{{{effects}}} }} }} | ||
{{Infobox/vrow |Boosting technologies |{{{boosting-technologies|}}} |{{Technology/parsing/sandbox|{{{boosting-technologies}}}|color=228B22}} }} | {{Infobox/vrow |Boosting technologies |{{{boosting-technologies|}}} |{{Technology/parsing/sandbox|{{{boosting-technologies}}}|color=228B22}} }} | ||
{{Infobox/vrow |Produced by |{{{producers|}}} |{{ | {{Infobox/vrow |Produced by |{{{producers|}}} |{{#invoke:Infobox|item_parsing|{{{producers}}} }} }} | ||
{{Infobox/vrow |Consumed by |{{{consumers|}}} |{{ | {{Infobox/vrow |Consumed by |{{{consumers|}}} |{{#invoke:Infobox|item_parsing|{{{consumers}}} }} }} | ||
{{Infobox/vrow |Valid fuel |{{{valid-fuel|}}} |{{ | {{Infobox/vrow |Valid fuel |{{{valid-fuel|}}} |{{#invoke:Infobox|item_parsing|{{{valid-fuel}}} }} }} | ||
{{Infobox/vrow |Used as fuel by |{{{used-as-fuel-by|}}} |{{ | {{Infobox/vrow |Used as fuel by |{{{used-as-fuel-by|}}} |{{#invoke:Infobox|item_parsing|{{{used-as-fuel-by}}} }} }} | ||
{{Infobox/extra|{{{extra2|}}} }} | {{Infobox/extra|{{{extra2|}}} }} | ||
</table> | </table> | ||
Line 176: | Line 176: | ||
{{Documentation}} | {{Documentation}} | ||
{{Infobox/sandbox | {{Infobox/sandbox | ||
| | |prototype-type = technology | ||
| | |internal-name = railway | ||
| | |expensive-cost-multiplier = 300 | ||
| | | category = Technology | ||
| | |cost = Time, 30 + Automation science pack, 1 + Logistic science pack, 1 | ||
|required-technologies= | | cost-multiplier = 75 | ||
| | | required-technologies = Engine + Logistics 2, 2 | ||
| | |allows = Automated rail transportation + Braking force + Fluid wagon + Production science pack | ||
| effects = Cargo wagon + Locomotive + Rail | |||
}} | }} | ||
</noinclude> | </noinclude> |
Revision as of 17:22, 1 October 2024
[View] [Edit] [Page history]
DocumentationThis template is designed to be used to describe an item or machine, using a box of info.
This template uses functions from Module:Infobox.
Usage
To use, create a page in the infobox namespace by prepending Infobox: to the page you are trying to add an infobox to, so that the new pages is called Infobox:(whatever the page name is). Then, on the page, add the line {{:Infobox:Page_name}}
. This will "copy" the infobox you create on Infobox:... to the page itself. Of course, replace Page_name with the name of the page.
As for the infobox on Infobox:..., start with the line: {{Infobox
. Then, on the next few lines, start with the pipe character, |, then place a parameter, and set it equal to the value you wish it to be. Then, end the parameter lines with two curly-brackets. "}}", and the line <noinclude>[[Category:Infobox page]]</noinclude>
.
Example working box:
{{Infobox |category = Logistics |health=100 |stack-size=50 |wire-reach=9 |supply-area=7×7 |recipe=Time, 0.5 + Steel plate, 2 + Copper plate, 2 |required-technologies=Electric energy distribution 1 |producers=Player + Assembling machine }} <noinclude>[[Category:Infobox page]]</noinclude>
Additionally, the infobox will automatically translate. Just "copy" the infobox (the same way, from Infobox:...) to the page, as done for the English page. ({{:Infobox:Page name}}
)
If you need further help, contact a wiki admin or look at existing examples, on actual pages.
Syntax
Recipe
The "recipe" parameter should be used as follows:
|recipe = wood, 4 = wooden chest, 1
Basically,
item1, quantity = output item, quantity.
Separate multiple items with +.
Technology trigger
The "technology-trigger" parameter should be used as follows:
|technology-trigger = trigger-type: Item, count
The trigger type can be one of the following:
mine-entity
build-entity
craft-item
capture-spawner
create-space-platform
send-item-to-orbit
The items and counts are optional, when they are left out then the colon after the trigger-type should also be removed.
|technology-trigger = capture-spawner
Quality
If a property is affected by quality, add the quality template around the different numbers for the quality levels. For example, the max health of an entity is affected by quality and formatted as follows:
|health = {{Quality|200|260|320|380|500}}
Because quality solely adds information to base game items and does not override or remove values, it is applied directly to the base properties (without space-age) and does not require "changed-by-space-age-mod" to be set.
Parameters
A list of valid parameters is provided below. Since this infobox is general purpose, not all must be used, however some are required. Required parameters are shown in red. Please be as descriptive as possible when making infoboxes.
Tip: This is a large table. After expanding, use CTRL
+ F
in most browsers to search through this table easily.
Available Parameters
Infobox/sandbox |
<tabber> Normal mode=
Template:Infobox/vrow\-\ Expensive mode=
Template:Infobox/vrow</tabber>
Template:Infobox/extraTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/vrowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/vrowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/rowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/vrowTemplate:Infobox/extra