Template:Icon: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
(Added ability to mark icons as only space age or without space age)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="icon" style="display:inline-block; margin:5px; position:relative; padding:3px; width:32px; height:32px; background-color:#{{{color|929292}}}; border:1px solid #4B4543;">{{#ifexist: File:{{ConvertName|{{{1}}}}}.png | [[File:{{ConvertName|{{{1}}}}}.png{{!}}32px{{!}}link={{#if: {{{3|}}} |{{{3}}}|{{{1}}}{{If language suffix}}}}]] | [[File:Placeholder icon.png{{!}}link=]] <includeonly><div style="display:none;">[[File:{{{1}}}.png{{!}}32px]]</div></includeonly>}}<div style="position:absolute; bottom:0; right:3px; color:#fff; font-size:larger; font-weight: bold; text-shadow: 0px 1px 1px #000, 0px -1px 1px #000, 1px 0px 1px #000,-1px 0px 1px #000;">{{{2|}}}</div></div><noinclude>
<div class="factorio-icon" style="background-color:#{{{color|929292}}};">{{#ifexist: File:{{ConvertName|{{{1}}}}}.png | [[File:{{ConvertName|{{{1}}}}}.png{{!}}32px{{!}}link={{{3|{{{1}}}{{If language suffix}}}}}]] | [[File:Placeholder icon.png{{!}}link=]] <includeonly><div style="display:none;">[[File:{{ConvertName|{{{1}}}}}.png{{!}}32px]]</div></includeonly>}}<div class="{{{icon-text-class|factorio-icon-text}}}">{{{2|}}}</div>{{#if: {{{space-age|}}}|<div class="factorio-icon-space-age">[[File:{{#ifeq: {{{space-age}}}|yes|Space_age_icon.png|No_space_age_icon.png}}|16px|alt=|link=]]</div>}}</div><noinclude>{{doc}}
 
==Usage==
<pre>
{{icon|Logistics|2|Logistics_2}}
</pre>
Produces:
{{icon|Logistics|2|Logistics_2}}
 
 
== LOL ==
 
=== Items ===
{{icon|active provider chest}}
{{icon|advanced circuit}}
{{icon|advanced oil processing}}
{{icon|alien artifact}}
{{icon|alien science pack}}
{{icon|arithmetic combinator}}
{{icon|assembling machine}}
{{icon|assembling machine 1}}
{{icon|assembling machine 2}}
{{icon|assembling machine 3}}
{{icon|accumulator}}
{{icon|basic accumulator}}
{{icon|beacon}}
{{icon|basic beacon}}
{{icon|cluster grenade}}
{{icon|discharge defense remote}}
{{icon|basic electric discharge defense remote}}
{{icon|exoskeleton}}
{{icon|basic exoskeleton equipment}}
{{icon|grenade}}
{{icon|basic grenade}}
{{icon|modular armor}}
{{icon|basic modular armor}}
{{icon|basic oil processing}}
{{icon|battery}}
{{icon|battery equipment}}
{{icon|battery mk2 equipment}}
{{icon|battery equipment mk2}}
{{icon|battery mk1}}
{{icon|battery mk2}}
{{icon|big electric pole}}
{{icon|blueprint}}
{{icon|boiler}}
{{icon|burner inserter}}
{{icon|burner mining drill}}
{{icon|cannon shell}}
{{icon|cannon shells}}
{{icon|car}}
{{icon|cargo wagon}}
{{icon|chemical plant}}
{{icon|coal}}
{{icon|combat shotgun}}
{{icon|concrete}}
{{icon|constant combinator}}
{{icon|construction robot}}
{{icon|copper cable}}
{{icon|copper ore}}
{{icon|copper plate}}
{{icon|crude oil}}
{{icon|curved rail}}
{{icon|decider combinator}}
{{icon|deconstruction planner}}
{{icon|defender}}
{{icon|defender capsule}}
{{icon|destroyer}}
{{icon|destroyer capsule}}
{{icon|diesel locomotive}}
{{icon|discharge defense}}
{{icon|distractor}}
{{icon|distractor capsule}}
{{icon|efficiency module}}
{{icon|efficiency module 1}}
{{icon|efficiency module 2}}
{{icon|efficiency module 3}}
{{icon|electric engine unit}}
{{icon|electric furnace}}
{{icon|electric mining drill}}
{{icon|electronic circuit}}
{{icon|empty barrel}}
{{icon|fill crude oil barrel}}
{{icon|empty crude oil barrel}}
{{icon|energy shield}}
{{icon|energy shield mk2}}
{{icon|engine unit}}
{{icon|explosive cannon shell}}
{{icon|explosive cannon shells}}
{{icon|explosive rocket}}
{{icon|explosives}}
{{icon|express splitter}}
{{icon|express transport belt}}
{{icon|express underground belt}}
{{icon|fast inserter}}
{{icon|fast splitter}}
{{icon|fast transport belt}}
{{icon|fast underground belt}}
{{icon|flamethrower}}
{{icon|flamethrower ammo}}
{{icon|flamethrower turret}}
{{icon|flying robot frame}}
{{icon|gate}}
{{icon|green wire}}
{{icon|gun turret}}
{{icon|hazard concrete}}
{{icon|heavy armor}}
{{icon|heavy oil}}
{{icon|heavy oil cracking}}
{{icon|heavy oil cracking to light oil}}
{{icon|inserter}}
{{icon|light armor}}
{{icon|iron armor}}
{{icon|iron axe}}
{{icon|iron chest}}
{{icon|iron gear wheel}}
{{icon|iron ore}}
{{icon|iron plate}}
{{icon|iron stick}}
{{icon|lab}}
{{icon|lamp}}
{{icon|land mine}}
{{icon|landfill}}
{{icon|laser turret}}
{{icon|light oil}}
{{icon|light oil cracking}}
{{icon|light oil cracking to petroleum gas}}
{{icon|logistic robot}}
{{icon|long handed inserter}}
{{icon|low density structure}}
{{icon|lubricant}}
{{icon|medium electric pole}}
{{icon|night vision}}
{{icon|nightvision}}
{{icon|offshore pump}}
{{icon|oil refinery}}
{{icon|passive provider chest}}
{{icon|personal laser defense}}
{{icon|personal roboport}}
{{icon|petroleum gas}}
{{icon|piercing round magazine}}
{{icon|piercing rounds magazine}}
{{icon|piercing shotgun shell}}
{{icon|piercing shotgun shells}}
{{icon|pipe}}
{{icon|pipe to ground}}
{{icon|pipe-to-ground}}
{{icon|pistol}}
{{icon|plastic bar}}
{{icon|poison capsule}}
{{icon|portable fusion reactor}}
{{icon|portable solar panel}}
{{icon|power armor}}
{{icon|power armor mk2}}
{{icon|power switch}}
{{icon|processing unit}}
{{icon|productivity module}}
{{icon|productivity module 1}}
{{icon|productivity module 2}}
{{icon|productivity module 3}}
{{icon|pumpjack}}
{{icon|radar}}
{{icon|rail chain signal}}
{{icon|rail signal}}
{{icon|raw fish}}
{{icon|raw wood}}
{{icon|red wire}}
{{icon|firearm magazine}}
{{icon|regular magazine}}
{{icon|repair pack}}
{{icon|requester chest}}
{{icon|roboport}}
{{icon|rocket}}
{{icon|rocket control unit}}
{{icon|rocket fuel}}
{{icon|rocket launcher}}
{{icon|rocket part}}
{{icon|rocket silo}}
{{icon|satellite}}
{{icon|science pack 1}}
{{icon|science pack 2}}
{{icon|science pack 3}}
{{icon|shotgun}}
{{icon|shotgun shell}}
{{icon|shotgun shells}}
{{icon|slowdown capsule}}
{{icon|small electric pole}}
{{icon|small pump}}
{{icon|smart chest}}
{{icon|smart inserter}}
{{icon|solar panel}}
{{icon|solid fuel}}
{{icon|solid fuel from heavy oil}}
{{icon|solid fuel from light oil}}
{{icon|solid fuel from petroleum gas}}
{{icon|speed module 1}}
{{icon|speed module}}
{{icon|speed module 2}}
{{icon|speed module 3}}
{{icon|splitter}}
{{icon|stack inserter}}
{{icon|steam engine}}
{{icon|steel axe}}
{{icon|steel chest}}
{{icon|steel furnace}}
{{icon|steel plate}}
{{icon|stone}}
{{icon|stone brick}}
{{icon|stone furnace}}
{{icon|stone wall}}
{{icon|storage chest}}
{{icon|storage tank}}
{{icon|rail}}
{{icon|straight rail}}
{{icon|submachine gun}}
{{icon|substation}}
{{icon|sulfur}}
{{icon|sulfuric acid}}
{{icon|tank}}
{{icon|train stop}}
{{icon|transport belt}}
{{icon|underground belt}}
{{icon|water}}
{{icon|wood}}
{{icon|wooden chest}}
=== Technologies ===
{{icon|advanced electronics (research)}}
{{icon|advanced electronics 2 (research)}}
{{icon|advanced material processing (research)}}
{{icon|advanced material processing 2 (research)}}
{{icon|advanced oil processing (research)}}
{{icon|alien technology (research)}}
{{icon|armor crafting (research)}}
{{icon|armor crafting 1 (research)}}
{{icon|armor crafting 2 (research)}}
{{icon|modular armor (research)}}
{{icon|armor crafting 3 (research)}}
{{icon|auto character logistic trash slots (research)}}
{{icon|automated construction (research)}}
{{icon|automated rail transportation (research)}}
{{icon|automation (research)}}
{{icon|automation 2 (research)}}
{{icon|automation 3 (research)}}
{{icon|automobilism (research)}}
{{icon|exoskeleton equipment (research)}}
{{icon|basic exoskeleton equipment (research)}}
{{icon|battery (research)}}
{{icon|battery equipment (research)}}
{{icon|battery mk2 equipment (research)}}
{{icon|battery equipment mk2 (research)}}
{{icon|bullet damage (research)}}
{{icon|bullet damage 1 (research)}}
{{icon|bullet damage 2 (research)}}
{{icon|bullet damage 3 (research)}}
{{icon|bullet damage 4 (research)}}
{{icon|bullet damage 5 (research)}}
{{icon|bullet damage 6 (research)}}
{{icon|bullet shooting speed (research)}}
{{icon|bullet shooting speed 1 (research)}}
{{icon|bullet shooting speed 2 (research)}}
{{icon|bullet shooting speed 3 (research)}}
{{icon|bullet shooting speed 4 (research)}}
{{icon|bullet shooting speed 5 (research)}}
{{icon|bullet shooting speed 6 (research)}}
{{icon|character logistic slots (research)}}
{{icon|character logistic slots 1 (research)}}
{{icon|character logistic slots 2 (research)}}
{{icon|character logistic slots 3 (research)}}
{{icon|character logistic slots 4 (research)}}
{{icon|character logistic slots 5 (research)}}
{{icon|character logistic trash slots (research)}}
{{icon|character logistic trash slots 1 (research)}}
{{icon|character logistic trash slots 2 (research)}}
{{icon|circuit network (research)}}
{{icon|cluster grenade (research)}}
{{icon|combat robotics (research)}}
{{icon|combat robotics 1 (research)}}
{{icon|combat robotics 2 (research)}}
{{icon|combat robotics 3 (research)}}
{{icon|combat robot damage (research)}}
{{icon|combat robot damage 1 (research)}}
{{icon|combat robot damage 2 (research)}}
{{icon|combat robot damage 3 (research)}}
{{icon|combat robot damage 4 (research)}}
{{icon|combat robot damage 5 (research)}}
{{icon|concrete (research)}}
{{icon|construction robotics (research)}}
{{icon|discharge defense (research)}}
{{icon|effect transmission (research)}}
{{icon|efficiency module (research)}}
{{icon|efficiency module 1 (research)}}
{{icon|efficiency module 2 (research)}}
{{icon|efficiency module 3 (research)}}
{{icon|electronics (research)}}
{{icon|electric energy accumulators (research)}}
{{icon|electric energy accumulators 1 (research)}}
{{icon|electric energy distribution 1 (research)}}
{{icon|electric energy distribution 2 (research)}}
{{icon|electric engine (research)}}
{{icon|energy shield equipment (research)}}
{{icon|energy shield mk2 equipment (research)}}
{{icon|engine (research)}}
{{icon|explosive rocketry (research)}}
{{icon|explosives (research)}}
{{icon|flamethrower (research)}}
{{icon|flame thrower (research)}}
{{icon|flamethrower damage (research)}}
{{icon|flamethrower damage 1 (research)}}
{{icon|flamethrower damage 2 (research)}}
{{icon|flamethrower damage 3 (research)}}
{{icon|flamethrower damage 4 (research)}}
{{icon|flamethrower damage 5 (research)}}
{{icon|flamethrower damage 6 (research)}}
{{icon|flammables (research)}}
{{icon|flight (research)}}
{{icon|fluid handling (research)}}
{{icon|follower robot count (research)}}
{{icon|follower robot count 1 (research)}}
{{icon|follower robot count 2 (research)}}
{{icon|follower robot count 3 (research)}}
{{icon|follower robot count 4 (research)}}
{{icon|follower robot count 5 (research)}}
{{icon|follower robot count 6 (research)}}
{{icon|follower robot count 7 (research)}}
{{icon|follower robot count 8 (research)}}
{{icon|follower robot count 9 (research)}}
{{icon|follower robot count 10 (research)}}
{{icon|follower robot count 11 (research)}}
{{icon|follower robot count 12 (research)}}
{{icon|follower robot count 13 (research)}}
{{icon|follower robot count 14 (research)}}
{{icon|follower robot count 15 (research)}}
{{icon|follower robot count 16 (research)}}
{{icon|follower robot count 17 (research)}}
{{icon|follower robot count 18 (research)}}
{{icon|follower robot count 19 (research)}}
{{icon|follower robot count 20 (research)}}
{{icon|gates (research)}}
{{icon|grenade damage (research)}}
{{icon|gun turret damage upgrade (research)}}
{{icon|gun turret damage upgrade 1 (research)}}
{{icon|gun turret damage upgrade 2 (research)}}
{{icon|gun turret damage upgrade 3 (research)}}
{{icon|gun turret damage upgrade 4 (research)}}
{{icon|gun turret damage upgrade 5 (research)}}
{{icon|gun turret damage upgrade 6 (research)}}
{{icon|inserter capacity bonus (research)}}
{{icon|inserter capacity bonus 1 (research)}}
{{icon|inserter capacity bonus 2 (research)}}
{{icon|inserter capacity bonus 3 (research)}}
{{icon|inserter capacity bonus 4 (research)}}
{{icon|inserter capacity bonus 5 (research)}}
{{icon|inserter capacity bonus 6 (research)}}
{{icon|inserter capacity bonus 7 (research)}}
{{icon|lab research speed (research)}}
{{icon|lab efficiency (research)}}
{{icon|lab efficiency 1 (research)}}
{{icon|lab efficiency 2 (research)}}
{{icon|lab efficiency 3 (research)}}
{{icon|lab efficiency 4 (research)}}
{{icon|landmines (research)}}
{{icon|land mines (research)}}
{{icon|landfill (research)}}
{{icon|laser (research)}}
{{icon|laser turret damage (research)}}
{{icon|laser turret damage upgrade (research)}}
{{icon|laser turret damage upgrade 1 (research)}}
{{icon|laser turret damage upgrade 2 (research)}}
{{icon|laser turret damage upgrade 3 (research)}}
{{icon|laser turret damage upgrade 4 (research)}}
{{icon|laser turret damage upgrade 5 (research)}}
{{icon|laser turret damage upgrade 6 (research)}}
{{icon|laser turret shooting speed (research)}}
{{icon|laser turret shooting speed 1 (research)}}
{{icon|laser turret shooting speed 2 (research)}}
{{icon|laser turret shooting speed 3 (research)}}
{{icon|laser turret shooting speed 4 (research)}}
{{icon|laser turret shooting speed 5 (research)}}
{{icon|laser turret shooting speed 6 (research)}}
{{icon|laser turrets (research)}}
{{icon|logistic robotics (research)}}
{{icon|logistic system (research)}}
{{icon|logistics (research)}}
{{icon|logistics 2 (research)}}
{{icon|logistics 3 (research)}}
{{icon|military (research)}}
{{icon|military 1 (research)}}
{{icon|military 2 (research)}}
{{icon|military 3 (research)}}
{{icon|military 4 (research)}}
{{icon|modules (research)}}
{{icon|night vision (research)}}
{{icon|nightvision (research)}}
{{icon|nightvision equipment (research)}}
{{icon|oil processing (research)}}
{{icon|optics (research)}}
{{icon|personal laser defense (research)}}
{{icon|personal roboport (research)}}
{{icon|plastics (research)}}
{{icon|portable fusion reactor (research)}}
{{icon|portable solar panel (research)}}
{{icon|power armor (research)}}
{{icon|power armor 2 (research)}}
{{icon|productivity module (research)}}
{{icon|productivity module 1 (research)}}
{{icon|productivity module 2 (research)}}
{{icon|productivity module 3 (research)}}
{{icon|rail signals (research)}}
{{icon|railway (research)}}
{{icon|robotics (research)}}
{{icon|rocket damage (research)}}
{{icon|rocket damage 1 (research)}}
{{icon|rocket damage 2 (research)}}
{{icon|rocket damage 3 (research)}}
{{icon|rocket damage 4 (research)}}
{{icon|rocket damage 5 (research)}}
{{icon|rocket shooting speed (research)}}
{{icon|rocket shooting speed 1 (research)}}
{{icon|rocket shooting speed 2 (research)}}
{{icon|rocket shooting speed 3 (research)}}
{{icon|rocket shooting speed 4 (research)}}
{{icon|rocket shooting speed 5 (research)}}
{{icon|rocket silo (research)}}
{{icon|rocketry (research)}}
{{icon|shotgun shell damage (research)}}
{{icon|shotgun shell damage 1 (research)}}
{{icon|shotgun shell damage 2 (research)}}
{{icon|shotgun shell damage 3 (research)}}
{{icon|shotgun shell damage 4 (research)}}
{{icon|shotgun shell damage 5 (research)}}
{{icon|shotgun shell damage 6 (research)}}
{{icon|shotgun shell shooting speed (research)}}
{{icon|shotgun shell shooting speed 1 (research)}}
{{icon|shotgun shell shooting speed 2 (research)}}
{{icon|shotgun shell shooting speed 3 (research)}}
{{icon|shotgun shell shooting speed 4 (research)}}
{{icon|shotgun shell shooting speed 5 (research)}}
{{icon|shotgun shell shooting speed 6 (research)}}
{{icon|solar energy (research)}}
{{icon|speed module (research)}}
{{icon|speed module 1 (research)}}
{{icon|speed module 2 (research)}}
{{icon|speed module 3 (research)}}
{{icon|stack inserter (research)}}
{{icon|steel processing (research)}}
{{icon|stone walls (research)}}
{{icon|sulfur processing (research)}}
{{icon|tanks (research)}}
{{icon|toolbelt (research)}}
{{icon|turrets (research)}}
{{icon|worker robot cargo size (research)}}
{{icon|worker robot cargo size 1 (research)}}
{{icon|worker robot cargo size 2 (research)}}
{{icon|worker robot cargo size 3 (research)}}
{{icon|worker robot speed (research)}}
{{icon|worker robot speed 1 (research)}}
{{icon|worker robot speed 2 (research)}}
{{icon|worker robot speed 3 (research)}}
{{icon|worker robot speed 4 (research)}}
{{icon|worker robot speed 5 (research)}}
=== Legacy ===
{{icon|advanced chemistry (research)}}
{{icon|chemistry (research)}}
{{icon|filter inserter}}
{{icon|iron working (research)}}
{{icon|rocket defense}}
{{icon|rocket defense (research)}}
=== Other ===
{{icon|hand}}
{{icon|manual}}
 
</noinclude>
</noinclude>

Latest revision as of 10:18, 18 October 2024

Placeholder icon.png

[View] [Edit] [Page history]

Documentation

{{icon|File name|text|Page name|color=hex color code|icon-text-class=html/css class|space-age=yes/no}}

  • First parameter: The name of the icon file. Usually the in-game name of the item, e.g. "Raw fish". The file name is converted using Template:ConvertName, which for example resolves the input of "Battery MK1" to battery-equipment. (Required)
  • Second parameter: Text to display on top of the icon. (Optional)
  • Third parameter: The name of the page the icon links to. If this parameter is completely empty, the first parameter will be used instead of this one. The template adds the language suffix (of the language the page is on) to the link e.g. Wood links to Wood/de on a German page. (Optional)
  • Color parameter: A hex color code without the #. Determines the background color of the icon e.g. ffffff for white. (Optional, default: 929292)
  • Icon text class parameter: A html class associated with some css code. Determines how the number is displayed on the icon. Currently unused. (Optional, default: factorio-icon-text)
  • Space age parameter: Either the string yes, no or nothing. Determines whether to display a symbol in the top right of the icon that shows whether the linked item/recipe/technology is exclusive to space age ( yes) or only available if space age is deactivated (no). Most items are available with and without space age, in that case this parameter should be left out. (Optional, default: unset)

Putting two pipes after the first parameter will produce an icon that links to nothing and shows no number (useful if you don't want to link to a page that doesn't exist):

{{icon|dead-tree||}} →
Dead-tree.png

Some usage examples:

  • {{Icon|Intentionally missing image|color=ff00ff}} →
  • {{Icon|Tree|color=0000ff}} →
    Tree.png
  • {{Icon|Iron plate||Copper plate}} →
    Iron plate.png
  • {{Icon|Iron plate|text}} →
    Iron plate.png
    text
  • {{Icon|automobilism (research)|icon-text-class=navbox-icon-text|some text}} →
    Automobilism (research).png
  • {{Icon|Satellite|space-age=no}} →
    Satellite.png
  • {{Icon|Big mining drill|space-age=yes}} →
    Big mining drill.png
List of all templates