Template:Infobox: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m typo
Keep (research) suffix in technology infoboxes
 
(31 intermediate revisions by the same user not shown)
Line 2: Line 2:
<div class="infobox-header  
<div class="infobox-header  
  {{#switch: {{{category}}}
  {{#switch: {{{category}}}
| Logistics            = logistics
| Production            = production
| Intermediate products = intermediates
| Space                = space
  | Combat                = combat
  | Combat                = combat
| Liquids              = liquids
| Logic                = logic
| Intermediate products = intermediates
| Machinery            = machinery
| Resources            = resources
| Science packs        = science
  | Technology            = technology
  | Technology            = technology
| Tools                = tools
  | #default              = default-infobox
  | #default              = default-infobox
  }}
  }}
">
">
{| style="padding: 5px 0;"
{| style="padding: 5px 0;"
| valign="top" style="width:32px;" |{{Icon|{{{icon|{{No language suffix/No namespace}}}}}}}  
| valign="top" style="width:32px;" |{{Icon|{{{icon|{{No language suffix/No namespace}}}}}|||space-age={{{space-age|}}}}}  
| class="infobox-header-text" | <span>{{Translation|{{{name|{{#replace: {{No language suffix/No namespace}} | (research)|}} }}} }}</span>
| class="infobox-header-text" | <span>{{Translation|{{{name|{{No language suffix/No namespace}}}}} }}</span>
<p>{{#if: {{{category|}}} | {{Translation|{{{category-name|{{{category|}}} }}} }} <!--{{C|{{{category}}}}}-->}}</p>
|class="plainlinks infobox-edit-link" valign="top" style="display: none;" | [{{fullurl:{{ns:3002}}:{{#replace:{{No language suffix/No namespace}}| |_}}|action=edit}} {{Translation|Edit}}]
|class="plainlinks infobox-edit-link" valign="top" style="display: none;" | [https://wiki.factorio.com/index.php?title={{ns:3002}}:{{#replace:{{No language suffix/No namespace}}| |_}}&action=edit {{Translation|Edit}}]
|}
|}
{{#if: {{{internal-name|}}} |
<p class="more-button" title="{{Translation|Click for more info}}">▼</p>
<div class="more-content" style="display: none;">
{{Translation|Internal name}}: {{{internal-name}}}
{{#if: {{{prototype-type|}}} | <br/>{{Translation|Prototype type}}: {{{prototype-type|}}}|}}
</div>
|
{{#if: {{{prototype-type|}}} |
<p class="more-button" title="{{Translation|Click for more info}}">▼</p>
<div class="more-content" style="display: none;">
{{Translation|Prototype type}}: {{{prototype-type}}}
</div>
|}}
}}
</div>
</div>
{{#if: {{{image|}}}
{{#if: {{{image|}}}
Line 40: Line 22:
</div>
</div>
}}
}}
{{#if: {{{expensive-recipe|}}} |
{{#if: {{{changed-by-space-age-mod|}}} |
<tabber>
<ul class="tabber"><li class="tab-head tab-head-1 tab-head-active" data-name="{{Translation|Base game}}">{{Translation|Base game}}</li>&nbsp;<li class="tab-head tab-head-2" data-name="{{Translation|Space Age mod}}">{{Translation|Space Age mod}}</li></ul>
{{Translation|Normal mode}}=
<table class="tab tab-1">
<table>
{{#invoke:Infobox|base_tab}}
{{Infobox/vrow |Recipe                      |{{{recipe|}}}                      |{{Crafting/parsing|{{{recipe}}} }} }}
{{Infobox/vrow |Total raw                    |{{{recipe|}}}                      |{{Crafting/raw|{{{total-raw|{{{recipe}}} }}} }} }}
</table>
</table>
\-\
<table class="tab tab-2 hidden">
{{Translation|Expensive mode}}=
{{#invoke:Infobox|space_age_tab}}
<table>
{{Infobox/vrow |Recipe                      |{{{expensive-recipe|}}}                      |{{Crafting/parsing|{{{expensive-recipe}}} }} }}
{{Infobox/vrow |Total raw                    |{{{expensive-recipe|}}}                      |{{Crafting/raw|{{{expensive-total-raw|{{{expensive-recipe}}} }}} }} }}
</table>
</tabber>
|
{{#if: {{{expensive-total-raw|}}} |
<tabber>
{{Translation|Normal mode}}=
<table>
{{Infobox/vrow |Recipe                      |{{{recipe|}}}                      |{{Crafting/parsing|{{{recipe}}} }} }}
{{Infobox/vrow |Total raw                    |{{{recipe|}}}                      |{{Crafting/raw|{{{total-raw|{{{recipe}}} }}} }} }}
</table>
</table>
\-\
{{Translation|Expensive mode}}=
<table>
{{Infobox/vrow |Recipe                      |{{{recipe|}}}                      |{{Crafting/parsing|{{{recipe}}} }} }}
{{Infobox/vrow |Total raw                    |{{{expensive-total-raw|}}}          |{{Crafting/raw|{{{expensive-total-raw}}} }} }}
</table>
</tabber>
|
|
<table>
<table>
{{Infobox/vrow |Recipe                      |{{{recipe|}}}                      |{{Crafting/parsing|{{{recipe}}} }} }}
{{#invoke:Infobox|base_tab}}
{{Infobox/vrow |Total raw                    |{{{recipe|}}}                      |{{Crafting/raw|{{{total-raw|{{{recipe}}} }}} }} }}
</table>
</table>
}}
}}
}}
</div>{{#ifeq: {{{space-age|}}} | yes | {{#ifeq: {{NAMESPACE}} | Infobox | | {{#ifeq: {{NAMESPACE}} | Template | | {{Category|Space Age}} }} }} }}{{#seo:
{{#if: {{{expensive-cost-multiplier|}}} |
<tabber>
{{Translation|Normal mode}}=
<table>
{{Infobox/vrow |Cost                        |{{{cost|}}}                        |{{Item/parsing|{{{cost|}}} }} {{#if: {{{cost-multiplier|}}}|✖ <big>{{{cost-multiplier|}}}</big>}} }}
</table>
\-\
{{Translation|Expensive mode}}=
<table>
{{Infobox/vrow |Cost                        |{{{cost|}}}                        |{{Item/parsing|{{{cost|}}} }} ✖ <big>{{{expensive-cost-multiplier|}}}</big>}}
</table>
</tabber>
|
<table>
{{Infobox/vrow |Cost                        |{{{cost|}}}                        |{{Item/parsing|{{{cost|}}} }} {{#if: {{{cost-multiplier|}}}|✖ <big>{{{cost-multiplier|}}}</big>}} }}
</table>
}}
<table>
{{Infobox/extra|{{{extra1|}}} }}
{{Infobox/row  |Added in                    |{{{added-in|}}} }}
{{Infobox/row  |Walking speed                |{{{walking-speed|}}} }}
{{Infobox/row  |Storage size                |{{{storage-size|}}} }}
{{#if: {{{expected-resources|}}} |
<tr class="border-top">
<td>
{{Translation|Expected resources }}
</td>
<td style="width: 100%;">
{{{expected-resources}}}
</td>
</tr>
}}
 
{{Infobox/row  |Health                      |{{{health|}}} }}
{{Infobox/row  |Restores                    |{{{restores|}}}                    |{{{restores}}} {{Translation|health}} }}
{{Infobox/row  |Resistances                  |{{{resistance|}}} }}
{{Infobox/row  |Lifespan                    |{{{lifespan|}}}                     |{{{lifespan}}} {{Translation|seconds}} }}
{{Infobox/row  |Inventory size bonus        |{{{inventory-size-bonus|}}} }}
{{Infobox/row  |Grid size                    |{{{grid-size|}}} }}
{{Infobox/row  |Stack size                  |{{{stack-size|}}} }}
{{Infobox/row  |Range                        |{{{range|}}} }}
{{Infobox/row  |Shooting speed              |{{{shooting-speed|}}} }}
{{Infobox/row  |Damage                      |{{{damage|}}} }}
{{Infobox/row  |Damage bonus                |{{{damage-bonus|}}} }}
{{Infobox/row  |Cluster size                |{{{cluster-size|}}} }}
{{Infobox/row  |Area of effect size          |{{{area-of-effect-size|}}} }}
{{Infobox/row  |Durability                  |{{{durability|}}} }}
{{Infobox/row  |Ammunition                  |{{{ammunition|}}}                  |{{Item/parsing|{{{ammunition}}} }} }}
{{Infobox/row  |Magazine size                |{{{magazine-size|}}} }}
{{Infobox/row  |Efficiency                  |{{{efficiency|}}} }}
{{Infobox/row  |Dimensions                  |{{{dimensions|}}} }}
{{Infobox/row  |Energy consumption          |{{{energy|}}}                      |{{Type|{{{energy}}} }} }}
{{Infobox/row  |Drain                        |{{{drain|}}}                        |{{Type|{{{drain}}} }} }}
{{Infobox/row  |Transmission                |{{{transmission|}}}                |{{Type|{{{transmission}}} }} }}
{{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  |Calculations per 60 UPS      |{{{calculations-per-second|}}} }}
{{Infobox/vrow |Placed in                    |{{{equipped-in|}}}                  |{{Item/parsing|{{{equipped-in}}} }} }}
{{Infobox/row  |Robot limit                  |{{{robot-limit|}}} }}
{{Infobox/row  |Repair speed                |{{{repair-speed|}}} }}
{{Infobox/row  |Charging stations            |{{{charging-stations|}}} }}
{{Infobox/row  |Movement bonus              |{{{movement-bonus|}}} }}
{{Infobox/row  |Maximum recharge speed      |{{{maximum-recharge-speed|}}} }}
{{Infobox/row  |Energy capacity              |{{{energy-capacity|}}}              |{{Type|{{{energy-capacity}}} }} }}
{{Infobox/row  |Power input                  |{{{power-input|}}} }}
{{Infobox/row  |Power output                |{{{power-output|}}} }}
{{Infobox/row  |Maximum temperature          |{{{maximum-temperature|}}} }}
{{Infobox/row  |Fluid consumption            |{{{fluid-consumption|}}} }}
{{Infobox/row  |Shield                      |{{{shield|}}} }}
{{Infobox/row  |Energy per unit              |{{{energy-per-unit|}}}              |{{Type|{{{energy-per-unit}}} }} }}
{{Infobox/row  |Crafting speed              |{{{crafting-speed|}}} }}
{{Infobox/row  |Pumping speed                |{{{pumping-speed|}}} }}
{{Infobox/row  |Mining hardness              |{{{mining-hardness|}}} }}
{{Infobox/row  |Mining time                  |{{{mining-time|}}} }}
{{Infobox/row  |Mining power                |{{{mining-power|}}} }}
{{Infobox/row  |Speed                        |{{{speed|}}} }}
{{Infobox/row  |Productivity                |{{{productivity|}}} }}
{{Infobox/row  |Mining speed                |{{{mining-speed|}}}                |{{{mining-speed}}} }}
{{Infobox/row  |Mining area                  |{{{mining-area|}}}                  |{{{mining-area}}} {{Translation|tiles}} }}
{{Infobox/row  |Fuel value                  |{{{fuel-value|}}}                  |{{Type|{{{fuel-value}}} }} }}
{{Infobox/row  |Supply area                  |{{{supply-area|}}}                  |{{{supply-area}}} {{Translation|tiles}} }}
{{Infobox/row  |Wire reach                  |{{{wire-reach|}}}                  |{{{wire-reach}}} {{Translation|tiles}} }}
{{Infobox/row  |Construction area            |{{{construction-area|}}}            |{{{construction-area}}} {{Translation|tiles}} }}
{{Infobox/row  |Pollution                    |{{{pollution|}}} }}
{{Infobox/row  |Module slots                |{{{modules|}}}                      |{{{modules}}} {{Translation|slots}} }}
{{Infobox/vrow |Accepted equipment          |{{{equipment|}}}                    |{{Item/parsing|{{{equipment}}} }} }}
{{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 |Effects                      |{{{effects|}}}                      |{{Item/parsing|{{{effects}}} }} }}
{{Infobox/vrow |Boosting technologies        |{{{boosting-technologies|}}}        |{{Technology/parsing/sandbox|{{{boosting-technologies}}}|color=228B22}} }}
{{Infobox/vrow |Produced by                  |{{{producers|}}}                    |{{Item/parsing|{{{producers}}} }} }}
{{Infobox/vrow |Processed by                |{{{processors|}}}                  |{{Item/parsing|{{{processors}}} }} }}
{{Infobox/vrow |Consumed by                  |{{{consumers|}}}                    |{{Item/parsing|{{{consumers}}} }} }}
{{Infobox/vrow |Used as fuel by              |{{{used-as-fuel-by|}}}              |{{Item/parsing|{{{used-as-fuel-by}}} }} }}
{{Infobox/extra|{{{extra2|}}} }}
</table>
</div>{{#seo:
|og:site_name=Official Factorio Wiki
|og:site_name=Official Factorio Wiki
|og:type=article
|og:type=article
|title={{Translation|{{No_language_suffix/No_namespace}}}} - Factorio Wiki
|title={{Translation|{{No_language_suffix/No_namespace}}}} - Factorio Wiki
|og:image={{#if:{{{image|}}}|https://wiki.factorio.com/images/{{ucfirst:{{#replace:{{#if:{{{image|}}}|{{{image}}}{{#ifeq:{{#explode:{{{image}}}|.|1}}||.png}}|}}| |_}}}}|https://wiki.factorio.com/images/{{ucfirst:{{#replace:{{ConvertName|{{{icon|{{No_language_suffix/No_namespace}}}}}}}| |_}}}}.png}}
|og:image={{#if:{{{image|}}}|https://{{SERVERNAME}}/images/{{ucfirst:{{#replace:{{#if:{{{image|}}}|{{{image}}}{{#ifeq:{{#explode:{{{image}}}|.|1}}||.png}}|}}| |_}}}}|https://{{SERVERNAME}}/images/{{ucfirst:{{#replace:{{ConvertName|{{{icon|{{No_language_suffix/No_namespace}}}}}}}| |_}}}}.png}}
<!--- |description={{#switch:{{lc:{{{category}}}}}
|machinery
|tools
|combat
|science packs
|item
|logic
|intermediate products=The
|liquids
|resources=
|#default=The
}} {{No_language_suffix/No_namespace}} is {{#switch:{{lc:{{{category}}}}}
|machinery=a machine
|tools=a tool
|combat=used in combat
|liquids=a fluid
|logic=used in the circuit network
|intermediate products=an intermediate product
|resources=a resource
|science packs=a science pack
|items
|item = an item
|#default={{lc:{{{category}}}}}
}}. {{#if: {{{recipe|}}}|Its recipe is {{#replace:{{#replace:{{{recipe}}}|+|and}}|,|:}}|}}{{#if: {{{cost|}}}|{{#if: {{{recipe|}}}|.}} Its cost is ({{#replace:{{#replace:{{{cost}}}|+|and}}|,|:}}) {{#if:{{{cost-multiplier|}}}|x {{{cost-multiplier}}}|}}|}}{{#if: {{{required-technologies|}}}|. It requires the following technologies: {{#replace:{{{required-technologies}}}|+|and}}|}} --->
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 11:16, 7 February 2025

[View] [Edit] [Page history]

Documentation

This 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

List of all templates