Template:Infobox: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
m (grid size -> equipment grid size)
 
(149 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="infobox">
<includeonly><div class="infobox">
<table>
<div class="infobox-header  
<tr class="infobox-header">
{{#switch: {{{category}}}
 
| Logistics            = logistics
<th>
| Production            = production
<div class="header-icon">
| Intermediate products = intermediates
<!--Page icon-->
| Combat                = combat
{{Icon|{{{icon|}}}}}
| Technology            = technology
| #default              = default-infobox
}}
">
{| style="padding: 5px 0;"
| valign="top" style="width:32px;" |{{Icon|{{{icon|{{No language suffix/No namespace}}}}}||{{No language suffix/No namespace}}{{If language suffix}}}}
| class="infobox-header-text" | <span>{{Translation|{{{name|{{#replace: {{No language suffix/No namespace}} | (research)|}} }}} }}</span>
|class="plainlinks infobox-edit-link" valign="top" style="display: none;" | [{{fullurl:{{ns:3002}}:{{#replace:{{No language suffix/No namespace}}| |_}}|action=edit}} {{Translation|Edit}}]
|}
</div>
</div>
 
{{#if: {{{image|}}}
<div class="header-text">
|<div class="infobox-image">
<!--Infobox name and under that type/catergory-->
[[File:{{{image}}}{{#ifeq: {{#explode: {{{image}}}|.|1}}||.png}}]]
<div>
{{{name|NAME OF PAGE}}}
</div>
</div>
<div>
}}{{#if: {{{expensive-recipe|}}} |
{{{category-name|CATEGORY NAME}}}
<tabber>
</div>
{{Translation|Normal mode}}=
</div>
<table>
</th>
{{Infobox/vrow |Recipe                      |{{{recipe|}}}                      |{{Crafting/parsing|{{{recipe}}} }} }}
{{Infobox/vrow |Total raw                    |{{{recipe|}}}                      |{{Crafting/raw|{{{total-raw|{{{recipe}}} }}} }} }}
</table>
\-\
{{Translation|Expensive mode}}=
<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>
\-\
{{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>
|
{{#if: {{{recipe|}}} |
<tabber>
{{Translation|Normal mode & expensive mode}}=
<table>
{{Infobox/vrow |Recipe                      |{{{recipe|}}}                      |{{Crafting/parsing|{{{recipe}}} }} }}
{{Infobox/vrow |Total raw                    |{{{recipe|}}}                      |{{Crafting/raw|{{{total-raw|{{{recipe}}} }}} }} }}
</table>
</tabber>
}}
}}
}}{{#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>
|
{{#if: {{{cost|}}} |
<tabber>
{{Translation|Normal mode & expensive mode}}=
<table>
{{Infobox/vrow |Cost                        |{{{cost|}}}                        |{{Item/parsing|{{{cost|}}} }} {{#if: {{{cost-multiplier|}}}|✖ <big>{{{cost-multiplier|}}}</big>}} }}
</table>
</tabber>
}}
}}
<table>
{{Infobox/extra|{{{extra1|}}} }}
{{Infobox/row  |Map color                    |{{{map-color|}}}                    |{{Color|{{{map-color|}}}}} }}
{{Infobox/row  |Map icon                    |{{{map-icon|}}} }}
{{Infobox/row  |Added in                    |{{{added-in|}}} }}
{{Infobox/row  |Walking speed                |{{{walking-speed|}}} }}
{{Infobox/row  |Storage size                |{{{storage-size|}}} }}
{{Infobox/row  |Fluid storage volume        |{{{fluid-storage-volume|}}} }}
{{#if: {{{expected-resources|}}} |
<tr class="border-top">
<td>
{{Translation|Expected resources }}
</td>
<td style="width: 70%;">
{{{expected-resources}}}
</td>
</tr>
</tr>
}}


{{User:TheWombatGuru/Infobox/row|Health        |{{{health|}}} }}
{{Infobox/row  |Health                      |{{{health|}}} }}
{{User:TheWombatGuru/Infobox/row|Stack size   |{{{stack-size|}}} }}
{{Infobox/row |Restores                    |{{{restores|}}}                    |{{{restores}}} {{Translation|health}} }}
{{User:TheWombatGuru/Infobox/row|Max. energy   |{{{max-energy|}}} }}
{{Infobox/row  |Resistances                  |{{{resistance|}}} }}
{{User:TheWombatGuru/Infobox/row|Crafting speed|{{{crafting-speed|}}} }}
{{Infobox/row  |Lifespan                    |{{{lifespan|}}}                    |{{{lifespan}}} {{Translation|seconds}} }}
{{User:TheWombatGuru/Infobox/row|Pollution     |{{{pollution|}}} }}
{{Infobox/row |Inventory size bonus        |{{{inventory-size-bonus|}}} }}
{{User:TheWombatGuru/Infobox/row|Recipe       |{{{recipe|}}}        | {{Crafting/parsing|{{{recipe}}} }} }}
{{Infobox/row  |Equipment grid size          |{{{grid-size|}}} }}
{{User:TheWombatGuru/Infobox/row|Producers    |{{{producers|}}}     | {{Item/parsing|{{{producers}}} }} }}
{{Infobox/row  |Stack size                   |{{{stack-size|}}} }}
{{User:TheWombatGuru/Infobox/row|Producers    |{{{consumers|}}}     | {{Item/parsing|{{{consumers}}} }} }}
{{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 |Magazine size                |{{{magazine-size|}}} }}
{{Infobox/row  |Ammunition                  |{{{ammunition|}}}                  |{{Item/parsing|{{{ammunition}}} }} }}
{{Infobox/vrow |Used as ammunition by        |{{{used-as-ammo-by|}}}              |{{Item/parsing|{{{used-as-ammo-by}}} }} }}
{{Infobox/row  |Efficiency                  |{{{efficiency|}}} }}
{{Infobox/row  |Dimensions                  |{{{dimensions|}}} }}
{{Infobox/row  |Energy consumption          |{{{energy|}}}                      |{{Type|{{{energy}}} }} }}
{{Infobox/row  |Drain                        |{{{drain|}}}                        |{{Type|{{{drain}}} }} }}
{{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/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  |Belt speed                  |{{{belt-speed|}}} }}
{{Infobox/row  |Movement bonus              |{{{movement-bonus|}}} }}
{{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 hitpoints            |{{{shield|}}} }}
{{Infobox/row  |Energy per hitpoint          |{{{energy-per-hitpoint|}}}              |{{Type|{{{energy-per-hitpoint}}} }} }}
{{Infobox/row  |Maximum recharge speed      |{{{maximum-recharge-speed|}}} }}
{{Infobox/row |Crafting speed               |{{{crafting-speed|}}} }}
{{Infobox/row  |Pumping speed                |{{{pumping-speed|}}} }}
{{Infobox/row  |Mining time                  |{{{mining-time|}}} }}
{{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 |Vehicle acceleration        |{{{vehicle-acceleration|}}} }}
{{Infobox/row  |Vehicle top speed            |{{{vehicle-top-speed|}}} }}
{{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  |Weight                      |{{{weight|}}} }}
{{Infobox/row  |Module slots                |{{{modules|}}}                      |{{{modules}}} {{Translation|slots}} }}
{{Infobox/row |Prototype type              |{{{prototype-type|}}}              |{{Prototype page|{{{prototype-type}}}}} }}
{{Infobox/row  |Internal name                |{{{internal-name|}}} }}
{{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 |Consumed by                  |{{{consumers|}}}                   |{{Item/parsing|{{{consumers}}} }} }}
{{Infobox/vrow |Valid fuel                  |{{{valid-fuel|}}}                  |{{Item/parsing|{{{valid-fuel}}} }} }}
{{Infobox/vrow |Used as fuel by              |{{{used-as-fuel-by|}}}              |{{Item/parsing|{{{used-as-fuel-by}}} }} }}
{{Infobox/extra|{{{extra2|}}} }}
</table>
</table>
</div>
</div>{{#seo:
|og:site_name=Official Factorio Wiki
|og:type=article
|title={{Translation|{{No_language_suffix/No_namespace}}}} - Factorio Wiki
|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={{GETFIRST2SENTENCES}}
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>

Latest revision as of 13:18, 13 August 2020

[View] [Edit] [Page history]

Documentation

This template is designed to be used to describe an item or machine, using a box of info.

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=7x7
|recipe=Time, 0.5 + Steel plate, 2 + Copper plate, 2
|required-technologies=Electric energy distribution 1
|producers=Manual + 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.


Recipe syntax

The "recipe" parameter should be used as follows:


|recipe = wood, 4 = wooden chest, 1

Basically,

item1, quantity = output item, quantity.

Separate multiple items with +.


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

Parameter Value
category The category the object fits into, same as the inventory tabs. Valid choices are Logistics, Production, Intermediate products, Combat, Technology.
name The name of the object, default is the page name. Do not specify name if not necessary, to avoid translation issues.
icon Specify the icon of the object, give the name of the file without the extension. This is only necessary if the icon fails to display properly.
internal-name The internal name of the entity. Only use plain text here.
prototype-type The prototype type of the entity. Only use plain text here.
image An in-game image of the entity, without file extension (.png etc)
extra1 Add an extra row above all others, for misc purpose. Do not use templates here!
extra2 Add an extra row below all others, for misc purpose. Do not use templates here!
recipe The recipe of the object in normal mode. See recipe syntax above for more info.
total-raw The raw recipe of the object in normal mode. See recipe syntax above.
expensive-recipe The recipe of the object in expensive mode. See recipe syntax above for more info. Creates new tab in the infobox when used.
expensive-total-raw The raw recipe of the object in expensive. See recipe syntax above. Creates new tab in the infobox if expensive-recipe doesn't exist but expensive-total-raw does. It then shows the normal recipe and the expensive total raw in the expensive tab.
map-color The map color of the entity.
map-icon The map icon of the entity.
added-in The version the object was added into the game.
walking-speed The walking speed of the entity.
storage-size The storage size of the entity, in spaces.
fluid-storage-volume Fluid storage volume of the entity, in units. Also used for entities that do not strictly store fluid, such as pipes.
lifespan The lifespan of a deployed capsule in seconds.
expected-resources Resources expected to be dropped when this entity (tree/rock) is mined.
health The health points of the entity.
restores The amount of health the item restores.
resistance The elemental/physical resistances of the object. Resistances should be shown as such: point_resistance/10% Fire
inventory-size-bonus The inventory size bonus provided by the item.
grid-size The size of the grid for armor modules.
stack-size How many of the object fit into a stack.
range The range of the weapon, in tiles.
shooting-speed The shooting speed of the weapon.
damage The damage dealt by the object.
damage-bonus The damage bonus provided by the technology or weapon.
cluster-size The size of the cluster.
area-of-affect-size The size of the area of effect of the object.
durability The durability of the object.
ammunition What type of ammo the weapon consumes.
used-as-ammo-by Which entities use this ammo.
magazine-size The number of bullets contained in the magazine.
efficiency The efficiency.
dimensions The size of the entity, in tiles.
energy The energy consumption of the entity.
drain The passive electricity drain of the entity.
robot-recharge-rate The rate at which the object recharges robots.
internal-buffer-recharge-rate The rate at which the object fills it's internal buffer.
equipped-in Which objects with equipments grids this item can be placed in.
robot-limit Limit of robots that can fit inside the entity.
repair-speed The repair speed of the object.
charging-stations The number of charging stations on the entity.
belt-speed The speed of the belt, should use Items/s as the unit.
movement-bonus General movement speed bonus.
energy-capacity How much electricity the object can hold.
power-input How much electricity the object can intake.
power-output Same as above, but for output.
maximum-temperature The maximum temperature of the entity.
fluid-consumption The fluid consumption of this entity. When possible in x/s.
shield The amount of shielding this shielding equipment provides.
energy-per-hitpoint How much energy is needed to recharge 1 hitpoint of this shield equipment.
maximum-recharge-speed The max recharge speed of this shield equipment.
crafting-speed The crafting speed of the entity.
pumping-speed The pumping speed of this entity.
mining-time The time it takes to mine the object.
mining-speed The mining speed of the object.
mining-area The mining area of the entity.
speed The speed bonus/penalty of this module.
productivity The productivity bonus of this module.
fuel-value The amount of energy can be obtained by using this as fuel
vehicle-acceleration The vehicle acceleration this fuel provides, e.g 180%
vehicle-top-speed The vehicle top speed this fuel provides, e.g 115%
supply-area The area the entity can supply, in ?x? tiles. Value of 5 would produce 5x5.
wire-reach The number of tiles the wires can reach.
construction-area The size of the construction area provided by the entity.
pollution The pollution generated by the object.
weight The weight of this rolling stock or vehicle.
modules Number of module slots.
equipment Equipment that can be put into this objects equipment grid.
allows What other technologies the tech allows.
effects Items unlocked by researching this technology.
required-technologies Technologies required to access the tech or object.
boosting-technologies What technologies boost the object.
producers What entities (machines) produce the object.
consumers What recipes consume the object.
valid-fuel Which items this entity can use as fuel.
used-as-fuel-by What entities this item can be used in as fuel.
cost The cost to research the technology.
cost-multiplier How many times the cost must be paid to research the tech fully.
expensive-cost-multiplier How many times the cost must be paid to research the tech fully in expensive mode. Creates a new tab in the infobox when used.
List of all templates