<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DaveMcW</id>
	<title>Official Factorio Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DaveMcW"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/DaveMcW"/>
	<updated>2026-04-22T14:10:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=216577</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=216577"/>
		<updated>2025-12-05T18:41:24Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Rename global to storage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{Keybinding|grave}} key (&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;). This is the key located to the left of the &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; key, above &amp;lt;code&amp;gt;Tab&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Settings menu → Controls → Toggle chat (and Lua console)&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. The fade-out time can be changed via &#039;&#039;&#039;Settings menu → Interface → Chat message delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key provides intelligent code completion on commands, options and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair_packs, platform_tile_building_blocked, turret_out_of_ammo, turret_fire, custom, no_storage, train_out_of_fuel, train_no_path, no_platform_storage, collector_path_blocked, unclaimed_cargo, no_roboport_storage, pipeline_overextended.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGB_color_space|RGB value]] in the format of “# # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the [[permissions]] GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /permissions &amp;lt;action&amp;gt; &amp;lt;parameters&amp;gt;&lt;br /&gt;
| /permissions add-player DeveloperGroup kovarex&lt;br /&gt;
| Available actions are add-player &amp;lt;group&amp;gt; &amp;lt;player&amp;gt;, create-group &amp;lt;name&amp;gt;, delete-group &amp;lt;group&amp;gt;, edit-group &amp;lt;group&amp;gt; &amp;lt;input_action&amp;gt; &amp;lt;true/false&amp;gt;, get-player-group &amp;lt;player&amp;gt;, remove-player &amp;lt;group&amp;gt; &amp;lt;player&amp;gt;, rename-group &amp;lt;group&amp;gt; &amp;lt;new_name&amp;gt; and reset&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reset-tips&lt;br /&gt;
| /reset-tips&lt;br /&gt;
| Resets the state of the tips and tricks as if the game was just started for the first time.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all [[shortcut bar]] items, including blueprint string import, copy &amp;amp; paste, deconstruction and upgrade planner.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-tips&lt;br /&gt;
| /unlock-tips&lt;br /&gt;
| Unlocks all tips and tricks entries.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /bans&lt;br /&gt;
| /bans&lt;br /&gt;
| Prints a list of banned players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config&lt;br /&gt;
| /config&lt;br /&gt;
| Opens the server configuration GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public. The units for the options afk-auto-kick and autosave-interval are in minutes.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /p [online/o/count/c]&lt;br /&gt;
| /p o c&lt;br /&gt;
| Same as /players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat [all/&amp;lt;planet-name&amp;gt;/&amp;lt;platform-name&amp;gt;/off]&lt;br /&gt;
| Researches all technologies and enables cheat mode (allowing free crafting of any item). &lt;br /&gt;
* Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
* Specifying a &#039;&#039;planet-name&#039;&#039; or &#039;&#039;platform-name&#039;&#039; also moves the player to the origin of the specified planet or platform.&lt;br /&gt;
* Using the &#039;&#039;&#039;off&#039;&#039;&#039; option turns cheat mode off.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /mc &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|-&lt;br /&gt;
| /sc &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In freeplay, the farthest you can zoom out is 0.3. In the map editor, it is 0.1. Smaller zoom values will be clamped.&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
Note: Specific technologies can be researched using the [[map editor]] by shift clicking the &amp;quot;start research&amp;quot; button on the technology GUI.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Specific technologies can be unresearched using the [[map editor]] by clicking the &amp;quot;un-research&amp;quot; button on the technology GUI.&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set all trains to Automatic mode ===&lt;br /&gt;
Set all trains to automatic mode - for example after building them with a blueprint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for key,ent in pairs (game.player.surface.find_entities_filtered{name=&amp;quot;locomotive&amp;quot;}) do &lt;br /&gt;
    ent.train.manual_mode = false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several god-mode items available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;infinity-chest&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;infinity-pipe&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;electric-energy-interface&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;heat-interface&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fission-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fission-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fission-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding [[Quality|higher quality]] items looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, quality=&amp;quot;legendary&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Increase player inventory slots ===&lt;br /&gt;
Gives 100 additional bonus inventory slots to your entire force. Used by the [[Toolbelt (research)]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.character_inventory_slots_bonus=100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete unrevealed chunks ===&lt;br /&gt;
This command deletes chunks that are not revealed by the player. Can be used after the command for [[#Hide revealed map|hiding revealed map]] to delete the chunks not covered by radar.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if not force.is_chunk_charted(surface, chunk) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time. Unfreezes it if you by replace &amp;quot;true&amp;quot; with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, who placed them ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at &amp;quot; .. speaker.gps_tag)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground_tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more flexibility, the [[map editor]] can also be used to create/alter/remove resource patches.&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new water patch ===&lt;br /&gt;
&lt;br /&gt;
This creates a small pond in a 4x2 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c&lt;br /&gt;
local waterTiles = {}&lt;br /&gt;
for y=2,4 do&lt;br /&gt;
 for x=-2,2 do&lt;br /&gt;
  table.insert(waterTiles, {name=&amp;quot;water&amp;quot;, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
 end&lt;br /&gt;
 game.player.surface.set_tiles(waterTiles)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regenerate resources ===&lt;br /&gt;
For solid resources like iron, destroys all resource entities and creates resource entities as in the original map generation. For fluid resources like oil, sets the yield of all existing resource entities to the original amount. Regenerates resources on the entire surface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{type=&amp;quot;resource&amp;quot;}) do&lt;br /&gt;
  if e.prototype.infinite_resource then&lt;br /&gt;
    e.amount = e.initial_amount&lt;br /&gt;
  else&lt;br /&gt;
    e.destroy()&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
local non_infinites = {}&lt;br /&gt;
for resource, prototype in pairs(prototypes.get_entity_filtered{{filter=&amp;quot;type&amp;quot;, type=&amp;quot;resource&amp;quot;}}) do&lt;br /&gt;
  if not prototype.infinite_resource then&lt;br /&gt;
    table.insert(non_infinites, resource)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
surface.regenerate_entity(non_infinites)&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{type=&amp;quot;mining-drill&amp;quot;}) do&lt;br /&gt;
    e.update_connections()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/concepts/MapGenSize.html MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/concepts/MapGenSize.html MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Making a structure indestructible ===&lt;br /&gt;
This makes it impossible for an entity to be damaged or killed, e.g. by biters. Hover over the entity and then run:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destructible = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connect linked belts ===&lt;br /&gt;
If there exist at least two [https://lua-api.factorio.com/latest/prototypes/LinkedBeltPrototype.html linked belts], and one of them has the &amp;quot;Entity tag&amp;quot; &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, and another linked belt has the &amp;quot;Entity tag&amp;quot; &amp;lt;code&amp;gt;out&amp;lt;/code&amp;gt;, then the following command should link these two linked belts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local i = game.get_entity_by_tag(&#039;in&#039;)&lt;br /&gt;
local o = game.get_entity_by_tag(&#039;out&#039;)&lt;br /&gt;
i.linked_belt_type = &#039;input&#039;&lt;br /&gt;
o.linked_belt_type = &#039;output&#039;&lt;br /&gt;
i.connect_linked_belts(o)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Deactivate cars and tanks ===&lt;br /&gt;
The [[car]] and [[tank]] can be used like larger, 2x3 chests, but doing this at a large scale can have a negative performance impact. Deactivating them reduces their performance impact, though it also prevents them from being driven or moved by belts.&lt;br /&gt;
&lt;br /&gt;
Deactivate selected car or tank (hover with mouse then enter command):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.active = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deactivate all cars and tanks on surface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;car&amp;quot;}) do&lt;br /&gt;
  v.active = false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].set_evolution_factor(X, game.player.surface)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the generated world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of the command, it is also possible to use a GUI in the [[map editor]] to changing map generation settings mid game. Access the map editor with &amp;lt;code&amp;gt;/editor&amp;lt;/code&amp;gt;, go to the &amp;quot;Surfaces&amp;quot; tab and click &amp;quot;Edit map gen settings&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
To teleport to a different planet / surface, use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y}, &#039;surface_name&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the character and destroy it:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new character at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
game.player.force.character_resource_reach_distance_bonus = reach&lt;br /&gt;
game.player.force.character_item_drop_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find player corpses ===&lt;br /&gt;
Pings player corpses on the map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local found_corpses = game.player.surface.find_entities_filtered{type=&amp;quot;character-corpse&amp;quot;}&lt;br /&gt;
for _,corpse in pairs(found_corpses) do&lt;br /&gt;
    local player = game.get_player(corpse.character_corpse_player_index)&lt;br /&gt;
    local name = player and player.name or &amp;quot;????&amp;quot;&lt;br /&gt;
    game.player.print(name .. &amp;quot; --&amp;gt; &amp;quot; .. corpse.gps_tag)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character_running_speed_modifier=3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-0.5 is half speed, 0 is normal speed, 1 is double speed, 2 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To research a high level of an infinite technology, set its level:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;worker-robots-speed-7&#039;].level = 100&lt;br /&gt;
/c game.player.force.technologies[&#039;mining-productivity-3&#039;].level = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resetting technology effects to default ===&lt;br /&gt;
This will reset the enabled/unlocked state of all recipes to what they would be purely based on the currently researched technologies, as well as resetting other technology effects like mining speed, etc. Any manual modifications to these effects and recipe unlocks will be undone.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset_technology_effects()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Can be used as a quick workaround when recipes are unavailable after adding or changing mods even though the technology unlocking them has already been researched.&lt;br /&gt;
&lt;br /&gt;
=== Enable ghosts for destroyed entities ===&lt;br /&gt;
This is normally unlocked through researching [[construction robotics (research)]], but this command unlocks it independent of the research.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.create_ghost_on_entity_death = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Access a mod&#039;s data ===&lt;br /&gt;
If the first word of the command is __mod-name__ it will run in the context of the mod with the same name. For instance, this command prints the data from the Even Distribution mod:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c __even-distribution__ game.player.print(serpent.dump(storage))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Print to console the tile under the player ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write mod list to file ===&lt;br /&gt;
Write all currently active mods and their version to the file script-output/mods.txt in the [[user data directory]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c helpers.write_file(&amp;quot;mods.txt&amp;quot;, serpent.block(script.active_mods))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exporting production statistics ===&lt;br /&gt;
Export production statistics out of the game into external JSON files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;/c local timescales = {&lt;br /&gt;
  [defines.flow_precision_index.five_seconds] = &amp;quot;5s&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.one_minute] = &amp;quot;1min&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.ten_minutes] = &amp;quot;10min&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.one_hour] = &amp;quot;1h&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.ten_hours] = &amp;quot;10h&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.fifty_hours] = &amp;quot;50h&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.two_hundred_fifty_hours] = &amp;quot;250h&amp;quot;,&lt;br /&gt;
  [defines.flow_precision_index.one_thousand_hours] = &amp;quot;1000h&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
for surface_name, _ in pairs(game.surfaces) do&lt;br /&gt;
  local flowdata = game.player.force.get_item_production_statistics(surface_name)&lt;br /&gt;
  for timescale_index, timescale_name in pairs(timescales) do&lt;br /&gt;
    local tbl = {}&lt;br /&gt;
    local totals = flowdata.input_counts&lt;br /&gt;
    for item_name, _ in pairs(totals) do&lt;br /&gt;
      local row = {item_name}&lt;br /&gt;
      for i = 1, 300 do&lt;br /&gt;
        table.insert(row, flowdata.get_flow_count{name=item_name, category=&amp;quot;input&amp;quot;, precision_index=timescale_index, sample_index=i, count=true})&lt;br /&gt;
      end&lt;br /&gt;
      table.insert(tbl, row)&lt;br /&gt;
    end&lt;br /&gt;
    helpers.write_file(&amp;quot;stats-&amp;quot; .. surface_name .. &amp;quot;-&amp;quot; .. timescale_name .. &amp;quot;.json&amp;quot;, helpers.table_to_json(tbl), false)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(&amp;quot;Export done&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{History|1.1.92|&lt;br /&gt;
* Added a notification when a technology is researched.&lt;br /&gt;
* Added /enable-research-queue console command to enable the research queue without disabling achievements.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* https://lua-api.factorio.com/latest/index-runtime.html - Factorio API reference for latest version&lt;br /&gt;
&lt;br /&gt;
{{C|Modding}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Pollution&amp;diff=214100</id>
		<title>Pollution</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Pollution&amp;diff=214100"/>
		<updated>2025-05-25T22:43:29Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Trees */ Copy changes from tree article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languages}}&lt;br /&gt;
[[File:Pollution.png|300px|thumb|Example of in-game pollution (red squares) in the map]]&lt;br /&gt;
[[File:pollution_gui.png|300px|thumb|Pollution tab in the production GUI.]]&lt;br /&gt;
&lt;br /&gt;
Pollution is represented as an abstract &amp;quot;cloud&amp;quot;, updated [[Map_structure#Chunk|per chunk]] every 64 [[Time#Ticks|ticks]] (which is 4 ticks more than a game-second). It is visible on the map if the &amp;quot;pollution&amp;quot; setting is on, and appears as a blocky red cloud.&lt;br /&gt;
&lt;br /&gt;
It is produced by many buildings involved in processing items and spreads outwards at a steady rate.&lt;br /&gt;
&lt;br /&gt;
The [[Enemies#Evolution|evolution factor]] is not increased by the spreading/absorbed pollution, but by the pollution produced by all the player&#039;s [[Pollution#Polluters|machinery]] at every tick. This means that no matter how hard the player tries to contain the pollution, [[enemies]] will still evolve at the same rate. They just won&#039;t attack the player as frequently. The pollution cloud is used to trigger biter attacks and determines the size of the attacks.&lt;br /&gt;
&lt;br /&gt;
Pollution settings can be changed via [[map generator|map generation]] settings, or can be disabled entirely.&lt;br /&gt;
&lt;br /&gt;
== Pollution spread ==&lt;br /&gt;
&lt;br /&gt;
As soon as a chunk has reached 15.0 pollution it starts spreading in all four cardinal directions at a rate of 2% per 64 ticks. Pollution can generate new chunks if it needs to spread to them.&lt;br /&gt;
&lt;br /&gt;
For example, a chunk with 400.0 pollution and 4 adjacent chunks with 100.0 pollution each, raises the pollution in all adjacent chunks by 8.0 while reducing its own pollution by 32.0. But every one of the 4 surrounding spreads 2.0 pollution &amp;quot;back&amp;quot; to the center chunk, so it only loses 24.0 + [[Pollution#De-polluters|absorbed value]].&lt;br /&gt;
&lt;br /&gt;
== Pollution dissipation==&lt;br /&gt;
&lt;br /&gt;
* Every [[Map_structure#Chunk|chunk]] (32x32) of map slowly reduces the pollution it covers (See [[#Chunks]]). So the more the pollution spreads, the more is absorbed.&lt;br /&gt;
* [[Tree]]s also absorb some pollution (See [[#Trees]]).&lt;br /&gt;
* [[Enemies#Spawner|Spawners]] absorb a great amount of pollution, and use this to assign enemies to attacks.&lt;br /&gt;
&lt;br /&gt;
== Native life ==&lt;br /&gt;
Pollution attracts [[Enemies#Biters|biters]] to the Player&#039;s factory. Biters who find themselves in a polluted area will attempt to reach the source of pollution and destroy it. Any [[water]] near the source of pollution will turn green, which is a visual-only effect. The effect can be turned off by disabling animated water in the graphics settings.&lt;br /&gt;
&lt;br /&gt;
If a chunk&#039;s pollution is greater than 20, each enemy spawner absorbs 20 + 0.01 * [chunk&#039;s pollution] every 64 ticks, otherwise it absorbs 3 times the amount of pollution needed for the most expensive unit it can spawn for the current evolution factor. &lt;br /&gt;
&lt;br /&gt;
Higher pollution values decrease the time it takes for biters to join the attack force. After a certain amount of pollution is absorbed the spawner sends one of its biters/spitters to a rendezvous point. Every 1 to 10 minutes (random) the mustered biters launch an attack. If not all biters have arrived at the rendezvous point by that time, they will wait up to an additional 2 minutes for stragglers.&lt;br /&gt;
&lt;br /&gt;
This also applies to [[Enemies#Wrigglers|pentapods]]{{SA}} on [[Gleba]]{{SA}}.&lt;br /&gt;
&lt;br /&gt;
Required pollution to add an additional biter/spitter to the attack wave:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot; &lt;br /&gt;
! style=&amp;quot;width: 100px;&amp;quot; | Type&amp;amp;nbsp;&lt;br /&gt;
! style=&amp;quot;width: 130px;&amp;quot; | Pollution&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|  Small biter&amp;amp;nbsp; || 4&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|  Medium biter&amp;amp;nbsp; || 20&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Big biter&amp;amp;nbsp; || 80&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|  Behemoth biter&amp;amp;nbsp; || 400&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Small spitter&amp;amp;nbsp; || 4&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|  Medium spitter&amp;amp;nbsp; || 12&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Big spitter&amp;amp;nbsp; || 30&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Behemoth spitter&amp;amp;nbsp; || 200&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
[[Module]]s that list &amp;quot;+x% pollution&amp;quot; increase pollution multiplier, not a flat pollution rate. Final pollution value is (pollution multiplier * energy usage multiplier * base pollution), meaning heavily boosted buildings are likely to account for most of the pollution produced in a factory.&lt;br /&gt;
&lt;br /&gt;
== Production/Absorption ==&lt;br /&gt;
These tables contain information about the levels of pollution produced/absorbed by items in the base game.&lt;br /&gt;
=== Polluters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Structure !! Pollution per minute at full power&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Stone furnace}} || 2&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel furnace}} || 4&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Electric furnace}} || 1&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Burner mining drill}} || 12&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Electric mining drill}} || 10&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Pumpjack}} || 10&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Assembling machine 1}} || 4&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Assembling machine 2}} || 3&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Assembling machine 3}} || 2&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Boiler}} || 30&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Oil refinery}} || 6&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Chemical plant}} || 4&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Centrifuge}} || 4&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Fire on the ground and burning trees produce 0.3 pollution per minute.&lt;br /&gt;
&lt;br /&gt;
=== [[Space Age]]{{SA}} polluters ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Structure !! Pollution per minute at full power&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Foundry}} &lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Electromagnetic plant}}&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Cryogenic plant}}&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Recycler}}&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Big mining drill}}&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Heating tower}}&lt;br /&gt;
| 100&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Biolab}}&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Crusher}}&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== De-polluters ===&lt;br /&gt;
&lt;br /&gt;
==== Spawners ====&lt;br /&gt;
Every 64 ticks, spawners absorb pollution until they have absorbed more than 3 times the amount needed to send the [[Enemies#Creatures|most expensive unit]] at the current evolution level.&lt;br /&gt;
&lt;br /&gt;
If they have not absorbed more than that threshold, they will absorb 20 + 0.01 * [chunk&#039;s pollution] and check the threshold again.&lt;br /&gt;
&lt;br /&gt;
Note that absorbing pollution is not for spawning biters, but for sending biters to an attack group. Spawners will spawn enemies regardless of pollution absorption until they reach their spawn limit.&lt;br /&gt;
&lt;br /&gt;
[[Captive biter spawner]]s {{SA}} absorb 1 pollution per minute. Captive spawners which have decayed to the wild type use the rules above for pollution absorption.&lt;br /&gt;
&lt;br /&gt;
==== Chunks ====&lt;br /&gt;
Every chunk has a natural absorption rate per second which is determined by the sum of the pollution absorption of its floor [[tile]]s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tile !! Pollution per tile per second !! Pollution per chunk per minute&lt;br /&gt;
|-&lt;br /&gt;
| Water, green water, deep water, deep green water, shallow water, mud water  || -0.000025 || -1.536&lt;br /&gt;
|-&lt;br /&gt;
| Grass 1-4 || -0.000018 || -1.10592&lt;br /&gt;
|-&lt;br /&gt;
| Dirt 1-7, dry dirt || -0.000018 || -1.10592&lt;br /&gt;
|-&lt;br /&gt;
| Red desert 0-3 || -0.000015 || -0.9216&lt;br /&gt;
|-&lt;br /&gt;
| Sand 1-3 || -0.000015 || -0.9216&lt;br /&gt;
|-&lt;br /&gt;
| Nuclear ground || -0.0000125 || -0.768&lt;br /&gt;
|-&lt;br /&gt;
| Path tiles (Stone bricks, concrete etc), landfill || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Special tiles (Lab tiles, tutorial grid, Water Wube) || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Out of map || -0.0001 || -6.144&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Trees ====&lt;br /&gt;
&lt;br /&gt;
Every single [[tree]] absorbs a small amount of pollution in its chunk per second. If the total pollution in a chunk is above 60 units, once per second some of the trees in that chunk each have a chance to either lose one stage of leaves (33% or 50% damage) or have their leaves become one stage more gray (6.7% damage). Regardless of whether the tree loses leaves or gets grayer, 10 pollution are absorbed by the tree.&amp;lt;br&amp;gt;&lt;br /&gt;
A tree stops losing leaves/becoming more gray once the sum of its gray percentage and its leaves lost percentage is above 120%. Half of trees stop their leaf progression one stage earlier. As the grayness and leaf stage are then locked for that tree forever, it is possible for trees to keep some leaves in heavily polluted chunks but in turn be very gray, or the other way around.&amp;lt;br&amp;gt;&lt;br /&gt;
The less dense the leaves, the slower the tree absorbs pollution, however tree grayness does not affect pollution absorption.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Object !! Stage !! Pollution per second&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | [[File:Green tree.png|120px]] Tree, red tree, brown tree || 0 (Max leaf density) || -0.001&lt;br /&gt;
|-&lt;br /&gt;
| 1 || -0.00067&lt;br /&gt;
|-&lt;br /&gt;
| 2 || -0.00033&lt;br /&gt;
|-&lt;br /&gt;
| 3 (Min leaf density) || 0&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dead dry hairy tree.png|120px]] Dead dry hairy tree || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dead grey trunk.png|120px]] Dead gray trunk || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dead tree desert.png|120px]] Dead tree - desert|| No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dry hairy tree.png|120px]] Dry hairy tree || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dry tree.png|120px]] Dry tree || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Biochambers{{SA}} ====&lt;br /&gt;
&lt;br /&gt;
The [[biochamber]] &amp;quot;generates&amp;quot; negative pollution, at a base rate of -1 per minute. This effectively means that the building removes pollution while active.&lt;br /&gt;
&lt;br /&gt;
This pollution value works like any other building, including how it scales with energy consumption. That is, if a module affects its energy consumption, the pollution is proportionately higher as well. However, because the base rate is negative, the Biochamber &amp;quot;generates&amp;quot; more negative pollution. [[Productivity module]]s and their direct pollution increase work in a similar way, boosting the negative pollution of the building even more.&lt;br /&gt;
&lt;br /&gt;
== Spores {{SA}} ==&lt;br /&gt;
&lt;br /&gt;
Spores are a unique form of pollution generated on Gleba. They are made when [[yumako tree]]s or [[jellystem]]s are harvested (not destroyed). Spores do not attract biters, but rather attract pentapods. Spores are consumed by most tiles. They are displayed as green squares on the map. All machines &#039;&#039;&#039;do not&#039;&#039;&#039; make spores, with the only exception being the [[agricultural tower]].&lt;br /&gt;
&lt;br /&gt;
[[File:Spores on map.png|250px|thumb|right|Spores]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Entity !! Spores generated !! Generates spores&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Yumako tree}} &lt;br /&gt;
| 15&lt;br /&gt;
| Per harvest&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Jellystem}}&lt;br /&gt;
| 15&lt;br /&gt;
| Per harvest&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Agricultural tower}}&lt;br /&gt;
| 4&lt;br /&gt;
| Always&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
:&lt;br /&gt;
:&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
Pollution is directly connected to the following achievement:&lt;br /&gt;
{{Achievement|it-stinks-and-they-dont-like-it}}&lt;br /&gt;
Spores are directly connected to the following achievement:&lt;br /&gt;
{{Achievement|it-stinks-and-they-do-like-it}}&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|2.0.43|&lt;br /&gt;
* Trees no longer take damage from spores nor absorb spores as a result of taking pollution damage.&lt;br /&gt;
* Gleba wetlands, lowlands, and water tiles now absorb 3 times as many spores as other tiles.}}&lt;br /&gt;
&lt;br /&gt;
{{history|2.0.7|&lt;br /&gt;
* Greatly increased default tile pollution absorption. (Out of map x10, water and nuclear ground x5, rest roughly x2.5)}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.17.12|&lt;br /&gt;
* Added pollution tab to the production statistics.&lt;br /&gt;
* Spawner tooltip (including the pollution statistics), shows distribution of biters spawn for the current evolution factor with the pollution costs.&lt;br /&gt;
* Pollution generation is now shown in the x/s format both on the entity and in the item/crafting slot.&lt;br /&gt;
* Internal pollution values have been normalized, and they are now roughly 60 times less compared to what they were.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.17.0|&lt;br /&gt;
* Rebalanced assembling machine 1,2 and 3 power consumption and pollution - higher tiers eat more power, but produce less pollution.&lt;br /&gt;
* Changed spawner pollution absorption logic so that all the pollution on a chunk doesn&#039;t build up un-spent in a single spawner.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.2|&lt;br /&gt;
* Optimized rendering of huge pollution clouds on the map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Large amounts of pollution is created when burning fires.&lt;br /&gt;
* Pollution creation of the productivity module was reduced drastically.&lt;br /&gt;
* Optimized pollution rendering on map and minimap.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* [[Tree]]s degenerate slowly when exposed to pollution at high levels. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.0|&lt;br /&gt;
* Added option to turn off pollution visibility even when detailed info is on. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.7.1|&lt;br /&gt;
* Speed modules no longer produce extra pollution.&lt;br /&gt;
* Added missing pollution descriptions.&lt;br /&gt;
* Pollution is only shown on the minimap with alt mode on.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.7.0|&lt;br /&gt;
* Introduced concept of pollution.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Crafting]]&lt;br /&gt;
* [[Module]]s&lt;br /&gt;
* [[Enemies]]&lt;br /&gt;
&lt;br /&gt;
{{C|Main}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=213625</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=213625"/>
		<updated>2025-04-26T15:21:21Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Normal commands */ Add space age alerts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{Keybinding|grave}} key (&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;). This is the key located to the left of the &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; key, above &amp;lt;code&amp;gt;Tab&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Settings menu → Controls → Toggle chat (and Lua console)&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. The fade-out time can be changed via &#039;&#039;&#039;Settings menu → Interface → Chat message delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key provides intelligent code completion on commands, options and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair_packs, platform_tile_building_blocked, turret_out_of_ammo, turret_fire, custom, no_storage, train_out_of_fuel, train_no_path, no_platform_storage, collector_path_blocked, unclaimed_cargo, no_roboport_storage, pipeline_overextended.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGB_color_space|RGB value]] in the format of “# # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the [[permissions]] GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /permissions &amp;lt;action&amp;gt; &amp;lt;parameters&amp;gt;&lt;br /&gt;
| /permissions add-player DeveloperGroup kovarex&lt;br /&gt;
| Available actions are add-player &amp;lt;group&amp;gt; &amp;lt;player&amp;gt;, create-group &amp;lt;name&amp;gt;, delete-group &amp;lt;group&amp;gt;, edit-group &amp;lt;group&amp;gt; &amp;lt;input_action&amp;gt; &amp;lt;true/false&amp;gt;, get-player-group &amp;lt;player&amp;gt;, remove-player &amp;lt;group&amp;gt; &amp;lt;player&amp;gt;, rename-group &amp;lt;group&amp;gt; &amp;lt;new_name&amp;gt; and reset&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reset-tips&lt;br /&gt;
| /reset-tips&lt;br /&gt;
| Resets the state of the tips and tricks as if the game was just started for the first time.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all [[shortcut bar]] items, including blueprint string import, copy &amp;amp; paste, deconstruction and upgrade planner.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-tips&lt;br /&gt;
| /unlock-tips&lt;br /&gt;
| Unlocks all tips and tricks entries.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /bans&lt;br /&gt;
| /bans&lt;br /&gt;
| Prints a list of banned players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config&lt;br /&gt;
| /config&lt;br /&gt;
| Opens the server configuration GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public. The units for the options afk-auto-kick and autosave-interval are in minutes.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /p [online/o/count/c]&lt;br /&gt;
| /p o c&lt;br /&gt;
| Same as /players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat [all/&amp;lt;planet-name&amp;gt;/&amp;lt;platform-name&amp;gt;/off]&lt;br /&gt;
| Researches all technologies and enables cheat mode (allowing free crafting of any item). &lt;br /&gt;
* Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
* Specifying a &#039;&#039;planet-name&#039;&#039; or &#039;&#039;platform-name&#039;&#039; also moves the player to the origin of the specified planet or platform.&lt;br /&gt;
* Using the &#039;&#039;&#039;off&#039;&#039;&#039; option turns cheat mode off.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /mc &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|-&lt;br /&gt;
| /sc &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In freeplay, the farthest you can zoom out is 0.3. In the map editor, it is 0.1. Smaller zoom values will be clamped.&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
Note: Specific technologies can be researched using the [[map editor]] by shift clicking the &amp;quot;start research&amp;quot; button on the technology GUI.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Specific technologies can be unresearched using the [[map editor]] by clicking the &amp;quot;un-research&amp;quot; button on the technology GUI.&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set all trains to Automatic mode ===&lt;br /&gt;
Set all trains to automatic mode - for example after building them with a blueprint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for key,ent in pairs (game.player.surface.find_entities_filtered{name=&amp;quot;locomotive&amp;quot;}) do &lt;br /&gt;
    ent.train.manual_mode = false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several god-mode items available:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;infinity-chest&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;infinity-pipe&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;electric-energy-interface&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;heat-interface&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fission-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fission-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fission-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Increase player inventory slots ===&lt;br /&gt;
Gives 100 additional bonus inventory slots to your entire force. Used by the [[Toolbelt (research)]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.character_inventory_slots_bonus=100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete unrevealed chunks ===&lt;br /&gt;
This command deletes chunks that are not revealed by the player. Can be used after the command for [[#Hide revealed map|hiding revealed map]] to delete the chunks not covered by radar.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if not force.is_chunk_charted(surface, chunk) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time. Unfreezes it if you by replace &amp;quot;true&amp;quot; with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, who placed them ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at &amp;quot; .. speaker.gps_tag)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground_tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more flexibility, the [[map editor]] can also be used to create/alter/remove resource patches.&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new water patch ===&lt;br /&gt;
&lt;br /&gt;
This creates a small pond in a 4x2 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c&lt;br /&gt;
local waterTiles = {}&lt;br /&gt;
for y=2,4 do&lt;br /&gt;
 for x=-2,2 do&lt;br /&gt;
  table.insert(waterTiles, {name=&amp;quot;water&amp;quot;, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
 end&lt;br /&gt;
 game.player.surface.set_tiles(waterTiles)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regenerate resources ===&lt;br /&gt;
For solid resources like iron, destroys all resource entities and creates resource entities as in the original map generation. For fluid resources like oil, sets the yield of all existing resource entities to the original amount. Regenerates resources on the entire surface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{type=&amp;quot;resource&amp;quot;}) do&lt;br /&gt;
  if e.prototype.infinite_resource then&lt;br /&gt;
    e.amount = e.initial_amount&lt;br /&gt;
  else&lt;br /&gt;
    e.destroy()&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
local non_infinites = {}&lt;br /&gt;
for resource, prototype in pairs(prototypes.get_entity_filtered{{filter=&amp;quot;type&amp;quot;, type=&amp;quot;resource&amp;quot;}}) do&lt;br /&gt;
  if not prototype.infinite_resource then&lt;br /&gt;
    table.insert(non_infinites, resource)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
surface.regenerate_entity(non_infinites)&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{type=&amp;quot;mining-drill&amp;quot;}) do&lt;br /&gt;
    e.update_connections()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Making a structure indestructible ===&lt;br /&gt;
This makes it impossible for an entity to be damaged or killed, e.g. by biters. Hover over the entity and then run:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destructible = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connect linked belts ===&lt;br /&gt;
If there exist at least two [https://lua-api.factorio.com/latest/prototypes/LinkedBeltPrototype.html linked belts], and one of them has the &amp;quot;Entity tag&amp;quot; &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt;, and another linked belt has the &amp;quot;Entity tag&amp;quot; &amp;lt;code&amp;gt;out&amp;lt;/code&amp;gt;, then the following command should link these two linked belts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local i = game.get_entity_by_tag(&#039;in&#039;)&lt;br /&gt;
local o = game.get_entity_by_tag(&#039;out&#039;)&lt;br /&gt;
i.linked_belt_type = &#039;input&#039;&lt;br /&gt;
o.linked_belt_type = &#039;output&#039;&lt;br /&gt;
i.connect_linked_belts(o)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].set_evolution_factor(X, game.player.surface)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the generated world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of the command, it is also possible to use a GUI in the [[map editor]] to changing map generation settings mid game. Access the map editor with &amp;lt;code&amp;gt;/editor&amp;lt;/code&amp;gt;, go to the &amp;quot;Surfaces&amp;quot; tab and click &amp;quot;Edit map gen settings&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
To teleport to a different planet / surface, use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y}, &#039;surface_name&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the character and destroy it:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new character at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
game.player.force.character_resource_reach_distance_bonus = reach&lt;br /&gt;
game.player.force.character_item_drop_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find player corpses ===&lt;br /&gt;
Pings player corpses on the map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local found_corpses = game.player.surface.find_entities_filtered{type=&amp;quot;character-corpse&amp;quot;}&lt;br /&gt;
for _,corpse in pairs(found_corpses) do&lt;br /&gt;
    local player = game.get_player(corpse.character_corpse_player_index)&lt;br /&gt;
    local name = player and player.name or &amp;quot;????&amp;quot;&lt;br /&gt;
    game.player.print(name .. &amp;quot; --&amp;gt; &amp;quot; .. corpse.gps_tag)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character_running_speed_modifier=3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-0.5 is half speed, 0 is normal speed, 1 is double speed, 2 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To research a high level of an infinite technology, set its level:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;worker-robots-speed-6&#039;].level = 100&lt;br /&gt;
/c game.player.force.technologies[&#039;mining-productivity-4&#039;].level = 100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resetting technology effects to default ===&lt;br /&gt;
This will reset the enabled/unlocked state of all recipes to what they would be purely based on the currently researched technologies, as well as resetting other technology effects like mining speed, etc. Any manual modifications to these effects and recipe unlocks will be undone.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset_technology_effects()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Can be used as a quick workaround when recipes are unavailable after adding or changing mods even though the technology unlocking them has already been researched.&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Access a mod&#039;s data ===&lt;br /&gt;
If the first word of the command is __mod-name__ it will run in the context of the mod with the same name. For instance, this command prints the data from the Even Distribution mod:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c __even-distribution__ game.player.print(serpent.dump(global))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Print to console the tile under the player ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write mod list to file ===&lt;br /&gt;
Write all currently active mods and their version to the file script-output/mods.txt in the [[user data directory]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c helpers.write_file(&amp;quot;mods.txt&amp;quot;, serpent.block(script.active_mods))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{History|1.1.92|&lt;br /&gt;
* Added a notification when a technology is researched.&lt;br /&gt;
* Added /enable-research-queue console command to enable the research queue without disabling achievements.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* https://lua-api.factorio.com/latest/index-runtime.html - Factorio API reference for latest version&lt;br /&gt;
&lt;br /&gt;
{{C|Modding}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tree&amp;diff=212409</id>
		<title>Tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tree&amp;diff=212409"/>
		<updated>2025-03-11T03:51:27Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add damage percentage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Tree}}&lt;br /&gt;
&#039;&#039;&#039;Trees&#039;&#039;&#039; are plants in Factorio. They can be mined for [[wood]], and are the only source of it.  Trees are obstacles to construction and must be cleared to provide building space, but they also reduce [[pollution]], so take care not to remove more than necessary. Currently, trees cannot be replanted in the vanilla version of the game, though they can be in {{SA}} [[Space Age]]. While [[Nauvis]] has standard Earth-like trees, [[Gleba]]{{SA}} also has alien tree-like structures. [[Vulcanus]]{{SA}} contains ashland trees, which yield small amounts of carbon when destroyed.&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
{{Achievement|run-forrest-run}}&lt;br /&gt;
{{Achievement|pyromaniac}}&lt;br /&gt;
&lt;br /&gt;
== Good methods to remove trees ==&lt;br /&gt;
&lt;br /&gt;
* Mining by hand (*)&lt;br /&gt;
* Shooting swaths of trees with a [[shotgun]] or [[combat shotgun]]&lt;br /&gt;
* Using [[grenade]]s to blow them up&lt;br /&gt;
* Using [[Poison capsule|poison]] to kill them&lt;br /&gt;
* Having construction robots harvest them using a [[deconstruction planner]] (*)&lt;br /&gt;
* Knocking them down by driving a [[tank]] over them&lt;br /&gt;
* Burning them with a [[flamethrower]], causing a forest fire&lt;br /&gt;
* Burning them with a flamethrower while in a tank&lt;br /&gt;
* Using [[atomic bomb]]s to blow them up&lt;br /&gt;
* Being harvested and replanted by an [[agricultural tower]]{{SA}} (*)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;i&amp;gt;(*) Usable to collect wood. Dead trees (except the dry tree) will give 2 wood and have a mining time of 0.5. Live trees (and the dry tree) will give 4 wood and have a mining time of 0.55. All other methods destroy both the tree and the wood.&amp;lt;/i&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fires ==&lt;br /&gt;
[[File:ForestFireBegins.gif|frame|A forest fire spreads rapidly after a few moments.]]&lt;br /&gt;
Trees can be set on fire by [[flamethrower]]s and [[flamethrower turret]]s. The fire will spread from tree to tree, releasing high amounts of [[pollution]] and leaving stumps and charred trees behind.&lt;br /&gt;
&lt;br /&gt;
Once on fire, trees cannot be extinguished, but the spread of the fire can be limited by creating a [[wikipedia:Firebreak|fire break]].&lt;br /&gt;
&lt;br /&gt;
== Pollution removal ==&lt;br /&gt;
&lt;br /&gt;
Every single tree absorbs a small amount of [[pollution]] in its chunk per second. If the total pollution in a [[chunk]] is above 60 units, once per second some of the trees in that chunk each have a chance to either lose one stage of leaves (33% or 50% damage) or have their leaves become one stage more gray (6.7% damage). Regardless of whether the tree loses leaves or gets grayer, 10 pollution are absorbed by the tree.&amp;lt;br&amp;gt;&lt;br /&gt;
A tree stops losing leaves/becoming more gray once the sum of its gray percentage and its leaves lost percentage is above 120%. Half of trees stop their leaf progression one stage earlier. As the grayness and leaf stage are then locked for that tree forever, it is possible for trees to keep some leaves in heavily polluted chunks but in turn be very gray, or the other way around.&amp;lt;br&amp;gt;&lt;br /&gt;
The less dense the leaves, the slower the tree absorbs pollution, however tree grayness does not affect pollution absorption.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Object !! Stage !! Pollution per second&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | [[File:Green tree.png|120px]] Tree, red tree, brown tree || 0 (Max leaf density) || -0.001&lt;br /&gt;
|-&lt;br /&gt;
| 1 || -0.00067&lt;br /&gt;
|-&lt;br /&gt;
| 2 || -0.00033&lt;br /&gt;
|-&lt;br /&gt;
| 3 (Min leaf density) || 0&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dead dry hairy tree.png|120px]] Dead dry hairy tree || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dead grey trunk.png|120px]] Dead gray trunk || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dead tree desert.png|120px]] Dead tree - desert|| No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dry hairy tree.png|120px]] Dry hairy tree || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Dry tree.png|120px]] Dry tree || No stages || -0.0001&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Agriculture ==&lt;br /&gt;
{{About/Space age}}&lt;br /&gt;
Trees can be grown on Nauvis by planting [[tree seed]]s, either manually or via the [[agricultural tower]]. Grown trees take 10 minutes to reach full maturity, and they will yield 4 [[wood]] when harvested. The agricultural tower will automatically harvest mature trees in its range, replanting them if they have available seeds.&lt;br /&gt;
&lt;br /&gt;
Tree seeds are produced from [[wood processing]]. 2 wood can be converted into one seed. Because mature trees yield 4 wood, if all wood produced from harvesting mature trees is processed, the seed supply will increase. Tree seeds are [[Fuel#Burnable_fuel|burnable fuel]] fuel and thus can be disposed of easily.&lt;br /&gt;
&lt;br /&gt;
Growing trees can be used to create renewable barriers against pollution spread. Note that the agriculture tower cannot grow seeds as densely as a player can manually plant them. The tower will always put two tiles of empty space between each tree.&lt;br /&gt;
&lt;br /&gt;
==Gallery==&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;250px&amp;quot; heights=&amp;quot;190px&amp;quot;&amp;gt;&lt;br /&gt;
File:gleba_trees.png|Tree-like plants on Gleba.&lt;br /&gt;
File:Vulcanus_trees.png|Ashland trees on Vulcanus.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.18.0|&lt;br /&gt;
* Added animation to trees.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.17.0|&lt;br /&gt;
* New graphics.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.16.0|&lt;br /&gt;
* Tanks no longer take miniscule amounts of damage from hitting trees.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.28|&lt;br /&gt;
* Damaging a tree with impact or physical damage generates some leaves.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Added fire. Fire will spread between trees and cause forest fires, causing a large amount of pollution to be released.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Trees degenerate slowly when there are high pollution levels.&lt;br /&gt;
* Trees regenerate health slowly.&lt;br /&gt;
* Trees have generally smaller bounding boxes, so it is easier to walk through forest.&lt;br /&gt;
* New tree graphics. Trees have 4 levels of leaves and the leaves are colorable.&lt;br /&gt;
* Trees emit leaves (based on the tree color) when being mined and destroyed.&lt;br /&gt;
* Trees emit branches when mined or destroyed.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.9.2|&lt;br /&gt;
* Changed the amount of wood in dry tree from 1 -&amp;gt; 4.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.9.0|&lt;br /&gt;
* New graphics: 10 types of trees that replace the outdated 2 types.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.3.0|&lt;br /&gt;
* New tree graphics (8 dry trees  12  big trees).}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Wood]]&lt;br /&gt;
* [[Pollution]]&lt;br /&gt;
&lt;br /&gt;
{{EnvironmentNav}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Infobox:Processing_unit&amp;diff=208584</id>
		<title>Infobox:Processing unit</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Infobox:Processing_unit&amp;diff=208584"/>
		<updated>2025-01-01T06:07:24Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Remove satellite from space age mod&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|prototype-type = item&lt;br /&gt;
|internal-name = processing-unit&lt;br /&gt;
|category = Intermediate products&lt;br /&gt;
|stack-size=100&lt;br /&gt;
|rocket-capacity=300 (3 {{Translation|stacks}})&lt;br /&gt;
|recipe = Time, 10 + Advanced circuit, 2 + Electronic circuit, 20 + Sulfuric acid, 5&lt;br /&gt;
|total-raw = Time, 54 + Copper plate, 40 + Iron plate, 24 + Plastic bar, 4 + Sulfuric acid, 5&lt;br /&gt;
|required-technologies = Processing unit&lt;br /&gt;
|producers = Assembling machine 2 + Assembling machine 3 + Electromagnetic plant &lt;br /&gt;
|consumers = Atomic bomb + Cargo landing pad + Discharge defense + Efficiency module 2 + Efficiency module 3 + Energy shield MK2 + Exoskeleton + Portable fission reactor + Personal battery MK2 + Personal laser defense + Personal roboport MK2 + Power armor + Power armor MK2 + Productivity module 2 + Productivity module 3 + Rocket part + Rocket silo + Satellite + Speed module 2 + Speed module 3 + Spidertron + Utility science pack&lt;br /&gt;
|changed-by-space-age-mod = yes&lt;br /&gt;
|space-age-consumers = Artillery turret + Artillery wagon + Asteroid collector + Atomic bomb + Capture bot rocket + Cargo bay + Cargo landing pad + Cryogenic plant + Discharge defense + Electromagnetic plant + Efficiency module 2 + Efficiency module 3 + Energy shield MK2 + Exoskeleton + Mech armor + Personal battery MK2 + Personal laser defense + Personal roboport MK2 + Portable fission reactor + Power armor + Power armor MK2 + Productivity module 2 + Productivity module 3 + Quality module 2 + Quality module 3 + Quantum processor + Recycler + Rocket part + Rocket silo + Rocket turret + Space platform starter pack + Speed module 2 + Speed module 3 + Spidertron + Stack inserter + Tesla turret + Thruster + Turbo splitter + Utility science pack&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Infobox page]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Infobox:Quality_module_2&amp;diff=207512</id>
		<title>Infobox:Quality module 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Infobox:Quality_module_2&amp;diff=207512"/>
		<updated>2024-12-05T00:46:17Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Remove electromagnetic plant from base mod producers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|space-age = yes&lt;br /&gt;
|prototype-type = module&lt;br /&gt;
|internal-name = quality-module-2&lt;br /&gt;
|category = Production&lt;br /&gt;
|stack-size = 50&lt;br /&gt;
|speed = -5%&lt;br /&gt;
|quality = {{Quality|+2%|+2.6%|+3.2%|+3.8%|+5%}}&lt;br /&gt;
|recipe = Time, 30 + Advanced circuit, 5 + Processing unit, 5 + Quality module, 4&lt;br /&gt;
|total-raw = Time, 352.5 + Copper plate, 155 + Iron plate, 70 + Plastic bar, 50 + Processing unit, 5&lt;br /&gt;
|required-technologies = Quality module 2 (research)&lt;br /&gt;
|producers = Assembling machine + Player&lt;br /&gt;
|consumers = Quality module 3&lt;br /&gt;
&lt;br /&gt;
|changed-by-space-age-mod=yes&lt;br /&gt;
|space-age-recipe = Time, 30 + Advanced circuit, 5 + Processing unit, 5 + Quality module, 4&lt;br /&gt;
|space-age-total-raw = Time, 352.5 + Copper plate, 155 + Iron plate, 70 + Plastic bar, 50 + Processing unit, 5&lt;br /&gt;
|space-age-producers = Assembling machine + Electromagnetic plant + Player&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Infobox page]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Infobox:Quality_module_3&amp;diff=207511</id>
		<title>Infobox:Quality module 3</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Infobox:Quality_module_3&amp;diff=207511"/>
		<updated>2024-12-05T00:44:22Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Update base mod producers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|space-age = yes&lt;br /&gt;
|prototype-type = module&lt;br /&gt;
|internal-name = quality-module-3&lt;br /&gt;
|category = Production&lt;br /&gt;
|stack-size = 50&lt;br /&gt;
|speed = -5%&lt;br /&gt;
|quality = {{Quality|+2.5%|+3.2%|+4%|+4.7%|+6.2%}}&lt;br /&gt;
|recipe = Time, 60 + Advanced circuit, 5 + Processing unit, 5 + Quality module 2, 4&lt;br /&gt;
|total-raw = Time, 1500 + Iron plate, 290 + Copper plate, 645 + Plastic bar, 210 + Processing unit, 25&lt;br /&gt;
|required-technologies = Quality module 3 (research)&lt;br /&gt;
|producers = Assembling machine + Player&lt;br /&gt;
&lt;br /&gt;
|changed-by-space-age-mod=yes&lt;br /&gt;
|space-age-recipe = Time, 60 + Advanced circuit, 5 + Processing unit, 5 + Superconductor, 1 + Quality module 2, 4&lt;br /&gt;
|space-age-total-raw = Time, 1500 + Iron plate, 290 + Copper plate, 645 + Plastic bar, 210 + Processing unit, 25 + Superconductor, 1&lt;br /&gt;
|space-age-producers = Assembling machine + Electromagnetic plant + Player&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Infobox page]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Infobox:Quality_module_3&amp;diff=207494</id>
		<title>Infobox:Quality module 3</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Infobox:Quality_module_3&amp;diff=207494"/>
		<updated>2024-12-04T02:23:12Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add base recipe which is available with only the Quality mod.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|space-age = yes&lt;br /&gt;
|prototype-type = module&lt;br /&gt;
|internal-name = quality-module-3&lt;br /&gt;
|category = Production&lt;br /&gt;
|stack-size = 50&lt;br /&gt;
|speed = -5%&lt;br /&gt;
|quality = {{Quality|+2.5%|+3.2%|+4%|+4.7%|+6.2%}}&lt;br /&gt;
|recipe = Time, 60 + Advanced circuit, 5 + Processing unit, 5 + Quality module 2, 4&lt;br /&gt;
|total-raw = Time, 1500 + Iron plate, 290 + Copper plate, 645 + Plastic bar, 210 + Processing unit, 25&lt;br /&gt;
|required-technologies = Quality module 3 (research)&lt;br /&gt;
|producers = Assembling machine + Electromagnetic plant + Player&lt;br /&gt;
&lt;br /&gt;
|changed-by-space-age-mod=yes&lt;br /&gt;
|space-age-recipe = Time, 60 + Advanced circuit, 5 + Processing unit, 5 + Superconductor, 1 + Quality module 2, 4&lt;br /&gt;
|space-age-total-raw = Time, 1500 + Iron plate, 290 + Copper plate, 645 + Plastic bar, 210 + Processing unit, 25 + Superconductor, 1&lt;br /&gt;
|space-age-producers = Assembling machine + Electromagnetic plant + Player&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Infobox page]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Circuit_network&amp;diff=187666</id>
		<title>Circuit network</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Circuit_network&amp;diff=187666"/>
		<updated>2021-12-04T09:51:21Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&#039;&#039;&#039;Circuit networks&#039;&#039;&#039; are built using [[Red wire|red]] or [[green wire]], and enable the control of receivers, based upon information broadcast onto the network by connected senders.  Most senders are storage devices, and broadcast their information onto a specific channel, based on the item or liquid the storage device contains.  Each circuit network contains a channel for every kind of item, as well as 48 extra [[#Virtual signals|virtual signals]] which act as user-definable channels. &#039;&amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;&#039;, &#039;&amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;&#039; and &#039;&amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;&#039; are also available wildcards.&lt;br /&gt;
&lt;br /&gt;
[[File:shared_circuit_network.png|thumb|600px|right|Two circuit networks shared over one [[small electric pole]].]]&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== Send information ===&lt;br /&gt;
Senders broadcast the amount of items or fluids they contain or other data definable by the player. Each amount is broadcast as a numeric value on a &#039;channel&#039; corresponding to the item.  For example, a Storage Tank containing 1000 Crude Oil will broadcast 1000 on the Crude Oil channel.&lt;br /&gt;
&lt;br /&gt;
The channels are separated from each other, so each network can simultaneously carry a number for each item and fluid in the game, and for each of the extra user-defined channels (digits 0-9, letters A-Z, and 9 different colors). All unused channels have the value zero.&lt;br /&gt;
&lt;br /&gt;
Multiple broadcasts of the same item or fluid are additive: If there are two connected Storage Tanks with 1000 Crude Oil each, the value of the Crude Oil channel within the network will be 2000.&lt;br /&gt;
&lt;br /&gt;
All wires of the same color which are connected together by junctions form a network, i.e. they will pass their signals to each other.  For example, if two red wires are connected to the same combinator input, each wire receives the content from the other.  This can result in feedback if care is not taken; see Feedback (under [[#Combinators|arithmetic combinator]], below) for discussion.&lt;br /&gt;
&lt;br /&gt;
Numbers are in the signed 32 bit integer range, i.e. from -2147483648 to 2147483647 inclusive, and are encoded in [https://en.wikipedia.org/wiki/Two%27s_complement two&#039;s complement representation]. The numbers wrap around on overflow, so e.g. 2147483647 + 10 becomes -2147483639. When entering a number in a combinator it can appear to exceed the 32 bit limit until the GUI is closed, at which point the number will overflow/underflow. [https://forums.factorio.com/58419]&lt;br /&gt;
&lt;br /&gt;
=== Control devices ===&lt;br /&gt;
Receivers can use broadcast information, in most cases to enable/disable the device. They can either compare results between different channels, or compare a channel to a specific value.&lt;br /&gt;
&lt;br /&gt;
Receiving devices sum all signals from each wire connected to them, even red and green wires. For example, if an inserter is connected to a red wire carrying a signal for 20 copper plates and a green wire with 10 copper plates, the input signal set for that receiver will be 30 copper plates.&lt;br /&gt;
&lt;br /&gt;
Multiple wires of the same color will share &amp;amp; sum their signals. For example, 3 chests A, B and C connected in a row (A -&amp;gt; B -&amp;gt; C) with green wire will output the sum of their contents along any green wire connected to any of the chests. However, if a red wire connects chest A to an inserter, that inserter will only be given the contents of A as its input signal.&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
Each device that is able to be connected to a circuit network has a [[File:Circuit network panel.png]] icon located in the top right corner of its info pane. Clicking this icon will display the available circuit network options for that device (note: a red or green wire must be connected, otherwise the message &amp;quot;not connected&amp;quot; will display instead). Clicking the [[File:Logistic network panel.png]] icon next to it, the device can be connected to a logistic network if in range of one, which also allows conditions to be set.&lt;br /&gt;
&lt;br /&gt;
Conditions can be set for both circuit (signals of red and green wires are summed) and logistic network, which will together act as a logical AND.&lt;br /&gt;
&lt;br /&gt;
The following devices can be connected to a circuit network:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Possible output signals !! Possible control options&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Transport belt||Transport belts}} || [[Transport belts]] || Transport belts can send their content to the circuit network.&lt;br /&gt;
*&#039;&#039;Pulse mode&#039;&#039;: The signal is sent for only 1 tick when the item enters the belt.&lt;br /&gt;
*&#039;&#039;Hold mode&#039;&#039;: The signal is sent continuously as long as the items are on the belt.&lt;br /&gt;
|| Transport belts can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Inserter||Inserters}} || [[Inserters]] || All inserters can send their held items to the circuit network.&lt;br /&gt;
*&#039;&#039;Pulse mode&#039;&#039;: The signal is sent for only 1 tick when the item is picked up.&lt;br /&gt;
*&#039;&#039;Hold mode&#039;&#039;: The signal is sent continuously as long as the inserter is holding the item.&lt;br /&gt;
|| All inserters can be enabled on a condition. The inserter stack size can also be overridden from a control signal (configurable).&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Filter inserter}} || [[Filter inserter]] || Same as above. || The filter inserters can additionally set their filters from the circuit network: up to 5 items whose corresponding signal has a positive value are whitelisted.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Wooden chest||Chests}} || [[Chests]] || All chests can send their contents to the circuit network. Logistic chests additionally send their contents to the [[logistic network]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Requester chest}} || [[Requester chest]] || Same as above. || Its requested items can be set by the circuit network.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Storage tank}} || [[Storage tank]] || The storage tank can send its fluid content to the circuit network. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Gate}} || [[Gate]] || Gates can send a signal to the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Player detected = [[File:Signal-G.png|16px]]&lt;br /&gt;
|| Gates can be opened on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Rail signal}} || [[Rail signal]] || Rail signals can send their state to the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: [[File:Signal-Red.png|16px]][[File:Signal-Yellow.png|16px]][[File:Signal-Green.png|16px]]&lt;br /&gt;
Note: If red due to circuit network, does NOT output red signal&lt;br /&gt;
|| Rail signals can be set to red on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Rail chain signal}} || [[Rail chain signal]] || Rail chain signals can send their state to the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: [[File:Signal-Red.png|16px]][[File:Signal-Yellow.png|16px]][[File:Signal-Green.png|16px]][[File:Signal-Blue.png|16px]]&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Train stop}} || [[Train stop]] || Train stations can send the contents of a stopped train to the circuit network as well as read a unique train identifier code. The amount of trains going to the train stop can be read by the circuit network.&amp;lt;br&amp;gt;When reading the content of a stopped train, fluid amounts are rounded down to the nearest integer, except when the fluid amount is &amp;lt; 1, then it is is rounded to 1. &lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Train Count (en route) = [[File:Signal-C.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Stopped Train ID = [[File:Signal-T.png|16px]]&lt;br /&gt;
|| Train stations can send the contents of the circuit network to the train to use it for wait conditions, as well as enable/disable the stop itself. The maximum amount of trains that can go to the train stop (&amp;quot;train limit&amp;quot;) can be set by the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Set Limit = [[File:Signal-L.png|16px]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Accumulator}} || [[Accumulator]] || It can send its charge level in percent to the circuit network. &lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Charge % = [[File:Signal-A.png|16px]]&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Roboport}} || [[Roboport]] || It can send its logistic network contents and/or its robot statistics to the circuit network. The signals used for robot statistics are configurable. &lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Available Logistics Bots = [[File:Signal-X.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Total Logistics Bots = [[File:Signal-Y.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Available Construction Bots = [[File:Signal-Z.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Total Construction Bots = [[File:Signal-T.png|16px]]&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Burner mining drill}} || [[Mining drill]]s || All mining drills can send the expected resources, either from the drill itself or from the whole ore patch the drill is on. || Mining drills can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Pumpjack}} || [[Pumpjack]] || It can output the current oil mining rate. || It can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Power switch}} || [[Power switch]] || || Power switches can connect power networks on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Programmable speaker}} || [[Programmable speaker]] || || Shows alerts and plays sounds based on circuit network signals. It can be used to make simple tunes.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Lamp}} || [[Lamp]] || || The lamp can be enabled on a condition. If it receives color signals, it can set the given color.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Offshore pump}} || [[Offshore pump]] || || The offshore pump can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Pump}} || [[Pump]] || || The pump can be enabled on a condition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Physical network structure ==&lt;br /&gt;
A circuit network consists only of those devices connected together with the same color wire. Wire can be strung directly from device to device, or across any intervening power poles. Wire length is limited by its previous connection.&lt;br /&gt;
&lt;br /&gt;
Note that each connected set of wires forms a separate network.  For example, it&#039;s entirely possible to have four red-wire networks and three green-wire networks. If red and green wires happen to touch the same power pole or device, the red and green networks will remain separate and will not link up. However, two red cables or two green cables will link if they touch. Use different colored cables to separate networks in close proximity.&lt;br /&gt;
&lt;br /&gt;
* To connect wires or cables to a power pole, simply click on one entity, then on the base of the power pole.&lt;br /&gt;
* To erase a wire or cable connection, place the same color wire over an existing connection. You don&#039;t get the wire/cable back.&lt;br /&gt;
* To remove &#039;&#039;&#039;all&#039;&#039;&#039; connections from a power pole, shift-click on the pole.  The first shift-click will remove all electrical connections, and the second will remove all red and green wires. You don&#039;t get the wires back.&lt;br /&gt;
* When connecting to a [[arithmetic combinator]] or [[decider combinator]], take care to connect the wire to the correct input or output side. Use &amp;quot;Show details&amp;quot; mode to see the orientation of the combinator.&lt;br /&gt;
* Hovering the mouse cursor over an item will highlight all wires which connect to the item.&lt;br /&gt;
* Hovering the mouse cursor over a power pole which is part of a network will display the signals on its network. Some items like combinators will also display their input and output signals when hovered over.&lt;br /&gt;
&lt;br /&gt;
== Combinators ==&lt;br /&gt;
Combinators can function as both receiving and sending devices and allow more advanced functions to be used on a circuit network.&lt;br /&gt;
&lt;br /&gt;
*The [[constant combinator]] broadcasts up to 20 values on any of the channels for whatever networks it is connected to.  (You cannot currently specify whether a value should be on the red or green channel; if you need different values, use two combinators, one for each color wire.)  You can use any item channel or any of the [[#Virtual signals|virtual signal]] channels.&lt;br /&gt;
**Note that using two of the 20 slots to broadcast values on the &#039;&#039;&#039;same&#039;&#039;&#039; channel is the same as broadcasting the sum of the two values from one slot.&lt;br /&gt;
*The [[arithmetic combinator]] performs arithmetic operations on input values and broadcasts the result to the specified output channel.  The input and output channels can be any item channel or any of the virtual signal channels.&lt;br /&gt;
** Connecting: The arithmetic combinator connects to a red or green network on its &#039;&#039;&#039;input&#039;&#039;&#039; side (the terminals are set into the main body and look like spark plugs) and performs an arithmetic calculation which is broadcast into the specified channel on its &#039;&#039;&#039;output&#039;&#039;&#039; side (the output wires appear to stretch out a bit from the body of the device).&lt;br /&gt;
** Feedback: Note that the input network and the output network &#039;&#039;&#039;are not the same network&#039;&#039;&#039;.  Connecting the output network back to the input network will result in a feedback loop.  For example, adding 1 to the value for copper plates and broadcasting it as copper plates is an action that results in an infinite loop if output is connected back to input.  The value for copper plates will rapidly (but not instantly) shoot upward. (The rate at which it climbs is determined by the current tick rate.) This technique can be combined with decider combinator logic to make electronic clocks, gates, and other systems.&lt;br /&gt;
** Each:  This combinator can use the &#039;Each&#039; signal for both input and output, in which case &#039;&#039;&#039;all&#039;&#039;&#039; non-zero input channels will have the combinator&#039;s operation performed and broadcast on the output side.  Having Each signals for input and output and using a non-changing operation (like adding zero) is equivalent to having a &#039;one-way&#039; wire; all the information from the input network is copied to the output network, but the reverse is not true.&lt;br /&gt;
**Multi-network: The arithmetic combinator can be joined to both red and green networks on the input side and will sum their inputs.&lt;br /&gt;
*The [[decider combinator]] functions much like an arithmetic combinator, but is designed to compare values. Essentially, it is a conditional. In terms of connecting, feedback, and the Each signal it functions as specified above.  In addition, it can handle the Everything and Anything signals, and performs more complex functions than summing when attached to multiple networks.  See the [[decider combinator]] page for more details on how to use this.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals ==&lt;br /&gt;
[[File:Virtual Signals dialog box.png|thumb|Virtual Signals available for use in the circuit network]]&lt;br /&gt;
Virtual signals are special non-item signals. Other than the three logic signals, virtual signals do not behave differently from item signals.&lt;br /&gt;
&lt;br /&gt;
48 virtual signals can be sent over a network. They include the digits zero through nine, the letters A through Z, a check-mark, dot and info icon, and the colors red, green, blue, yellow, magenta, cyan, white, gray and black.&lt;br /&gt;
&lt;br /&gt;
=== Logic signals ===&lt;br /&gt;
[[File:logic_signals.png|300px|thumb|The icons of the three logic signals]]&lt;br /&gt;
Three of the virtual signals cannot be sent over a network but apply special logic to multiple signals.&lt;br /&gt;
&lt;br /&gt;
==== Everything ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;&#039;&#039; can be used on the left side in conditionals. The condition will be true when the condition is true for each input signal. The condition is also true if there are no signals. This means that the &#039;&#039;everything&#039;&#039; signal behaves as [[:Wikipedia:universal quantification|universal quantification]].&lt;br /&gt;
&lt;br /&gt;
The output of a [[decider combinator]] may also use &#039;&#039;everything&#039;&#039;, unless the input is set to &#039;&#039;each&#039;&#039;. When used, the combinator will output signal on every channel with non-zero input as long as the condition is true; the value will either be the input value or 1, depending on the corresponding setting.&lt;br /&gt;
&lt;br /&gt;
==== Anything ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;&#039;&#039; can be used on the left side of conditions. It will be false when there are no inputs. The condition will be true when the condition is true for at least one signal. This means the &#039;&#039;anything&#039;&#039; signal behaves as [[:Wikipedia:existential quantification|existential quantification]].&lt;br /&gt;
&lt;br /&gt;
When used in both the input and output of a decider combinator, &#039;&#039;anything&#039;&#039; will return one of the signals that matched.&lt;br /&gt;
&lt;br /&gt;
==== Each ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;&#039;&#039; can only be used in left input side and output of [[decider combinator|decider]] and [[arithmetic combinator|arithmetic]] combinators. The signal can only be used as an output when also used as an input. When used in both the input and output, it makes a combinator perform its action on each input signal individually. The combinator will output the sum of each of the actions if only used in the input.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
*&#039;&#039;&#039;[[Tutorial:Circuit network cookbook]]&#039;&#039;&#039; - &#039;&#039;Example-heavy tutorials; for beginners who want to get to know and use the benefits of the circuit network.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Logistic network ==&lt;br /&gt;
The logistic network used by [[logistic robot]]s is essentially a third network (a wireless one), along with the green and red wired networks. The logistic network is based on proximity to a central [[roboport]].&lt;br /&gt;
&lt;br /&gt;
Some devices can also be connected to the logistic network. If a device has conditions set for circuit and for logistic network, it will become activated if both conditions are true.&lt;br /&gt;
&lt;br /&gt;
See the [[logistic network]] and [[roboport]] articles for more information.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Significantly improved circuit network performance. Up to 25 times less CPU usage and 10% less memory usage.&lt;br /&gt;
* Added the Programmable Speaker: it shows alerts and plays sounds based on circuit network signals. It can be used to make simple songs.&lt;br /&gt;
* Train Stop can output the contents of the stopped train&#039;s cargo.&lt;br /&gt;
* Train Stop can be disabled using the circuit network. Trains will skip disabled Train Stops, allowing simple train control.&lt;br /&gt;
* Mining Drills can be turned on and off using the circuit network. They can also output the remaining expected resources.&lt;br /&gt;
* Pumpjacks can be turned on and off using the circuit network. They can also output the current oil mining rate.&lt;br /&gt;
* Added Modulo, Power, Left Bit Shift, Right Bit Shift, Bitwise AND, Bitwise OR and Bitwise XOR to the Arithmetic Combinator.&lt;br /&gt;
* Added additional operators to the Decider Combinator and Circuit Conditions.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Many machines are now connectible to the circuit network.&lt;br /&gt;
* Wire disconnecting is incorporated into the latency hiding.&lt;br /&gt;
* Wires are now highlighted on entity mouseover.&lt;br /&gt;
* Reduced memory usage of circuit network.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.33|&lt;br /&gt;
* Fluid values are rounded to the closest value instead of rounding down when transmitted to circuit network.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.1|&lt;br /&gt;
* One can copy paste circuit network conditions between the [[inserter]], [[lamp]], [[pump]] and [[offshore pump]]. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Improvements to circuit network connection, one can connect multiple wires of the same color to the same entity.&lt;br /&gt;
* The [[lamp]], [[storage tank]], [[pump]] and [[offshore pump]] can be connected to the circuit network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.0|&lt;br /&gt;
* [[Blueprint]]s copy circuit network connections.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.3|&lt;br /&gt;
* Circuit network contents info has colored slots to specify the network it represents.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Circuit network]]&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Circuit_network&amp;diff=187665</id>
		<title>Circuit network</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Circuit_network&amp;diff=187665"/>
		<updated>2021-12-04T09:49:27Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&#039;&#039;&#039;Circuit networks&#039;&#039;&#039; are built using [[Red wire|red]] or [[green wire]], and enable the control of receivers, based upon information broadcast onto the network by connected senders.  Most senders are storage devices, and broadcast their information onto a specific channel, based on the item or liquid the storage device contains.  Each circuit network contains a channel for every kind of item, as well as 48 extra [[#Virtual signals|virtual signals]] which act as user-definable channels. &#039;&amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;&#039;, &#039;&amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;&#039; and &#039;&amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;&#039; are also available wildcards.&lt;br /&gt;
&lt;br /&gt;
[[File:shared_circuit_network.png|thumb|600px|right|Two circuit networks shared over one [[small electric pole]].]]&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== Send information ===&lt;br /&gt;
Senders broadcast the amount of items or fluids they contain or other data definable by the player. Each amount is broadcast as a numeric value on a &#039;channel&#039; corresponding to the item.  For example, a Storage Tank containing 1000 Crude Oil will broadcast 1000 on the Crude Oil channel.&lt;br /&gt;
&lt;br /&gt;
The channels are separated from each other, so each network can simultaneously carry a number for each item and fluid in the game, and for each of the extra user-defined channels (digits 0-9, letters A-Z, and 9 different colors). All unused channels have the value zero.&lt;br /&gt;
&lt;br /&gt;
Multiple broadcasts of the same item or fluid are additive: If there are two connected Storage Tanks with 1000 Crude Oil each, the value of the Crude Oil channel within the network will be 2000.&lt;br /&gt;
&lt;br /&gt;
All wires of the same color which are connected together by junctions form a network, i.e. they will pass their signals to each other.  For example, if two red wires are connected to the same combinator input, each wire receives the content from the other.  This can result in feedback if care is not taken; see Feedback (under [[#Combinators|arithmetic combinator]], below) for discussion.&lt;br /&gt;
&lt;br /&gt;
Numbers are in the signed 32 bit integer range, i.e. from -2147483648 to 2147483647 inclusive, and are encoded in [https://en.wikipedia.org/wiki/Two%27s_complement two&#039;s complement representation]. The numbers wrap around on overflow, so e.g. 2147483647 + 10 becomes -2147483639. When entering a number in a combinator it can appear to exceed the 32 bit limit until the GUI is closed, at which point the number will overflow/underflow. [https://forums.factorio.com/58419]&lt;br /&gt;
&lt;br /&gt;
=== Control devices ===&lt;br /&gt;
Receivers can use broadcast information, in most cases to enable/disable the device. They can either compare results between different channels, or compare a channel to a specific value.&lt;br /&gt;
&lt;br /&gt;
Receiving devices sum all signals from each wire connected to them, even red and green wires. For example, if an inserter is connected to a red wire carrying a signal for 20 copper plates and a green wire with 10 copper plates, the input signal set for that receiver will be 30 copper plates.&lt;br /&gt;
&lt;br /&gt;
Multiple wires of the same color will share &amp;amp; sum their signals. For example, 3 chests A, B and C connected in a row (A -&amp;gt; B -&amp;gt; C) with green wire will output the sum of their contents along any green wire connected to any of the chests. However, if a red wire connects chest A to an inserter, that inserter will only be given the contents of A as its input signal.&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
Each device that is able to be connected to a circuit network has a [[File:Circuit network panel.png]] icon located in the top right corner of its info pane. Clicking this icon will display the available circuit network options for that device (note: a red or green wire must be connected, otherwise the message &amp;quot;not connected&amp;quot; will display instead). Clicking the [[File:Logistic network panel.png]] icon next to it, the device can be connected to a logistic network if in range of one, which also allows conditions to be set.&lt;br /&gt;
&lt;br /&gt;
Conditions can be set for both circuit (signals of red and green wires are summed) and logistic network, which will together act as a logical AND.&lt;br /&gt;
&lt;br /&gt;
The following devices can be connected to a circuit network:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Possible output signals !! Possible control options&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Transport belt||Transport belts}} || [[Transport belts]] || Transport belts can send their content to the circuit network.&lt;br /&gt;
*&#039;&#039;Pulse mode&#039;&#039;: The signal is sent for only 1 tick when the item enters the belt.&lt;br /&gt;
*&#039;&#039;Hold mode&#039;&#039;: The signal is sent continuously as long as the items are on the belt.&lt;br /&gt;
|| Transport belts can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Inserter||Inserters}} || [[Inserters]] || All inserters can send their held items to the circuit network.&lt;br /&gt;
*&#039;&#039;Pulse mode&#039;&#039;: The signal is sent for only 1 tick when the item is picked up.&lt;br /&gt;
*&#039;&#039;Hold mode&#039;&#039;: The signal is sent continuously as long as the inserter is holding the item.&lt;br /&gt;
|| All inserters can be enabled on a condition. The inserter stack size can also be overridden from a control signal (configurable).&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Filter inserter}} || [[Filter inserter]] || Same as above. || The filter inserters can additionally set their filters from the circuit network: up to 5 items whose corresponding signal has a positive value are whitelisted.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Wooden chest||Chests}} || [[Chests]] || All chests can send their contents to the circuit network. Logistic chests additionally send their contents to the [[logistic network]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Requester chest}} || [[Requester chest]] || Same as above. || Its requested items can be set by the circuit network.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Storage tank}} || [[Storage tank]] || The storage tank can send its fluid content to the circuit network. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Gate}} || [[Gate]] || Gates can send a signal to the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Player detected = [[File:Signal-G.png|16px]]&lt;br /&gt;
|| Gates can be opened on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Rail signal}} || [[Rail signal]] || Rail signals can send their state to the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: [[File:Signal-Red.png|16px]][[File:Signal-Yellow.png|16px]][[File:Signal-Green.png|16px]]&lt;br /&gt;
Note: If red due to circuit network, does NOT output red signal&lt;br /&gt;
|| Rail signals can be set to red on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Rail chain signal}} || [[Rail chain signal]] || Rail chain signals can send their state to the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: [[File:Signal-Red.png|16px]][[File:Signal-Yellow.png|16px]][[File:Signal-Green.png|16px]][[File:Signal-Blue.png|16px]]&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Train stop}} || [[Train stop]] || Train stations can send the contents of a stopped train to the circuit network as well as read a unique train identifier code. The amount of trains going to the train stop can be read by the circuit network.&amp;lt;br&amp;gt;When reading the content of a stopped train, fluid amounts are rounded down to the nearest integer, except when the fluid amount is &amp;lt; 1, then it is is rounded to 1. &lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Train Count (en route) = [[File:Signal-C.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Stopped Train ID = [[File:Signal-T.png|16px]]&lt;br /&gt;
|| Train stations can send the contents of the circuit network to the train to use it for wait conditions, as well as enable/disable the stop itself. The maximum amount of trains that can go to the train stop (&amp;quot;train limit&amp;quot;) can be set by the circuit network.&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Set Limit = [[File:Signal-L.png|16px]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Accumulator}} || [[Accumulator]] || It can send its charge level in percent to the circuit network. &lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Charge % = [[File:Signal-A.png|16px]]&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Roboport}} || [[Roboport]] || It can send its logistic network contents and/or its robot statistics to the circuit network. The signals used for robot statistics are configurable. &lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Available Logistics Bots = [[File:Signal-X.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Total Logistics Bots = [[File:Signal-Y.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Available Construction Bots = [[File:Signal-Z.png|16px]]&lt;br /&gt;
*&#039;&#039;Default&#039;&#039;: Total Construction Bots = [[File:Signal-T.png|16px]]&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Burner mining drill}} || [[Mining drill]]s || All mining drills can send the expected resources, either from the drill itself or from the whole ore patch the drill is on. || Mining drills can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Pumpjack}} || [[Pumpjack]] || It can output the current oil mining rate. || It can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Power switch}} || [[Power switch]] || || Power switches can connect power networks on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Programmable speaker}} || [[Programmable speaker]] || || Shows alerts and plays sounds based on circuit network signals. It can be used to make simple tunes.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Lamp}} || [[Lamp]] || || The lamp can be enabled on a condition. If it receives color signals, it can set the given color.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Offshore pump}} || [[Offshore pump]] || || The offshore pump can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Pump}} || [[Pump]] || || The pump can be enabled on a condition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Physical network structure ==&lt;br /&gt;
A circuit network consists only of those devices connected together with the same color wire. Wire can be strung directly from device to device, or across any intervening power poles. Wire length is limited by its previous connection.&lt;br /&gt;
&lt;br /&gt;
Note that each connected set of wires forms a separate network.  For example, it&#039;s entirely possible to have four red-wire networks and three green-wire networks. If red and green wires happen to touch the same power pole or device, the red and green networks will remain separate and will not link up. However, two red cables or two green cables will link if they touch. Use different colored cables to separate networks in close proximity.&lt;br /&gt;
&lt;br /&gt;
* To connect wires or cables to a power pole, simply click on one entity, then on the base of the power pole.&lt;br /&gt;
* To erase a wire or cable connection, place the same color wire over an existing connection. You don&#039;t get the wire/cable back.&lt;br /&gt;
* To remove &#039;&#039;&#039;all&#039;&#039;&#039; connections from a power pole, shift-click on the pole.  The first shift-click will remove all electrical connections, and the second will remove all red and green wires. You don&#039;t get the wires back.&lt;br /&gt;
* When connecting to a [[arithmetic combinator]] or [[decider combinator]], take care to connect the wire to the correct input or output side. Use &amp;quot;Show details&amp;quot; mode to see the orientation of the combinator.&lt;br /&gt;
* Hovering the mouse cursor over an item will highlight all wires which connect to the item.&lt;br /&gt;
* Hovering the mouse cursor over a power pole which is part of a network will display the signals on its network. Some items like combinators will also display their input and output signals when hovered over.&lt;br /&gt;
&lt;br /&gt;
== Combinators ==&lt;br /&gt;
Combinators can function as both receiving and sending devices and allow more advanced functions to be used on a circuit network.&lt;br /&gt;
&lt;br /&gt;
*The [[constant combinator]] broadcasts up to 20 values on any of the channels for whatever networks it is connected to.  (You cannot currently specify whether a value should be on the red or green channel; if you need different values, use two combinators, one for each color wire.)  You can use any item channel or any of the [[#Virtual signals|virtual signal]] channels.&lt;br /&gt;
**Note that using two of the 20 slots to broadcast values on the &#039;&#039;&#039;same&#039;&#039;&#039; channel is the same as broadcasting the sum of the two values from one slot.&lt;br /&gt;
*The [[arithmetic combinator]] performs arithmetic operations on input values and broadcasts the result to the specified output channel.  The input and output channels can be any item channel or any of the virtual signal channels.&lt;br /&gt;
** Connecting: The arithmetic combinator connects to a red or green network on its &#039;&#039;&#039;input&#039;&#039;&#039; side (the terminals are set into the main body and look like spark plugs) and performs an arithmetic calculation which is broadcast into the specified channel on its &#039;&#039;&#039;output&#039;&#039;&#039; side (the output wires appear to stretch out a bit from the body of the device).&lt;br /&gt;
** Feedback: Note that the input network and the output network &#039;&#039;&#039;are not the same network&#039;&#039;&#039;.  Connecting the output network back to the input network will result in a feedback loop.  For example, adding 1 to the value for copper plates and broadcasting it as copper plates is an action that results in an infinite loop if output is connected back to input.  The value for copper plates will rapidly (but not instantly) shoot upward. (The rate at which it climbs is determined by the current tick rate.) This technique can be combined with decider combinator logic to make electronic clocks, gates, and other systems; see [[Tutorial:Combinator tutorial|Combinator Tutorial]] for advanced techniques.&lt;br /&gt;
** Each:  This combinator can use the &#039;Each&#039; signal for both input and output, in which case &#039;&#039;&#039;all&#039;&#039;&#039; non-zero input channels will have the combinator&#039;s operation performed and broadcast on the output side.  Having Each signals for input and output and using a non-changing operation (like adding zero) is equivalent to having a &#039;one-way&#039; wire; all the information from the input network is copied to the output network, but the reverse is not true.&lt;br /&gt;
**Multi-network: The arithmetic combinator can be joined to both red and green networks on the input side and will sum their inputs.&lt;br /&gt;
*The [[decider combinator]] functions much like an arithmetic combinator, but is designed to compare values. Essentially, it is a conditional. In terms of connecting, feedback, and the Each signal it functions as specified above.  In addition, it can handle the Everything and Anything signals, and performs more complex functions than summing when attached to multiple networks.  See the [[decider combinator]] page for more details on how to use this.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals ==&lt;br /&gt;
[[File:Virtual Signals dialog box.png|thumb|Virtual Signals available for use in the circuit network]]&lt;br /&gt;
Virtual signals are special non-item signals. Other than the three logic signals, virtual signals do not behave differently from item signals.&lt;br /&gt;
&lt;br /&gt;
48 virtual signals can be sent over a network. They include the digits zero through nine, the letters A through Z, a check-mark, dot and info icon, and the colors red, green, blue, yellow, magenta, cyan, white, gray and black.&lt;br /&gt;
&lt;br /&gt;
=== Logic signals ===&lt;br /&gt;
[[File:logic_signals.png|300px|thumb|The icons of the three logic signals]]&lt;br /&gt;
Three of the virtual signals cannot be sent over a network but apply special logic to multiple signals.&lt;br /&gt;
&lt;br /&gt;
==== Everything ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;&#039;&#039; can be used on the left side in conditionals. The condition will be true when the condition is true for each input signal. The condition is also true if there are no signals. This means that the &#039;&#039;everything&#039;&#039; signal behaves as [[:Wikipedia:universal quantification|universal quantification]].&lt;br /&gt;
&lt;br /&gt;
The output of a [[decider combinator]] may also use &#039;&#039;everything&#039;&#039;, unless the input is set to &#039;&#039;each&#039;&#039;. When used, the combinator will output signal on every channel with non-zero input as long as the condition is true; the value will either be the input value or 1, depending on the corresponding setting.&lt;br /&gt;
&lt;br /&gt;
==== Anything ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;&#039;&#039; can be used on the left side of conditions. It will be false when there are no inputs. The condition will be true when the condition is true for at least one signal. This means the &#039;&#039;anything&#039;&#039; signal behaves as [[:Wikipedia:existential quantification|existential quantification]].&lt;br /&gt;
&lt;br /&gt;
When used in both the input and output of a decider combinator, &#039;&#039;anything&#039;&#039; will return one of the signals that matched.&lt;br /&gt;
&lt;br /&gt;
==== Each ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;&#039;&#039; can only be used in left input side and output of [[decider combinator|decider]] and [[arithmetic combinator|arithmetic]] combinators. The signal can only be used as an output when also used as an input. When used in both the input and output, it makes a combinator perform its action on each input signal individually. The combinator will output the sum of each of the actions if only used in the input.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
*&#039;&#039;&#039;[[Tutorial:Circuit network cookbook]]&#039;&#039;&#039; - &#039;&#039;Example-heavy tutorials; for beginners who want to get to know and use the benefits of the circuit network.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Logistic network ==&lt;br /&gt;
The logistic network used by [[logistic robot]]s is essentially a third network (a wireless one), along with the green and red wired networks. The logistic network is based on proximity to a central [[roboport]].&lt;br /&gt;
&lt;br /&gt;
Some devices can also be connected to the logistic network. If a device has conditions set for circuit and for logistic network, it will become activated if both conditions are true.&lt;br /&gt;
&lt;br /&gt;
See the [[logistic network]] and [[roboport]] articles for more information.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Significantly improved circuit network performance. Up to 25 times less CPU usage and 10% less memory usage.&lt;br /&gt;
* Added the Programmable Speaker: it shows alerts and plays sounds based on circuit network signals. It can be used to make simple songs.&lt;br /&gt;
* Train Stop can output the contents of the stopped train&#039;s cargo.&lt;br /&gt;
* Train Stop can be disabled using the circuit network. Trains will skip disabled Train Stops, allowing simple train control.&lt;br /&gt;
* Mining Drills can be turned on and off using the circuit network. They can also output the remaining expected resources.&lt;br /&gt;
* Pumpjacks can be turned on and off using the circuit network. They can also output the current oil mining rate.&lt;br /&gt;
* Added Modulo, Power, Left Bit Shift, Right Bit Shift, Bitwise AND, Bitwise OR and Bitwise XOR to the Arithmetic Combinator.&lt;br /&gt;
* Added additional operators to the Decider Combinator and Circuit Conditions.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Many machines are now connectible to the circuit network.&lt;br /&gt;
* Wire disconnecting is incorporated into the latency hiding.&lt;br /&gt;
* Wires are now highlighted on entity mouseover.&lt;br /&gt;
* Reduced memory usage of circuit network.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.33|&lt;br /&gt;
* Fluid values are rounded to the closest value instead of rounding down when transmitted to circuit network.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.1|&lt;br /&gt;
* One can copy paste circuit network conditions between the [[inserter]], [[lamp]], [[pump]] and [[offshore pump]]. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Improvements to circuit network connection, one can connect multiple wires of the same color to the same entity.&lt;br /&gt;
* The [[lamp]], [[storage tank]], [[pump]] and [[offshore pump]] can be connected to the circuit network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.0|&lt;br /&gt;
* [[Blueprint]]s copy circuit network connections.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.3|&lt;br /&gt;
* Circuit network contents info has colored slots to specify the network it represents.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Circuit network]]&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorials&amp;diff=187664</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorials&amp;diff=187664"/>
		<updated>2021-12-04T09:48:45Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Circuit network */ Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
This page lists tutorials that can be found here on the wiki. They range from guides for the very first steps in the game to in-depth modding tutorials.&lt;br /&gt;
&lt;br /&gt;
== The first steps and the first base ==&lt;br /&gt;
These tutorials aim to guide the player through the first steps of the game and provide an idea of how a base could look like.&lt;br /&gt;
&lt;br /&gt;
* [[Tutorial:Quick start guide|Quick start guide]] - Guides through the first steps of the game, from mining the first piece of ore to automating the first science pack.&lt;br /&gt;
* [[Tutorial:Main bus|Main bus]] - A type of base organization that is well suited for beginners.&lt;br /&gt;
* [[Tutorial:Keyboard shortcuts|Keyboard shortcuts]] - A collection of useful keyboard shortcuts.&lt;br /&gt;
&lt;br /&gt;
== Power production ==&lt;br /&gt;
These tutorials take an in-depth look at individual topics related to [[power production]].&lt;br /&gt;
&lt;br /&gt;
* [[Tutorial:Applied power math|Applied power math]]&lt;br /&gt;
* [[Tutorial:Nuclear power|Nuclear power]]&lt;br /&gt;
* [[Tutorial:Producing power from oil|Producing power from oil]]&lt;br /&gt;
&lt;br /&gt;
== Circuit network ==&lt;br /&gt;
These tutorials take a closer look at the [[circuit network]] and present usage examples.&lt;br /&gt;
&lt;br /&gt;
* [[Tutorial:Circuit network cookbook|Circuit network cookbook]] - Example-heavy tutorial; for beginners who want to get to know and use the benefits of the circuit network.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
* [[Tutorial:Train signals|Train signals]]&lt;br /&gt;
* [[Tutorial:Transport use cases|A comparison of the different means of transport]]&lt;br /&gt;
&lt;br /&gt;
== Modding tutorials ==&lt;br /&gt;
{{:Tutorial:Modding tutorial}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Main_Page/Expert&amp;diff=187663</id>
		<title>Main Page/Expert</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Main_Page/Expert&amp;diff=187663"/>
		<updated>2021-12-04T09:48:05Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Mining|Mining mechanics]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
** [[Tutorial:Circuit network cookbook|Circuit network cookbook]]&lt;br /&gt;
* [[Debug mode|Debug modes]]&lt;br /&gt;
* [[Console]]&lt;br /&gt;
* [[Modding]]&lt;br /&gt;
** [[Prototype definitions]]&lt;br /&gt;
* [[Map editor]]&lt;br /&gt;
* [[Balancer mechanics]]&lt;br /&gt;
* [[Units|Physical units]]&lt;br /&gt;
** [[Energy and work]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Languages}}&lt;br /&gt;
{{C|Main}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Arithmetic_combinator&amp;diff=187662</id>
		<title>Arithmetic combinator</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Arithmetic_combinator&amp;diff=187662"/>
		<updated>2021-12-04T09:47:43Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Arithmetic combinator}}&lt;br /&gt;
The arithmetic combinator is part of the [[circuit network]] and one of three types of combinators available in the game (along with the [[constant combinator]] and [[decider combinator]]). Each arithmetic combinator can perform any one of the following mathematical operations on signals, and will show the corresponding symbol on its top:&lt;br /&gt;
&lt;br /&gt;
[[File:arith_combinator_anim.png]]&lt;br /&gt;
&lt;br /&gt;
* addition (&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;+&amp;lt;/span&amp;gt;)&lt;br /&gt;
* subtraction (&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;−&amp;lt;/span&amp;gt;)&lt;br /&gt;
* multiplication (&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;)&lt;br /&gt;
* division (&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;/&amp;lt;/span&amp;gt;)&lt;br /&gt;
* modulo (&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;%&amp;lt;/span&amp;gt;)&lt;br /&gt;
* exponentiation (&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;^&amp;lt;/span&amp;gt;)&lt;br /&gt;
* left bit shift (&amp;lt;span style=&amp;quot;color:cyan&amp;quot;&amp;gt;&amp;lt;&amp;lt;&amp;lt;/span&amp;gt;)&lt;br /&gt;
* right bit shift (&amp;lt;span style=&amp;quot;color:cyan&amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;)&lt;br /&gt;
* bitwise AND (&amp;lt;span style=&amp;quot;color:cyan&amp;quot;&amp;gt;&amp;amp;&amp;lt;/span&amp;gt;)&lt;br /&gt;
* bitwise OR (&amp;lt;span style=&amp;quot;color:cyan&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;)&lt;br /&gt;
* bitwise XOR (&amp;lt;span style=&amp;quot;color:cyan&amp;quot;&amp;gt;^&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
The arithmetic combinator accepts two input connections (red and green wires), and sends its output to both output connections. The input wires connect to the nubs on the left side of the sprite in the sidebar, while the outputs connect to the right side.&lt;br /&gt;
&lt;br /&gt;
[[File:Arithmetic_combinator_gui.png|350px|GUI of the Arithmetic Combinator.]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Function ==&lt;br /&gt;
The internal logic process has three steps:&lt;br /&gt;
&lt;br /&gt;
# All input signals on the red and green wires are summed within the combinator.&lt;br /&gt;
# The specified operation is performed on the selected signal(s).&lt;br /&gt;
# The result of this operation is output as the selected output signal.&lt;br /&gt;
&lt;br /&gt;
The left operand of the operation can be any single signal or the [[Virtual signals#Each|&#039;&#039;each&#039;&#039; virtual signal]], and the right operand can be any single signal or a constant value.&lt;br /&gt;
&lt;br /&gt;
If the left operand is a single signal, the output must be a single signal. The operation is performed on the values of the chosen left and right signals, and the result is sent to the output on the specified signal.&lt;br /&gt;
&lt;br /&gt;
If the left operand is the &#039;&#039;each&#039;&#039; signal, then the output can be a single signal or the &#039;&#039;each&#039;&#039; signal. If the output is the &#039;&#039;each&#039;&#039; signal, then the operation is performed individually on the value of each input signal along with the value of the right operand, and each result is sent to the output on the same signal. If the output is a single signal, the operation is done on each of the input signals, the individual results are all added together, and that result is sent to the output on the specified signal.&lt;br /&gt;
&lt;br /&gt;
== Notes on operations ==&lt;br /&gt;
When using &#039;&#039;&#039;division&#039;&#039;&#039;, the result is truncated:&lt;br /&gt;
* 21 / 10 = 2&lt;br /&gt;
* 19 / 10 = 1&lt;br /&gt;
* −21 / 10 = −2&lt;br /&gt;
* −19 / 10 = −1&lt;br /&gt;
* 21 / −10 = −2&lt;br /&gt;
* 19 / −10 = −1&lt;br /&gt;
* −21 / −10 = 2&lt;br /&gt;
* −19 / −10 = 1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Modulo&#039;&#039;&#039;, indicated using % as it is in most programming languages, is the remainder after division. For example, 13 % 3 is 1 (13 = 4 * 3 + 1). This can, for example, be combined with truncated division as described above to separate out individual digits of a number for use in building visual indicators:&lt;br /&gt;
* (24321 / 10000) % 10  = 2&lt;br /&gt;
* (24321 / 1000) % 10  = 4&lt;br /&gt;
* (24321 / 100) % 10  = 3&lt;br /&gt;
* (24321 / 10) % 10  = 2&lt;br /&gt;
* (24321 / 1) % 10  = 1&lt;br /&gt;
&lt;br /&gt;
Negating the left operand of a modulo negates the result, while negating the right operand does nothing:&lt;br /&gt;
* 13 % 3 = 1&lt;br /&gt;
* 13 % −3 = 1&lt;br /&gt;
* −13 % 3 = −1&lt;br /&gt;
* −13 % −3 = −1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Left bit shift&#039;&#039;&#039; and &#039;&#039;&#039;Right bit shift&#039;&#039;&#039; are not arithmetic. Instead these options deals with numbers in the [[:Wikipedia:Binary_number|binary]] state. The 0&#039;s and 1&#039;s that make up a number are shifted in the specified direction which can result in a completely different number, due to the change in the binary value.&lt;br /&gt;
&lt;br /&gt;
[[File:Bitshiftleft.png|none|thumb|200px|Example of a &#039;left bit shift&#039;.]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Added Modulo, Power, Left Bit Shift, Right Bit Shift, Bitwise AND, Bitwise OR and Bitwise XOR to the Arithmetic Combinator.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Connected wires are highlighted when hovering over a combinator connected to the [[circuit network]].&lt;br /&gt;
* Combinators show input and output in alt mode.&lt;br /&gt;
* More virtual signals for combinators.&lt;br /&gt;
* Constant combinator can be rotated.&lt;br /&gt;
* Decider combinator &amp;quot;input count&amp;quot; option makes the combinator copy the count of the specified output signal from the input signals, instead of copying the count from the condition.&lt;br /&gt;
* New combinator graphics. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.5|&lt;br /&gt;
* Combinators now emit light.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.2|&lt;br /&gt;
* Combinators no longer turn off when no wires are connected.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
*[[Decider combinator]]&lt;br /&gt;
*[[Constant combinator]]&lt;br /&gt;
*[[Circuit network]]&lt;br /&gt;
*[[Tutorial:Circuit network cookbook|Circuit network cookbook]]&lt;br /&gt;
&lt;br /&gt;
{{LogisticsNav}}&lt;br /&gt;
{{C|Circuit network}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Decider_combinator&amp;diff=187661</id>
		<title>Decider combinator</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Decider_combinator&amp;diff=187661"/>
		<updated>2021-12-04T09:47:17Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Decider combinator}}&lt;br /&gt;
&lt;br /&gt;
The Decider combinator is part of the circuit network and one of three types of combinators available in the game (with the other two being the [[constant combinator]] and [[arithmetic combinator]]). It is used to make comparisons of signals on the network. Signals can be compared using the following:&lt;br /&gt;
&lt;br /&gt;
[[File:decider_combinator_anim.png]]&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;is greater than&amp;quot; (&amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;)&lt;br /&gt;
*&amp;quot;is less than&amp;quot; (&amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;&amp;lt;&amp;lt;/span&amp;gt;)&lt;br /&gt;
*&amp;quot;greater than or equal to&amp;quot; (&amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;&amp;gt;=&amp;lt;/span&amp;gt;)&lt;br /&gt;
*&amp;quot;less than or equal to&amp;quot; (&amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;&amp;lt;=&amp;lt;/span&amp;gt;)&lt;br /&gt;
*&amp;quot;is equal to&amp;quot; (&amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;)&lt;br /&gt;
*&amp;quot;is not equal to&amp;quot; (&amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;!=&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
As shown in the picture below showing the GUI, the signal on the left is bring compared to that of the right.&lt;br /&gt;
&lt;br /&gt;
[[File:decider_combinator_gui.png|350px|GUI of the decider combinator.]]&lt;br /&gt;
&lt;br /&gt;
== Function ==&lt;br /&gt;
The internal logic process has three steps:&lt;br /&gt;
&lt;br /&gt;
# Values for each individual input signal(s) (items of the same name) on the red and green wires are summed within the combinator.&lt;br /&gt;
# The decider combinator GUI specifies a &amp;quot;first&amp;quot; input signal, a comparison (&amp;gt;, &amp;lt;, =, &amp;gt;=, &amp;lt;=, !=), and a &amp;quot;second&amp;quot; input signal or constant.&lt;br /&gt;
# If the comparison returns true, the output is one or more signals with a value of 1 or the unchanged input value(s), or a single signal carrying either a sum of input signals or the number of passed tests. ([[#output_table|see table below]])&lt;br /&gt;
&lt;br /&gt;
The decider combinator can handle [[Circuit network#Logic signals|logic signals]].&lt;br /&gt;
&lt;br /&gt;
Further notes:&lt;br /&gt;
&lt;br /&gt;
* Using the Everything output with &amp;quot;Input count&amp;quot; will pass all non-zero input values to the output as long as the condition is true. Using the Everything output with &amp;quot;1&amp;quot; will output 1 ONLY for all non-zero inputs.&lt;br /&gt;
* The Each input will re-apply the comparison for each input signal individually, and will pass the selected output for each input that passes the conditional.&lt;br /&gt;
* The Everything input functions as a logical AND, and will return true only if ALL non-zero inputs pass the conditional, and returns true if there are no inputs at all (so &amp;quot;everything ≠ 0&amp;quot; always passes).&lt;br /&gt;
* The Anything input functions as a logical OR, and will return true if ANY non-zero input passes the conditional, and returns false if there are no inputs at all (so &amp;quot;anything = 0&amp;quot; always fails). If used for output, Anything will return one of the signals that matched.&lt;br /&gt;
* When &amp;quot;Input Count&amp;quot; is selected the output will match the input for the selected signal if the first parameter is not Each. If the first parameter is Each then &amp;quot;Input Count&amp;quot; refers to the value of the input signal that is currently being iterated, so the result will be the sum of all inputs if the output signal is not Each. If the output signal is also Each then every input signal that passes the test is simply forwarded while those that fail the test are discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;output table&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;The following table shows how different combinations of the first input parameter and the output can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|+Different output results when the test passes&lt;br /&gt;
|-&lt;br /&gt;
! ↓Output&amp;amp;nbsp;&amp;amp;nbsp;Input→ !! &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt; !! &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;, or a specific signal&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;: 1&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| - || every input signal is forwarded but set to 1&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;: Input count&lt;br /&gt;
| every input signal is forwarded&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| Specific signal: 1&lt;br /&gt;
| number of input signals&amp;lt;sup&amp;gt;†&amp;lt;/sup&amp;gt; || the specific signal with value 1&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| Specific signal: Input count&lt;br /&gt;
| sum of inputs&amp;lt;sup&amp;gt;†&amp;lt;/sup&amp;gt; || the specific signal is forwarded&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;: 1&lt;br /&gt;
| each input signal&amp;lt;sup&amp;gt;†&amp;lt;/sup&amp;gt; is forwarded but set to 1 ||rowspan=&amp;quot;2&amp;quot;| -&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;: Input count&lt;br /&gt;
| each input signal&amp;lt;sup&amp;gt;†&amp;lt;/sup&amp;gt; is forwarded&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;: 1&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| - || one input signal&amp;lt;sup&amp;gt;†&amp;lt;/sup&amp;gt; is forwarded but set to 1&lt;br /&gt;
|-&lt;br /&gt;
!style=&amp;quot;text-align: left&amp;quot;| &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;: Input count&lt;br /&gt;
| one input signal&amp;lt;sup&amp;gt;†&amp;lt;/sup&amp;gt; is forwarded&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
† signals that passed the test only&lt;br /&gt;
&lt;br /&gt;
With both the arithmetic and decider combinator, there is one tick (60th of a second) of latency before the output signal is ready to be used as an input into a circuit network.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|1.1.13|&lt;br /&gt;
* Decider combinator can output an Anything signal, which returns exactly one matching signal.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Added additional operators to the Decider Combinator and Circuit Conditions.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Connected wires are highlighted when hovering over a combinator connected to the [[circuit network]].&lt;br /&gt;
* Combinators show input and output in alt mode.&lt;br /&gt;
* More virtual signals for combinators.&lt;br /&gt;
* Constant combinator can be rotated.&lt;br /&gt;
* Decider combinator &amp;quot;input count&amp;quot; option makes the combinator copy the count of the specified output signal from the input signals, instead of copying the count from the condition.&lt;br /&gt;
* New combinator graphics. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.5|&lt;br /&gt;
* Combinators now emit light.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.2|&lt;br /&gt;
* Combinators no longer turn off when no wires are connected.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
* [[Tutorial:Circuit network cookbook|Circuit network cookbook]]&lt;br /&gt;
&lt;br /&gt;
{{LogisticsNav}}&lt;br /&gt;
{{C|Circuit network}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Constant_combinator&amp;diff=187660</id>
		<title>Constant combinator</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Constant_combinator&amp;diff=187660"/>
		<updated>2021-12-04T09:45:31Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Delete old tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Constant combinator}}&lt;br /&gt;
&lt;br /&gt;
The constant combinator is part of the circuit network and one of three types of combinators available in the game (the other two being the [[arithmetic combinator]] and [[decider combinator]]). It constantly outputs the selected signal(s) to all connected wire networks without the need for a specific input, and can be turned on/off in the GUI manually. Most common uses include testing of composed circuitry or changing some user-defined settings by broadcasting a kind of a switching signal.&lt;br /&gt;
&lt;br /&gt;
If the output of a combinator is desired to be switched on/off remotely or automatically, it is recommended to channel its output through a decider combinator. Unlike the other two combinators, the constant combinator does not require electricity to function.&lt;br /&gt;
&lt;br /&gt;
[[File:constant_combinator_gui.png|350px|GUI of the constant combinator.]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Connected wires are highlighted when hovering over a combinator connected to the [[circuit network]].&lt;br /&gt;
* Combinators show input and output in alt mode.&lt;br /&gt;
* More virtual signals for combinators.&lt;br /&gt;
* Constant combinator can be rotated.&lt;br /&gt;
* Decider combinator &amp;quot;input count&amp;quot; option makes the combinator copy the count of the specified output signal from the input signals, instead of copying the count from the condition.&lt;br /&gt;
* New combinator graphics. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.5|&lt;br /&gt;
* Combinators now emit light.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.2|&lt;br /&gt;
* Combinators no longer turn off when no wires are connected.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
* [[Tutorial:Circuit network cookbook|Circuit network cookbook]]&lt;br /&gt;
&lt;br /&gt;
{{LogisticsNav}}&lt;br /&gt;
{{C|Circuit network}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Stronger_explosives_(research)&amp;diff=186878</id>
		<title>Stronger explosives (research)</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Stronger_explosives_(research)&amp;diff=186878"/>
		<updated>2021-08-30T04:33:04Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Fix level 7 formula&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{:Infobox:Stronger explosives (research)}}&lt;br /&gt;
&#039;&#039;&#039;Stronger explosives (research)&#039;&#039;&#039; affects the damage of grenades, rockets and landmines.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan = 2 |&lt;br /&gt;
! colspan = 2 | {{Icon|Grenade}}{{Icon|Cluster grenade}}&lt;br /&gt;
! colspan = 2 | {{Icon|Land mine}}&lt;br /&gt;
! colspan = 2 | {{Icon|Rocket}}{{Icon|Explosive rocket}}{{Icon|Atomic bomb}}&lt;br /&gt;
|-&lt;br /&gt;
! Technology !! Cost !! Per Level !! Cumulative !!Per level !! Cumulative !! Per level !! Cumulative&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|1}} Stronger explosives 1 || {{Icon|Time|30}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} ✖ &amp;lt;big&amp;gt;100&amp;lt;/big&amp;gt; || 25% || 25% ||  ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|2}} Stronger explosives 2 || {{Icon|Time|30}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} {{Icon|Military science pack|1}} ✖ &amp;lt;big&amp;gt;200&amp;lt;/big&amp;gt; || 20% || 45% || 20% || 20% || ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|3}} Stronger explosives 3 || {{Icon|Time|60}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} {{Icon|Military science pack|1}} {{Icon|Chemical science pack|1}} ✖ &amp;lt;big&amp;gt;300&amp;lt;/big&amp;gt; || 20% || 65% || 20% || 40% || 30% || 30%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|4}} Stronger explosives 4 || {{Icon|Time|60}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} {{Icon|Military science pack|1}} {{Icon|Chemical science pack|1}} {{Icon|Utility science pack|1}} ✖ &amp;lt;big&amp;gt;400&amp;lt;/big&amp;gt; || 20% || 85% || 20% || 60% || 40% || 70%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|5}} Stronger explosives 5 || {{Icon|Time|60}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} {{Icon|Military science pack|1}} {{Icon|Chemical science pack|1}} {{Icon|Utility science pack|1}} ✖ &amp;lt;big&amp;gt;500&amp;lt;/big&amp;gt; || 20% || 105% || 20% || 80% || 50% || 120%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|6}} Stronger explosives 6 ||  {{Icon|Time|60}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} {{Icon|Military science pack|1}} {{Icon|Chemical science pack|1}} {{Icon|Utility science pack|1}} ✖ &amp;lt;big&amp;gt;600&amp;lt;/big&amp;gt; || 20% || 125% || 20% || 100% || 60% || 180%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Stronger explosives (research)|7-&amp;amp;infin;}} Stronger explosives 7-&amp;amp;infin; ||  {{Icon|Time|60}} {{Icon|Automation science pack|1}} {{Icon|Logistic science pack|1}} {{Icon|Military science pack|1}} {{Icon|Chemical science pack|1}} {{Icon|Utility science pack|1}} {{Icon|Space science pack|1}} ✖ &amp;lt;br/&amp;gt;&amp;lt;big&amp;gt;{{Key|2^(Level-7)*1000}}&amp;lt;/big&amp;gt; (eg. 1000 for level 7, 2000 for level 8) || 20% per level || 125% + &amp;lt;pre class=&amp;quot;keyboard-key&amp;quot;&amp;gt;20%*(Level-6)&amp;lt;/pre&amp;gt; || 20% per level || 100% + &amp;lt;pre class=&amp;quot;keyboard-key&amp;quot;&amp;gt;20%*(Level-6)&amp;lt;/pre&amp;gt; || 50% per level || 180% + &amp;lt;pre class=&amp;quot;keyboard-key&amp;quot;&amp;gt;50%*(Level-6)&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Research]]&lt;br /&gt;
* [[Technologies]]&lt;br /&gt;
&lt;br /&gt;
{{TechNav}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Armor&amp;diff=186534</id>
		<title>Armor</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Armor&amp;diff=186534"/>
		<updated>2021-07-11T21:58:57Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Quick summary */ Armor now goes in bottom left slot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{disambiguation}}&lt;br /&gt;
&lt;br /&gt;
== Quick summary ==&lt;br /&gt;
Armor can placed in the armor slot at the bottom left of the screen to reduce the amount of damage the player receives. The more advanced types of armor can also accommodate [[equipment modules]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Armor&#039;&#039; may refer to:&lt;br /&gt;
&lt;br /&gt;
* {{imagelink|Light armor}}&lt;br /&gt;
* {{imagelink|Heavy armor}}&lt;br /&gt;
* {{imagelink|Modular armor}}&lt;br /&gt;
* {{imagelink|Power armor}}&lt;br /&gt;
* {{imagelink|Power armor MK2}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=186499</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=186499"/>
		<updated>2021-07-03T21:40:45Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Military structures */ Use unit-spawner prototype name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and structures are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military structures&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[Combat_robot_capsules|combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
There are a few exceptions:&lt;br /&gt;
* [[Artillery turret]]s and [[Artillery wagon]]s will not attack units automatically, they only attack structures automatically.&lt;br /&gt;
* Biters and spitters do &#039;&#039;not&#039;&#039; prioritize [[construction robot]]s or [[logistic robot]]s over other targets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and structures are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center|32px]]&lt;br /&gt;
| [[Player]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center|32px]]&lt;br /&gt;
| [[Defender capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center|32px]]&lt;br /&gt;
| [[Distractor capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center|32px]]&lt;br /&gt;
| [[Destroyer capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center|32px]]&lt;br /&gt;
| [[Construction robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center|32px]]&lt;br /&gt;
| [[Logistic robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center|32px]]&lt;br /&gt;
| [[Land mine]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Small biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Small spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Medium biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Medium spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Big biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Big spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| [[Enemies#Biters|Behemoth biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Behemoth spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Compilatron.png|center|32px]]&lt;br /&gt;
| Compilatron&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military structures ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center|32px]]&lt;br /&gt;
| [[Gun turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center|32px]]&lt;br /&gt;
| [[Flamethrower turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center|32px]]&lt;br /&gt;
| [[Laser turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center|32px]]&lt;br /&gt;
| [[Artillery turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center|32px]]&lt;br /&gt;
| [[Radar]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Small worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Medium worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Big worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Behemoth worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Biter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|unit-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Spitter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|unit-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/PlayerPort|Player port]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Types/StyleSpecification&amp;diff=186377</id>
		<title>Types/StyleSpecification</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Types/StyleSpecification&amp;diff=186377"/>
		<updated>2021-06-18T02:03:42Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add tooltip property&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[types/table|table]], used as a value in [[Prototype/GuiStyle]], named by the key that is used there. Prototype/GuiStyle loads one of the extensions of this prototype, depending on the specified &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Extensions ==&lt;br /&gt;
* [[Types/ActivityBarStyleSpecification]] &#039;&#039;&#039;activity_bar_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/EmptyWidgetStyleSpecification]] &#039;&#039;&#039;empty_widget_style&#039;&#039;&#039;&lt;br /&gt;
** [[Types/CameraStyleSpecification]] &#039;&#039;&#039;camera_style&#039;&#039;&#039;&lt;br /&gt;
** [[Types/MinimapStyleSpecification]] &#039;&#039;&#039;minimap_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/DropDownStyleSpecification]] &#039;&#039;&#039;dropdown_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/FlowStyleSpecification]] &#039;&#039;&#039;flow_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/FrameStyleSpecification]] &#039;&#039;&#039;frame_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/GlowStyleSpecification]] &#039;&#039;&#039;glow_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/GraphStyleSpecification]] &#039;&#039;&#039;graph_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/HorizontalFlowStyleSpecification]] &#039;&#039;&#039;horizontal_flow_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/ImageStyleSpecification]] &#039;&#039;&#039;image_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/LabelStyleSpecification]] &#039;&#039;&#039;label_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/LineStyleSpecification]] &#039;&#039;&#039;line_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/ListBoxStyleSpecification]] &#039;&#039;&#039;list_box_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/ProgressBarStyleSpecification]] &#039;&#039;&#039;progressbar_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/ScrollBarStyleSpecification]] &amp;lt;abstract&amp;gt;&lt;br /&gt;
** [[Types/HorizontalScrollBarStyleSpecification]] &#039;&#039;&#039;horizontal_scrollbar_style&#039;&#039;&#039;&lt;br /&gt;
** [[Types/VerticalScrollBarStyleSpecification]] &#039;&#039;&#039;vertical_scrollbar_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/ScrollPaneStyleSpecification]] &#039;&#039;&#039;scroll_pane_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/SliderStyleSpecification]] &#039;&#039;&#039;slider_style&#039;&#039;&#039;&lt;br /&gt;
** [[Types/DoubleSliderStyleSpecification]] &#039;&#039;&#039;double_slider_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/SpeechBubbleStyleSpecification]] &#039;&#039;&#039;speech_bubble_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/StyleWithClickableGraphicalSetSpecification]] &amp;lt;abstract&amp;gt;&lt;br /&gt;
** [[Types/ButtonStyleSpecification]] &#039;&#039;&#039;button_style&#039;&#039;&#039;&lt;br /&gt;
*** [[Types/TechnologySlotStyleSpecification]] &#039;&#039;&#039;technology_slot_style&#039;&#039;&#039;&lt;br /&gt;
** [[Types/CheckBoxStyleSpecification]] &#039;&#039;&#039;checkbox_style&#039;&#039;&#039;&lt;br /&gt;
** [[Types/RadioButtonStyleSpecification]] &#039;&#039;&#039;radiobutton_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/SwitchStyleSpecification]] &#039;&#039;&#039;switch_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/TabbedPaneStyleSpecification]] &#039;&#039;&#039;tabbed_pane_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/TableStyleSpecification]] &#039;&#039;&#039;table_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/TabStyleSpecification]] &#039;&#039;&#039;tab_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/TextBoxStyleSpecification]] &#039;&#039;&#039;textbox_style&#039;&#039;&#039;&lt;br /&gt;
* [[Types/VerticalFlowStyleSpecification]] &#039;&#039;&#039;vertical_flow_style&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Mandatory properties ==&lt;br /&gt;
&lt;br /&gt;
=== type ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/string|string]]&lt;br /&gt;
&lt;br /&gt;
The type of one of the above listed extensions, this style specification is then loaded as that extension.&lt;br /&gt;
&lt;br /&gt;
== Optional properties ==&lt;br /&gt;
&lt;br /&gt;
=== parent ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/string|string]]&lt;br /&gt;
&lt;br /&gt;
Name of a [[Types/StyleSpecification]]. This style specification inherits all property values from the parent style specification.&amp;lt;br&amp;gt;&lt;br /&gt;
It is recommended to always set the parent style to at least the basic vanilla style. If no parent is set, some style properties become mandatory and behavior may be unexpected, such as an element not showing up because its size defaults to 0.&lt;br /&gt;
&lt;br /&gt;
=== horizontal_align ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/string|string]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: &amp;quot;left&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Either &amp;quot;left&amp;quot;, &amp;quot;center&amp;quot; or &amp;quot;right&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== vertical_align ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/string|string]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: &amp;quot;top&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Either &amp;quot;top&amp;quot;, &amp;quot;center&amp;quot; or &amp;quot;bottom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== ignored_by_search ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/bool|bool]]&lt;br /&gt;
&lt;br /&gt;
=== never_hide_by_search ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/bool|bool]]&lt;br /&gt;
&lt;br /&gt;
=== horizontally_stretchable ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/StretchRule|StretchRule]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: &amp;quot;auto&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== vertically_stretchable ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/StretchRule|StretchRule]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: &amp;quot;auto&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== horizontally_squashable ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/StretchRule|StretchRule]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: &amp;quot;auto&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== vertically_squashable ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/StretchRule|StretchRule]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: &amp;quot;auto&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== natural_size ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]] or [[Types/table|table]] of [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
If this is an array, the first member of the array is &amp;lt;code&amp;gt;natural_width&amp;lt;/code&amp;gt; and the second is &amp;lt;code&amp;gt;natural_height&amp;lt;/code&amp;gt;. Otherwise the size is both &amp;lt;code&amp;gt;natural_width&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;natural_height&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== size ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]] or [[Types/table|table]] of [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
If this is an array, the first member of the array is &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; and the second is &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt;. Otherwise the size is both &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== width ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
Sets &amp;lt;code&amp;gt;minimal_width&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;maximal_width&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;natural_width&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== minimal_width ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
Minimal width ensures, that the widget will never be smaller than than that size. It can&#039;t be squashed to be smaller.&lt;br /&gt;
&lt;br /&gt;
=== maximal_width ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
Maximal width ensures, that the widget will never be bigger than than that size. It can&#039;t be stretched to be bigger.&lt;br /&gt;
&lt;br /&gt;
=== natural_width ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.&lt;br /&gt;
&lt;br /&gt;
=== height ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
Sets &amp;lt;code&amp;gt;minimal_height&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;maximal_height&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;natural_height&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== minimal_height ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
Minimal height ensures, that the widget will never be smaller than than that size. It can&#039;t be squashed to be smaller.&lt;br /&gt;
&lt;br /&gt;
=== maximal_height ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
Maximal height ensures, that the widget will never be bigger than than that size. It can&#039;t be stretched to be bigger.&lt;br /&gt;
&lt;br /&gt;
=== natural_height ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/uint32|uint32]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.&lt;br /&gt;
&lt;br /&gt;
=== padding ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
Sets &amp;lt;code&amp;gt;top_padding&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;right_padding&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bottom_padding&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;left_padding&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== top_padding ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== right_padding ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== bottom_padding ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== left_padding ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== margin ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
Sets &amp;lt;code&amp;gt;top_margin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;right_margin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bottom_margin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;left_margin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== top_margin ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== right_margin ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== bottom_margin ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== left_margin ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/int16|int16]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 0&lt;br /&gt;
&lt;br /&gt;
=== effect ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/string|string]]&lt;br /&gt;
&lt;br /&gt;
=== effect_opacity ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/float|float]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039;: 1.0&lt;br /&gt;
&lt;br /&gt;
=== tooltip ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/LocalisedString|LocalisedString]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Example of adding a custom style via [[Prototype/GuiStyle]], in this case a [[Types/FrameStyleSpecification]]:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;data.raw[&amp;quot;gui-style&amp;quot;][&amp;quot;default&amp;quot;][&amp;quot;custom_style_for_a_frame&amp;quot;] =&lt;br /&gt;
{&lt;br /&gt;
  type = &amp;quot;frame_style&amp;quot;,&lt;br /&gt;
  parent = &amp;quot;frame&amp;quot;,&lt;br /&gt;
  use_header_filler = false,&lt;br /&gt;
  drag_by_title = false&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Prototype/Roboport&amp;diff=186164</id>
		<title>Prototype/Roboport</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Prototype/Roboport&amp;diff=186164"/>
		<updated>2021-05-14T17:30:09Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: charging_offsets is only used if charging_station_count is equal to zero&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Prototype parent|Prototype/EntityWithHealth}}&lt;br /&gt;
A [[roboport]].&lt;br /&gt;
&lt;br /&gt;
{{Prototype TOC|roboport}}&lt;br /&gt;
&lt;br /&gt;
== Mandatory properties ==&lt;br /&gt;
This prototype inherits all the properties from [[Prototype/EntityWithHealth]].&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|energy_source|[[Types/EnergySource|EnergySource]]}}&lt;br /&gt;
The roboport&#039;s energy source. Must be an electric or void energy source.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|energy_usage|[[Types/Energy|Energy]]}}&lt;br /&gt;
The amount of energy the roboport uses when idle.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|recharge_minimum|[[Types/Energy|Energy]]}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|robot_slots_count|[[Types/ItemStackIndex|ItemStackIndex]]}}&lt;br /&gt;
The number of robot slots in the roboport.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|material_slots_count|[[Types/ItemStackIndex|ItemStackIndex]]}}&lt;br /&gt;
The number of repair pack slots in the roboport.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|base|[[Types/Sprite|Sprite]]}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|base_patch|[[Types/Sprite|Sprite]]}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|base_animation|[[Types/Animation|Animation]]}}&lt;br /&gt;
The animation played when the roboport is idle.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|door_animation_up|[[Types/Animation|Animation]]}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|door_animation_down|[[Types/Animation|Animation]]}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|request_to_open_door_timeout|[[Types/uint32|uint32]]}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|recharging_animation|[[Types/Animation|Animation]]}}&lt;br /&gt;
The animation played at each charging point when a robot is charging there.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|spawn_and_station_height|[[Types/float|float]]}}&lt;br /&gt;
Presumably states the height of the charging stations and thus an additive offset for the charging_offsets.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charge_approach_distance|[[Types/float|float]]}}&lt;br /&gt;
Presumably, the distance from the roboport at which robots will wait to charge.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|logistics_radius|[[Types/float|float]]}}&lt;br /&gt;
Can&#039;t be negative.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|construction_radius|[[Types/float|float]]}}&lt;br /&gt;
Can&#039;t be negative.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charging_energy|[[Types/Energy|Energy]]}}&lt;br /&gt;
The amount of energy that is given to a robot per tick.&lt;br /&gt;
&lt;br /&gt;
== Optional properties ==&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|open_door_trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|close_door_trigger_effect|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|default_available_logistic_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|default_total_logistic_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|default_available_construction_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|default_total_construction_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|circuit_wire_connection_point|[[Types/WireConnectionPoint|WireConnectionPoint]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|circuit_wire_max_distance|[[Types/double|double]]|0|optional=true}}&lt;br /&gt;
The maximum circuit wire distance for this entity.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|draw_copper_wires|[[Types/bool|bool]]|true|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|draw_circuit_wires|[[Types/bool|bool]]|true|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|circuit_connector_sprites|[[Types/CircuitConnectorSprites|CircuitConnectorSprites]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|spawn_and_station_shadow_height_offset|[[Types/float|float]]|0|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|draw_logistic_radius_visualization|[[Types/bool|bool]]|true|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|draw_construction_radius_visualization|[[Types/bool|bool]]|true|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|recharging_light|[[Types/LightDefinition|LightDefinition]]|optional=true}}&lt;br /&gt;
The light emitted when charging a robot.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charging_station_count|[[Types/uint32|uint32]]|0|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charging_distance|[[Types/float|float]]|0.0|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charging_station_shift|[[Types/vector|vector]]|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charging_threshold_distance|[[Types/float|float]]|1.0|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|robot_vertical_acceleration|[[Types/float|float]]|0.01|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|stationing_offset|[[Types/vector|vector]]|optional=true}}&lt;br /&gt;
The offset from the centre of the roboport at which robots will enter and exit.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|robot_limit|[[Types/ItemCountType|ItemCountType]]|max uint|optional=true}}&lt;br /&gt;
How many robots can exist in the network (cumulative).&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|robots_shrink_when_entering_and_exiting|[[Types/bool|bool]]|false|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|charging_offsets|[[Types/table|table]] of [[Types/vector|vector]]|optional=true}}&lt;br /&gt;
The offsets from the centre of the roboport at which robots will charge. Only used if charging_station_count is equal to zero.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|logistics_connection_distance|[[Types/float|float]]|optional=true}}&lt;br /&gt;
Must be &amp;gt;= &amp;lt;code&amp;gt;logistics_radius&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Prototype/SimpleEntityWithForce&amp;diff=183608</id>
		<title>Prototype/SimpleEntityWithForce</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Prototype/SimpleEntityWithForce&amp;diff=183608"/>
		<updated>2020-11-26T19:02:43Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: picture is a Sprite4Way in version 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Prototype parent|Prototype/EntityWithHealth}}&lt;br /&gt;
This entity will be a priority target for units/turrets, who will choose to attack it even if it does not block their path.  Use [[Prototype/SimpleEntityWithOwner]] for entities that are only attacked when they block enemies.&lt;br /&gt;
&lt;br /&gt;
{{Prototype TOC|simple-entity-with-force}}&lt;br /&gt;
&lt;br /&gt;
== Optional properties ==&lt;br /&gt;
This prototype inherits all the properties from [[Prototype/EntityWithHealth]].&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|render_layer|[[Types/RenderLayer|RenderLayer]]|&amp;quot;object&amp;quot;|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|secondary_draw_order|[[Types/int8|int8]]|0|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|random_animation_offset|[[Types/bool|bool]]|false|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|random_variation_on_create|[[Types/bool|bool]]|true|optional=true}}&lt;br /&gt;
Whether a random graphics variation is chosen when placing the entity/creating it via script/creating it via map generation. If this is false, the entity will use the first variation instead of a random one.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|pictures|[[Types/SpriteVariations|SpriteVariations]]|optional=true}}&lt;br /&gt;
Must have one of &#039;picture&#039;, &#039;pictures&#039; or &#039;animations&#039; defined.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|picture|[[Types/Sprite4Way|Sprite4Way]]|optional=true}}&lt;br /&gt;
Must have one of &#039;picture&#039;, &#039;pictures&#039; or &#039;animations&#039; defined.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|animations|[[Types/AnimationVariations|AnimationVariations]]|optional=true}}&lt;br /&gt;
Must have one of &#039;picture&#039;, &#039;pictures&#039; or &#039;animations&#039; defined.&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Prototype/SimpleEntityWithOwner&amp;diff=183607</id>
		<title>Prototype/SimpleEntityWithOwner</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Prototype/SimpleEntityWithOwner&amp;diff=183607"/>
		<updated>2020-11-26T19:01:42Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: picture is a Sprite4Way in version 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Prototype parent|Prototype/EntityWithHealth}}&lt;br /&gt;
Has a force, but unlike [[Prototype/SimpleEntityWithForce]] it is only attacked if the biters get stuck on it.&lt;br /&gt;
&lt;br /&gt;
{{Prototype TOC|simple-entity-with-owner}}&lt;br /&gt;
&lt;br /&gt;
== Optional properties ==&lt;br /&gt;
This prototype inherits all the properties from [[Prototype/EntityWithHealth]].&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|render_layer|[[Types/RenderLayer|RenderLayer]]|&amp;quot;object&amp;quot;|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|secondary_draw_order|[[Types/int8|int8]]|0|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|random_animation_offset|[[Types/bool|bool]]|false|optional=true}}&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|random_variation_on_create|[[Types/bool|bool]]|true|optional=true}}&lt;br /&gt;
Whether a random graphics variation is chosen when placing the entity/creating it via script/creating it via map generation. If this is false, the entity will use the first variation instead of a random one.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|pictures|[[Types/SpriteVariations|SpriteVariations]]|optional=true}}&lt;br /&gt;
Must have one of &#039;picture&#039;, &#039;pictures&#039; or &#039;animations&#039; defined.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|picture|[[Types/Sprite4Way|Sprite4Way]]|optional=true}}&lt;br /&gt;
Must have one of &#039;picture&#039;, &#039;pictures&#039; or &#039;animations&#039; defined.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|animations|[[Types/AnimationVariations|AnimationVariations]]|optional=true}}&lt;br /&gt;
Must have one of &#039;picture&#039;, &#039;pictures&#039; or &#039;animations&#039; defined.&lt;br /&gt;
&lt;br /&gt;
{{Prototype property|force_visibility|[[Types/ForceCondition|ForceCondition]]|&amp;quot;all&amp;quot;|optional=true}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=183463</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=183463"/>
		<updated>2020-11-24T00:38:28Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Normal commands */ Add tips commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu → Keyboard → Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. You can set the fade-out time via &#039;&#039;&#039;Options Menu → Other Settings → Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide the console, open the console and then press &#039;&#039;&#039;Escape&#039;&#039;&#039; key (or press &#039;&#039;&#039;Return&#039;&#039;&#039; without entering any message/command).&lt;br /&gt;
This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key provides intelligent code completion on commands, options and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair packs, turret_fire, custom, no_storage, train_out_of_fuel, fluid_mixing.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255 100&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGBA_color_space|RGBA value]] in the format of “# # # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the permissions GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /permissions &amp;lt;action&amp;gt; &amp;lt;parameters&amp;gt;&lt;br /&gt;
| /permissions add-player DeveloperGroup kovarex&lt;br /&gt;
| Available actions are add-player &amp;lt;group&amp;gt; &amp;lt;player&amp;gt;, create-group &amp;lt;name&amp;gt;, delete-group &amp;lt;group&amp;gt;, edit-group &amp;lt;group&amp;gt; &amp;lt;input_action&amp;gt; &amp;lt;true/false&amp;gt;, get-player-group &amp;lt;player&amp;gt;, remove-player &amp;lt;group&amp;gt; &amp;lt;player&amp;gt;, rename-group &amp;lt;group&amp;gt; &amp;lt;new_name&amp;gt; and reset&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reset-tips&lt;br /&gt;
| /reset-tips&lt;br /&gt;
| Resets the state of the tips and tricks as if the game was just started for the first time.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| Toggles if the rockets sent button is shown in the upper left corner of the screen.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all [[shortcut bar]] items, including blueprint string import, copy &amp;amp; paste, deconstruction and upgrade planner.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-tips&lt;br /&gt;
| /unlock-tips&lt;br /&gt;
| Unlocks all tips and tricks entries.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat &amp;lt;all&amp;gt;&lt;br /&gt;
| Researches all technologies and enables cheat mode. Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
	game.player.force.set_saved_technology_progress(tech, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set all trains to Automatic mode ===&lt;br /&gt;
Set all trains to automatic mode - for example after building them with a blueprint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for key,ent in pairs (game.player.surface.find_entities_filtered{name=&amp;quot;locomotive&amp;quot;}) do &lt;br /&gt;
    ent.train.manual_mode = false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Increase player inventory slots ===&lt;br /&gt;
Gives 100 additional bonus inventory slots to your entire force. Used by the [[Toolbelt (research)]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.character_inventory_slots_bonus=100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time if you replace &amp;quot;BOOL&amp;quot; with &amp;quot;true&amp;quot; or unfreezes it if you replace it with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=BOOL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, by who ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at X=&amp;quot; .. speaker.position.x .. &amp;quot;, Y=&amp;quot; .. speaker.position.y)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground-tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regenerate resources ===&lt;br /&gt;
For solid resources like iron, destroys all resource entities and creates resource entities as in the original map generation. For fluid resources like oil, sets the yield of all existing resource entities to the original amount. Regenerates resources on the entire surface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{type=&amp;quot;resource&amp;quot;}) do&lt;br /&gt;
  if e.prototype.infinite_resource then&lt;br /&gt;
    e.amount = e.initial_amount&lt;br /&gt;
  else&lt;br /&gt;
    e.destroy()&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
local non_infinites = {}&lt;br /&gt;
for resource, prototype in pairs(game.get_filtered_entity_prototypes{{filter=&amp;quot;type&amp;quot;, type=&amp;quot;resource&amp;quot;}}) do&lt;br /&gt;
  if not prototype.infinite_resource then&lt;br /&gt;
    table.insert(non_infinites, resource)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
surface.regenerate_entity(non_infinites)&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{type=&amp;quot;mining-drill&amp;quot;}) do&lt;br /&gt;
    e.update_connections()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create 10 fishes ===&lt;br /&gt;
This creates 10 fishes around of player. The player must be on the water edge.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local player = game.player&lt;br /&gt;
local surface = player.surface&lt;br /&gt;
for i = 1, 10 do&lt;br /&gt;
  local position = surface.find_non_colliding_position(&#039;fish&#039;, player.position, 10, 1)&lt;br /&gt;
  if not position then return end&lt;br /&gt;
  surface.create_entity {name = &#039;fish&#039;, position = position}&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].evolution_factor=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position.x .. &amp;quot;, &amp;quot; .. game.player.position.y)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character=nil&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find player corpses ===&lt;br /&gt;
Pings player corpses on the map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local found_corpses = game.player.surface.find_entities_filtered{type=&amp;quot;character-corpse&amp;quot;}&lt;br /&gt;
for _,corpse in pairs(found_corpses) do&lt;br /&gt;
    local player = game.get_player(corpse.character_corpse_player_index)&lt;br /&gt;
    local name = player and player.name or &amp;quot;????&amp;quot;&lt;br /&gt;
    game.player.print(name .. &amp;quot; --&amp;gt; [gps=&amp;quot; .. corpse.position.x .. &amp;quot;,&amp;quot; .. corpse.position.y .. &amp;quot;]&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Enable Research Queue ===&lt;br /&gt;
Enable the research queue for the player&#039;s current team. Can be done after the game has started if it was forgotten during the map&#039;s setup.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_queue_enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;electric-energy-distribution-1&#039;, 0)&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;steel-processing&#039;, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Access a mod&#039;s data ===&lt;br /&gt;
If the first word of the command is __mod-name__ it will run in the context of the mod with the same name. For instance, this command prints the data from Resource Spawner Overhaul:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c __rso-mod__ game.player.print(serpent.dump(global))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Print to console which tile are you have under the player position ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write mod list to file ===&lt;br /&gt;
Write all currently active mods and their version to the file script-output/mods.txt in the [[user data directory]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.write_file(&amp;quot;mods.txt&amp;quot;, serpent.block(game.active_mods))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Types/ImageStyleSpecification&amp;diff=183046</id>
		<title>Types/ImageStyleSpecification</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Types/ImageStyleSpecification&amp;diff=183046"/>
		<updated>2020-11-11T13:54:55Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Extension of [[Types/StyleSpecification]].&amp;lt;br&amp;gt;&lt;br /&gt;
Style specification type: &#039;&#039;&#039;image_style&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Optional properties ==&lt;br /&gt;
Inherits all properties from [[Types/StyleSpecification]].&lt;br /&gt;
&lt;br /&gt;
=== graphical_set ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/ElementImageSet|ElementImageSet]]&lt;br /&gt;
&lt;br /&gt;
=== stretch_image_to_widget_size ===&lt;br /&gt;
&#039;&#039;&#039;Type&#039;&#039;&#039;: [[Types/bool|bool]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
  data.raw[&amp;quot;gui-style&amp;quot;][&amp;quot;default&amp;quot;][&amp;quot;stretchy-sprite&amp;quot;] = {&lt;br /&gt;
    type = &amp;quot;image_style&amp;quot;,&lt;br /&gt;
    vertically_stretchable = &amp;quot;on&amp;quot;,&lt;br /&gt;
    horizontally_stretchable = &amp;quot;on&amp;quot;,&lt;br /&gt;
    stretch_image_to_widget_size = true,&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Fluid_system&amp;diff=182945</id>
		<title>Fluid system</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Fluid_system&amp;diff=182945"/>
		<updated>2020-10-24T03:07:18Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Pipelines */ The pipes table is the most popular section of this article, there is no reason to hide it.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&#039;&#039;&#039;Fluids&#039;&#039;&#039; are non-solid items, such as [[water]] and [[oil]]. They can normally only exist inside entities for fluid handling (like [[pipe]]s), and buildings that have fluids as input ingredients or products (like an [[oil refinery]]).&lt;br /&gt;
&lt;br /&gt;
== Fluids ==&lt;br /&gt;
[[File:fluids_gui.png|thumb|300px|right|&amp;quot;Fluids&amp;quot; tab on the [[production statistics]] screen.]]&lt;br /&gt;
The following fluids are available in-game:&lt;br /&gt;
&lt;br /&gt;
: {{Imagelink|Water}} {{Imagelink|Crude oil}} {{Imagelink|Petroleum gas}} {{Imagelink|Light oil}} {{Imagelink|Heavy oil}} {{Imagelink|Lubricant}} {{Imagelink|Sulfuric acid}} {{Imagelink|Steam}}&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
Fluids cannot be carried by the player, moved using [[inserters]], dropped on the ground, nor stored in chests, unless the fluids are stored in [[barrel]]s. They cannot be spilled or even dumped in a lake, and are counted in continuous fractions, rather than discrete integers.&amp;lt;br&amp;gt;&lt;br /&gt;
When the player picks up a structure that contains fluids, the contained fluid will try to flow into connected structures and any excess fluid that does not fit is destroyed.&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
&lt;br /&gt;
In the game, fluid is held in entities that behave as vessels (fluid boxes) of a defined size (volume). The vessels automatically connect to each other if their inputs/outputs are adjacent (pipes connect to all directions) and allow fluids to flow between them.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;volume&#039;&#039;&#039; of fluid contained in a fluid box is a value between 0 and the maximum volume. For instance, the pipe can hold 100 units of fluid, therefore the value in the pipe can be a number between 0 and 100. The &#039;&#039;&#039;level&#039;&#039;&#039; of fluid in a given entity is manifested by a percentage of the entity&#039;s maximum volume that is being occupied by a fluid. It can be observed in pipes and tanks; they have windows through which the fluid is seen at a certain level, or perhaps even as just a small trickle.&lt;br /&gt;
&lt;br /&gt;
=== Fluid mixing ===&lt;br /&gt;
[[File:Pipe_GUI.png|right|frame|GUI of a pipe inside a fluid system containing mixed fluids. Clicking the trash can icon next to a fluid will flush that fluid from the system.]]&lt;br /&gt;
The game will prevent players from accidentally mixing fluids when placing most buildings, e.g. [[pipe]]s containing different fluids cannot be placed directly next to each other. However, not every possible case of fluid mixing is considered, so the player may still mix fluids accidentally or by purposely working around the building restrictions. A fluid system containing mixed fluids can be cleared of the undesired fluids in the GUI of a pipe or [[storage tank]] that is part of that fluid system. Fluids that are flushed from pipes or storage tanks are deleted permanently.&lt;br /&gt;
&lt;br /&gt;
In a fluid system that contains mixed fluids, the alt-mode fluids icons on its pipes/storage tanks will reflect the fluid that is contained in that specific structure. So, it may look like a fluid system only contains one fluid when looking at the alt-mode icons, when in reality it contains multiple fluids which are located in some other connected structures. The GUI of a connected pipe or storage tank will always show all fluids contained in the fluid system.&amp;lt;br&amp;gt;&lt;br /&gt;
This means that if the game disallows connecting two pipes that look like they contain the same fluid with &amp;quot;Cannot connect systems with different fluids&amp;quot;, one of the fluid systems contains multiple fluids. This can solved easily by opening the GUIs of the pipes that the game refuses to connect which will show the extra fluid and allow flushing it from the fluid system.&lt;br /&gt;
&lt;br /&gt;
=== Flow ===&lt;br /&gt;
&lt;br /&gt;
All connected tanks and pipes are treated as a single vessel in that &#039;&#039;the level of fluid must be equal in all parts&#039;&#039;, to even out pressure exacted by a higher fluid level on smaller ones. This is why level is also often referred to as &#039;&#039;pressure&#039;&#039;, even though pressure is actually caused by a difference in level between two entities. All flow of fluid that happens between pipes is to achieve this balance (pumps practically ignore it and buildings disrupt it; more on that further below). The flow rate between pipes is dependent on pressure (the difference in level between the adjacent entities), it becomes slower as pipes even their levels out.&lt;br /&gt;
&lt;br /&gt;
Coming back to how the &#039;level&#039; is defined, this also means that all connected pipes and tanks attempt to even out to the same percentage of their respective volumes. For example, if 12&amp;amp;nbsp;550 units of fluid are left to flow into a storage tank of 25&amp;amp;nbsp;000-unit capacity with one pipe of 100-unit capacity connected, there will be 12&amp;amp;nbsp;500 units in the storage tank and 50 units in the pipe, both being filled to the same &#039;&#039;&#039;percentage&#039;&#039;&#039; (50%) of their capacities, even though the amounts themselves are obviously unequal.&lt;br /&gt;
&lt;br /&gt;
Machines that produce fluids put them in their output slots, which are related to a specifically labeled output pipe socket somewhere on the machine (pressing Alt reveals the labels). The slot will attempt to empty itself into the entity connected to the machine&#039;s socket, unless it is full, or contains a non-matching fluid. Machines that consume fluids also have an accordingly labeled pipe input socket. If an entity containing the correct fluid is connected to it, the machine will start behaving like a pipe that can never be filled, meaning the fluid from connected pipes and tanks drains into the machine at a fixed rate, until the machine&#039;s input slot is full. There may be machines that have pipe sockets for both input and output (like a [[electric mining drill|drill]] placed over [[uranium ore]]). They then drain the fluid for themselves first, and once full, behave as a regular pipe that attempts to even out its level with adjacent entitites. If there are multiple output/input sockets for one fluid on a machine, their activity is distributed to them equally unless some of them are blocked/full.&lt;br /&gt;
&lt;br /&gt;
=== Temperature ===&lt;br /&gt;
Temperature is currently only relevant in heating water as a medium for power generation. Even though all fluids in the game have a temperature value, it is generally the default 15°C.&lt;br /&gt;
&lt;br /&gt;
Energy, whether harnessed from [[fuel]] in [[boiler]]s, or from [[Nuclear power (research)|nuclear power]] through [[heat exchanger]]s, can be used to turn [[water]] to [[steam]], being a [[Energy and work|liquid form of work]]. Steam holds energy at a ratio of 0.2 kJ per °C per unit. In other words: 0.2 kJ of work is necessary to heat a unit of steam by one °C. Since steam/water is set to have a maximum temperature of 1000°C and minimum of 15°C, the most work that can be done on one unit is 197 kJ.&lt;br /&gt;
&lt;br /&gt;
In practice, this is barely utilized in a great variety: Boilers only output steam of 165°C temperature, and heat exchangers only output 500°C hot steam, never hotter, never colder; if insufficient energy is supplied, the heaters do not output steam altogether. The steam also does not grow colder over time. Using the 165°C steam in a [[steam engine]] has the same effect as using it in a [[steam turbine]], although it is impractical, since turbines are made to consume 500°C (superheated) steam, generating proportionally more power. All of this makes for no need of exact calculations.&lt;br /&gt;
&lt;br /&gt;
== Transport ==&lt;br /&gt;
Fluids can be transported through pipelines, barrels, or railway. It is generally practical to use piping for short-distance distribution to machines (or barrelling, if there is need to use belts), and railway transportation for longer distances.&lt;br /&gt;
&lt;br /&gt;
=== Pipelines ===&lt;br /&gt;
[[File:pipes_carrying_fluids.png|thumb|312px|Eight pipelines, each carrying a different fluid.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Pipe|Pipes]]&#039;&#039;&#039; are the most basic way to channel fluids from A to B. They automatically connect to any adjacent pipe and can do so to all four cardinal directions simultaneously. [[Pipe to ground|Underground pipes]] only work in two opposite directions, linking to another underground pipe on one side, and to another entity on the other. If a pipe section becomes too long without using pumps, all fluid inside it will be &amp;quot;spread thin&amp;quot;, resulting in very slow flow and preventing machines to use its contents effectively. &#039;&#039;&#039;[[Storage tank|Tanks]]&#039;&#039;&#039; behave the same as pipes, except their volume is much greater, which can cause this inconvenience over a much smaller distance if multiple tanks are used. Underground pipes can help alleviate this issue; although they can connect a distance of up to 10 tiles, their volume is always equivalent to two pipes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Pump]]s&#039;&#039;&#039; use electrical power to transfer fluids in one direction very quickly. They also block any back-flow, which means they can pressurize a section of piping, filling it as much as possible. This is very useful to counteract the &amp;quot;thin spread&amp;quot; outlined above, among other things. They can also be disabled using the [[circuit network]] which stops fluid flow through the pump.&lt;br /&gt;
&lt;br /&gt;
The table below shows how fast will fluid flow in a pipeline with a certain frequency of pumps. If a higher flow rate is desired, pumps should be placed more frequently. Because underground pipes only count as 2 regular pipes in terms of volume, a full-length section only counts as two pipes in this table, if a pump is placed between each underground section. Placing a filled storage tank before a pump ensures maximum possible flow rate and is therefore a suitable start of any pipeline.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number of pipes&amp;lt;br&amp;gt;between two pumps !! Maximum flow&amp;amp;nbsp;&amp;lt;br&amp;gt;(u/sec)&lt;br /&gt;
|-&lt;br /&gt;
| 0 (pump to pump) || 12000&lt;br /&gt;
|-&lt;br /&gt;
| 0 (tank to pump) || 12000&lt;br /&gt;
|-&lt;br /&gt;
| 0 (pump to tank) || 12000&lt;br /&gt;
|-&lt;br /&gt;
| 0 (pump to boiler to pump) || 12000&lt;br /&gt;
|-&lt;br /&gt;
| 0 (pump to 2 boilers to pump) || 6000&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 6000&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 3000&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 2250&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 1500&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 1285&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 1200&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 1169&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 1112&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 1067&lt;br /&gt;
|-&lt;br /&gt;
| 100 || 1033&lt;br /&gt;
|-&lt;br /&gt;
| 150 || 1022&lt;br /&gt;
|-&lt;br /&gt;
| 200 || 1004&lt;br /&gt;
|-&lt;br /&gt;
| 261 || 800&lt;br /&gt;
|-&lt;br /&gt;
| 300 || 707&lt;br /&gt;
|-&lt;br /&gt;
| 400 || 546&lt;br /&gt;
|-&lt;br /&gt;
| 500 || 445&lt;br /&gt;
|-&lt;br /&gt;
| 600 || 375&lt;br /&gt;
|-&lt;br /&gt;
| 800 || 286&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || 230&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Barrels ===&lt;br /&gt;
&#039;&#039;&#039;[[Barrel]]s&#039;&#039;&#039; are used by [[Assembling machine]]s to effectively &amp;quot;bottle&amp;quot; fluids into an item that can be handled like any other item; carried in an inventory, placed in chests and handled by [[Inserters]]. This allows the player to transport fluids via the [[belt transport system]] and the [[logistic network]]. Assembling machines are also used to empty the barrels, depositing their contents to pipes and leaving an empty barrel for another use.&lt;br /&gt;
&lt;br /&gt;
=== Railway ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Railway]]&#039;&#039;&#039; is another method of transporting fluids, and can be conducted in two ways: Either the fluids are directly pumped into a [[fluid wagon]], or they are poured into barrels and loaded into [[cargo wagon]]s. Both methods have their distinct differences: The cargo wagon can hold different types of fluid barrels, however the fluid wagon can hold more fluid (25k versus 20k) and can be emptied and filled in mere seconds, at speeds inserters with barrels require an inadequate expenditure of resources to match; while [[Stack inserter]]s can transfer barrels quickly, machines for barreling fluids are slow.[https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=48185] On the other hand, the fluids can be barreled/unbarreled while trains are en route.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Oil processing]]&lt;br /&gt;
* [[Power production]]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=18&amp;amp;t=19851 In-depth post about fluid mechanics]&lt;br /&gt;
* [https://www.reddit.com/r/factorio/comments/6w9kwi/factorio_and_fluid_mechanics_science_facts_myths/ Another in-depth examination of fluid mechanics]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=46030 How many pumps after how many pipes for how much throughput]&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=180039</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=180039"/>
		<updated>2020-06-03T01:58:16Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Modding tools */ Access a mod&amp;#039;s data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu → Keyboard → Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. You can set the fade-out time via &#039;&#039;&#039;Options Menu → Other Settings → Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide the console, open the console and then press &#039;&#039;&#039;Escape&#039;&#039;&#039; key (or press &#039;&#039;&#039;Return&#039;&#039;&#039; without entering any message/command).&lt;br /&gt;
This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key will auto-complete commands and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair packs, turret_fire, custom, no_storage, train_out_of_fuel, fluid_mixing.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255 100&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGBA_color_space|RGBA value]] in the format of “# # # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the permissions GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| Toggles if the rockets sent button is shown in the upper left corner of the screen.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all shortcut bar items.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat &amp;lt;all&amp;gt;&lt;br /&gt;
| Researches all technologies and enables cheat mode. Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
	game.player.force.set_saved_technology_progress(tech, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create new force and change your force to new one ===&lt;br /&gt;
This creates new force with specified name, than you get this new force.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force = game.create_force(&amp;quot;new_force_name&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expensive (marathon) or normal mode ===&lt;br /&gt;
To change from normal to expensive mode preset (this changes the research cost and intermediate product cost):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change back to normal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time if you replace &amp;quot;BOOL&amp;quot; with &amp;quot;true&amp;quot; or unfreezes it if you replace it with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=BOOL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, by who ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at X=&amp;quot; .. speaker.position.x .. &amp;quot;, Y=&amp;quot; .. speaker.position.y)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground-tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create 10 fishes ===&lt;br /&gt;
This creates 10 fishes around of player. The player must be on the water edge.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local player = game.player&lt;br /&gt;
local surface = player.surface&lt;br /&gt;
for i = 1, 10 do&lt;br /&gt;
  local position = surface.find_non_colliding_position(&#039;fish&#039;, player.position, 10, 1)&lt;br /&gt;
  if not position then return end&lt;br /&gt;
  surface.create_entity {name = &#039;fish&#039;, position = position}&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Emptying all pipes, underground pipes and pumps ===&lt;br /&gt;
Useful when pipes contain a fluid you dont want.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local deleted=0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(entity.name, &amp;quot;pipe&amp;quot;) or &lt;br /&gt;
		string.find(entity.name, &amp;quot;pump&amp;quot;) &lt;br /&gt;
	then&lt;br /&gt;
		for i=1,#entity.fluidbox do&lt;br /&gt;
			deleted = deleted + 1&lt;br /&gt;
			entity.fluidbox[i] = nil;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(&amp;quot;Fluids removed from &amp;quot;..deleted ..&amp;quot; entities&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].evolution_factor=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position.x .. &amp;quot;, &amp;quot; .. game.player.position.y)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character=nil&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Enable Research Queue ===&lt;br /&gt;
Enable the research queue for the players current team. Can be done after the game has started if it was forgotten during the map&#039;s setup.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_queue_enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;electric-energy-distribution-1&#039;, 0)&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;steel-processing&#039;, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Access a mod&#039;s data ===&lt;br /&gt;
If the first word of the command is __mod-name__ it will run in the context of the mod with the same name. For instance, this command prints the data from Resource Spawner Overhaul:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c __rso-mod__ game.player.print(serpent.dump(global))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Print to console which tile are you have under the player position ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=180038</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=180038"/>
		<updated>2020-06-03T01:56:15Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Modding tools */ Access a mod&amp;#039;s private data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu → Keyboard → Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. You can set the fade-out time via &#039;&#039;&#039;Options Menu → Other Settings → Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide the console, open the console and then press &#039;&#039;&#039;Escape&#039;&#039;&#039; key (or press &#039;&#039;&#039;Return&#039;&#039;&#039; without entering any message/command).&lt;br /&gt;
This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key will auto-complete commands and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair packs, turret_fire, custom, no_storage, train_out_of_fuel, fluid_mixing.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255 100&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGBA_color_space|RGBA value]] in the format of “# # # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the permissions GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| Toggles if the rockets sent button is shown in the upper left corner of the screen.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all shortcut bar items.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat &amp;lt;all&amp;gt;&lt;br /&gt;
| Researches all technologies and enables cheat mode. Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
	game.player.force.set_saved_technology_progress(tech, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create new force and change your force to new one ===&lt;br /&gt;
This creates new force with specified name, than you get this new force.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force = game.create_force(&amp;quot;new_force_name&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expensive (marathon) or normal mode ===&lt;br /&gt;
To change from normal to expensive mode preset (this changes the research cost and intermediate product cost):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change back to normal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time if you replace &amp;quot;BOOL&amp;quot; with &amp;quot;true&amp;quot; or unfreezes it if you replace it with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=BOOL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, by who ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at X=&amp;quot; .. speaker.position.x .. &amp;quot;, Y=&amp;quot; .. speaker.position.y)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground-tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create 10 fishes ===&lt;br /&gt;
This creates 10 fishes around of player. The player must be on the water edge.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local player = game.player&lt;br /&gt;
local surface = player.surface&lt;br /&gt;
for i = 1, 10 do&lt;br /&gt;
  local position = surface.find_non_colliding_position(&#039;fish&#039;, player.position, 10, 1)&lt;br /&gt;
  if not position then return end&lt;br /&gt;
  surface.create_entity {name = &#039;fish&#039;, position = position}&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Emptying all pipes, underground pipes and pumps ===&lt;br /&gt;
Useful when pipes contain a fluid you dont want.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local deleted=0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(entity.name, &amp;quot;pipe&amp;quot;) or &lt;br /&gt;
		string.find(entity.name, &amp;quot;pump&amp;quot;) &lt;br /&gt;
	then&lt;br /&gt;
		for i=1,#entity.fluidbox do&lt;br /&gt;
			deleted = deleted + 1&lt;br /&gt;
			entity.fluidbox[i] = nil;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(&amp;quot;Fluids removed from &amp;quot;..deleted ..&amp;quot; entities&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].evolution_factor=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position.x .. &amp;quot;, &amp;quot; .. game.player.position.y)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character=nil&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Enable Research Queue ===&lt;br /&gt;
Enable the research queue for the players current team. Can be done after the game has started if it was forgotten during the map&#039;s setup.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_queue_enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;electric-energy-distribution-1&#039;, 0)&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;steel-processing&#039;, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Access a mod&#039;s private data ===&lt;br /&gt;
If the first word of the command is __mod-name__ it will run in the context of the mod with the same name. For instance, this command prints the private data from Resource Spawner Overhaul:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c __rso-mod__ game.player.print(serpent.dump(global))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Print to console which tile are you have under the player position ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=180037</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=180037"/>
		<updated>2020-06-03T01:50:23Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Scripting and cheat commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu → Keyboard → Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. You can set the fade-out time via &#039;&#039;&#039;Options Menu → Other Settings → Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide the console, open the console and then press &#039;&#039;&#039;Escape&#039;&#039;&#039; key (or press &#039;&#039;&#039;Return&#039;&#039;&#039; without entering any message/command).&lt;br /&gt;
This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key will auto-complete commands and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair packs, turret_fire, custom, no_storage, train_out_of_fuel, fluid_mixing.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255 100&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGBA_color_space|RGBA value]] in the format of “# # # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the permissions GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| Toggles if the rockets sent button is shown in the upper left corner of the screen.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all shortcut bar items.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat &amp;lt;all&amp;gt;&lt;br /&gt;
| Researches all technologies and enables cheat mode. Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
	game.player.force.set_saved_technology_progress(tech, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create new force and change your force to new one ===&lt;br /&gt;
This creates new force with specified name, than you get this new force.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force = game.create_force(&amp;quot;new_force_name&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expensive (marathon) or normal mode ===&lt;br /&gt;
To change from normal to expensive mode preset (this changes the research cost and intermediate product cost):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change back to normal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time if you replace &amp;quot;BOOL&amp;quot; with &amp;quot;true&amp;quot; or unfreezes it if you replace it with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=BOOL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, by who ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at X=&amp;quot; .. speaker.position.x .. &amp;quot;, Y=&amp;quot; .. speaker.position.y)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground-tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create 10 fishes ===&lt;br /&gt;
This creates 10 fishes around of player. The player must be on the water edge.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local player = game.player&lt;br /&gt;
local surface = player.surface&lt;br /&gt;
for i = 1, 10 do&lt;br /&gt;
  local position = surface.find_non_colliding_position(&#039;fish&#039;, player.position, 10, 1)&lt;br /&gt;
  if not position then return end&lt;br /&gt;
  surface.create_entity {name = &#039;fish&#039;, position = position}&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Emptying all pipes, underground pipes and pumps ===&lt;br /&gt;
Useful when pipes contain a fluid you dont want.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local deleted=0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(entity.name, &amp;quot;pipe&amp;quot;) or &lt;br /&gt;
		string.find(entity.name, &amp;quot;pump&amp;quot;) &lt;br /&gt;
	then&lt;br /&gt;
		for i=1,#entity.fluidbox do&lt;br /&gt;
			deleted = deleted + 1&lt;br /&gt;
			entity.fluidbox[i] = nil;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(&amp;quot;Fluids removed from &amp;quot;..deleted ..&amp;quot; entities&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].evolution_factor=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position.x .. &amp;quot;, &amp;quot; .. game.player.position.y)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character=nil&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Enable Research Queue ===&lt;br /&gt;
Enable the research queue for the players current team. Can be done after the game has started if it was forgotten during the map&#039;s setup.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_queue_enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;electric-energy-distribution-1&#039;, 0)&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;steel-processing&#039;, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Print to console which tile are you have under the player position ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=180036</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=180036"/>
		<updated>2020-06-03T01:49:49Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Scripting and cheat commands */ Updated description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;&#039;console&#039;&#039;&#039; is Factorio&#039;s in-game command-line interface. See [[command line parameters]] for the command line interface of the Factorio executable.&lt;br /&gt;
&lt;br /&gt;
The in-game console can be used for:&lt;br /&gt;
&lt;br /&gt;
* Chatting with other players&lt;br /&gt;
* Occasional status updates&lt;br /&gt;
* Running commands / scripts / cheats&lt;br /&gt;
&lt;br /&gt;
There are three types of commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[#Normal commands|Normal]]&#039;&#039;&#039; - Display information about the game and customize your experience.&lt;br /&gt;
* &#039;&#039;&#039;[[#Multiplayer commands|Multiplayer]]&#039;&#039;&#039; - Message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;[[#Scripting and cheat commands|Scripting/Cheating]]&#039;&#039;&#039; - Run small Lua scripts (but they &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;disable achievements for the save game&amp;lt;/span&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu → Keyboard → Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
When the console is open, you&#039;ll see a blinking cursor at the bottom of the screen; type your message or command and hit &#039;&#039;&#039;Return&#039;&#039;&#039; to send it (this will also close the console).&lt;br /&gt;
Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
The console supports [[rich text]] tags. These tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl + Alt-clicking the map or ground will automatically insert a GPS tag and post it into the console. Shift-clicking most things with the console open will insert a tag for that thing into the console.&lt;br /&gt;
&lt;br /&gt;
When the console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately re-display all recent messages).&lt;br /&gt;
Note that by default, all executed commands are made visible to all users. You can set the fade-out time via &#039;&#039;&#039;Options Menu → Other Settings → Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide the console, open the console and then press &#039;&#039;&#039;Escape&#039;&#039;&#039; key (or press &#039;&#039;&#039;Return&#039;&#039;&#039; without entering any message/command).&lt;br /&gt;
This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
The console can be cleared with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history. The {{keybinding|Tab}} key will auto-complete commands and player names.&lt;br /&gt;
&lt;br /&gt;
== Normal commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| /alerts &amp;lt;enable/disable/mute/unmute&amp;gt; &amp;lt;alert&amp;gt;&lt;br /&gt;
| /alerts disable turret_fire&lt;br /&gt;
| Enables, disables, mutes, or unmutes the given  [[alerts|alert]] type. Available alerts: entity_destroyed, entity_under_attack, not_enough_construction_robots, no_material_for_construction, not_enough_repair packs, turret_fire, custom, no_storage, train_out_of_fuel, fluid_mixing.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /clear&lt;br /&gt;
| /clear&lt;br /&gt;
| Clears the console.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /color &amp;lt;color&amp;gt;&lt;br /&gt;
| /color 20 255 255 100&lt;br /&gt;
| Changes your color. Can either be one of the pre-defined colors or [[:Wikipedia:RGBA_color_space|RGBA value]] in the format of “# # # #”. Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /evolution&lt;br /&gt;
| /evolution&lt;br /&gt;
| Prints info about the alien evolution factor.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /help [command]&lt;br /&gt;
| /help&lt;br /&gt;
| Prints a list of available commands, the optional argument can specify the command that should be described.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /h [command]&lt;br /&gt;
| /h&lt;br /&gt;
| Same as /help.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /mute-programmable-speaker &amp;lt;mute/unmute&amp;gt; &amp;lt;local/everyone&amp;gt;&lt;br /&gt;
| /mute-programmable-speaker mute local&lt;br /&gt;
| Mutes or unmutes the global sounds created by the Programmable Speaker. Use “local” to mute just the local client. Admins can use “everyone” to mute the sounds for everyone on the server.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /perf-avg-frames &amp;lt;number&amp;gt;&lt;br /&gt;
| /perf-avg-frames 100&lt;br /&gt;
| Number of ticks/updates used to average performance counters. Default is 100. Value of 5-10 is recommended for fast convergence, but numbers will jitter more rapidly.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /permissions&lt;br /&gt;
| /permissions&lt;br /&gt;
| Opens the permissions GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /screenshot [x resolution] [y resolution] [zoom]&lt;br /&gt;
| /screenshot&lt;br /&gt;
| Takes a screenshot with the GUI hidden, centered on the player. It is saved in the &amp;quot;script-output&amp;quot; subfolder of your [[User data directory]].  Resolution is optional and defaults to the current window size. Zoom is optional and defaults to 1.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /seed&lt;br /&gt;
| /seed&lt;br /&gt;
| Prints the starting map seed.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /time&lt;br /&gt;
| /time&lt;br /&gt;
| Prints info about how old the map is.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| /toggle-action-logging&lt;br /&gt;
| Toggles logging all input actions performed by the game. This value isn’t persisted between game restarts and only affects your local game in multiplayer sessions.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| /toggle-heavy-mode&lt;br /&gt;
| Used to investigate [[Desynchronization#Using_heavy_mode_command|desyncs]]. Will slow down the game and make multiplayer unplayable.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| /toggle-rockets-sent-gui&lt;br /&gt;
| Toggles if the rockets sent button is shown in the upper left corner of the screen.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| /unlock-shortcut-bar&lt;br /&gt;
| Unlocks all shortcut bar items.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /version&lt;br /&gt;
| /version&lt;br /&gt;
| Prints the current game version.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Multiplayer commands ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Command&lt;br /&gt;
! style=&amp;quot;width:25%&amp;quot;| Example&lt;br /&gt;
! style=&amp;quot;width:46%&amp;quot;| Description&lt;br /&gt;
! style=&amp;quot;width:4%&amp;quot;| Admin only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;message&amp;gt;&lt;br /&gt;
| Hello team!&lt;br /&gt;
| Console input that does not start with {{keybinding|/}} is shown as a chat message to your team.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /admin&lt;br /&gt;
| /admin&lt;br /&gt;
| Opens the player management GUI.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /admins&lt;br /&gt;
| /admins&lt;br /&gt;
| Prints a list of game admins.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ban &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /ban xTROLLx Throwing grenades in base&lt;br /&gt;
| Bans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /banlist &amp;lt;add/remove/get/clear&amp;gt; &amp;lt;player&amp;gt;&lt;br /&gt;
| /banlist get&lt;br /&gt;
| Adds or removes a player from the banlist. Same as /ban or /unban.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /config &amp;lt;get/set&amp;gt; &amp;lt;option&amp;gt; &amp;lt;value&amp;gt;&lt;br /&gt;
| /config set password hunter2&lt;br /&gt;
| Gets or sets various multiplayer game settings. Available configs are: afk-auto-kick, allow-commands, allow-debug-settings, autosave-interval, autosave-only-on-server, ignore-player-limit-for-returning-players, max-players, max-upload-speed, only-admins-can-pause, password, require-user-verification, visibility-lan, visibility-public.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /delete-blueprint-library &amp;lt;player&amp;gt;&lt;br /&gt;
| /delete-blueprint-library everybody confirm&lt;br /&gt;
| Deletes the blueprint library storage for the given offline player from the save file. Enter “everybody confirm” to delete the storage of all offline players.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /demote &amp;lt;player&amp;gt;&lt;br /&gt;
| /demote AzureDiamond&lt;br /&gt;
| Demotes the player from admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /ignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /ignore Cthon98&lt;br /&gt;
| Prevents the chat from showing messages from this player. Admin messages are still shown.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /ignores&lt;br /&gt;
| /ignores&lt;br /&gt;
| Prints a list of ignored players.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /kick &amp;lt;player&amp;gt; &amp;lt;reason&amp;gt;&lt;br /&gt;
| /kick xTROLLx Throwing grenades in base&lt;br /&gt;
| Kicks the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mute &amp;lt;player&amp;gt;&lt;br /&gt;
| /mute Cthon98&lt;br /&gt;
| Prevents the player from saying anything in chat.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /mutes&lt;br /&gt;
| /mutes&lt;br /&gt;
| All players that are muted (can’t talk in chat).&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /open &amp;lt;player&amp;gt;&lt;br /&gt;
| /open AzureDiamond&lt;br /&gt;
| Opens another player’s inventory.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /o &amp;lt;player&amp;gt;&lt;br /&gt;
| /o AzureDiamond&lt;br /&gt;
| Same as /open.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /players [online/o/count/c]&lt;br /&gt;
| /players&lt;br /&gt;
| Prints a list of players in the game. (parameter online/o, it prints only players that are online, count/c prints only count)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /promote &amp;lt;player&amp;gt;&lt;br /&gt;
| /promote AzureDiamond&lt;br /&gt;
| Promotes the player to admin.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /purge &amp;lt;player&amp;gt;&lt;br /&gt;
| /purge Cthon98&lt;br /&gt;
| Clears all the messages from this player from the chat log.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /reply &amp;lt;message&amp;gt;&lt;br /&gt;
| /reply oh, really?&lt;br /&gt;
| Replies to the last player that whispered to you.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /r &amp;lt;message&amp;gt;&lt;br /&gt;
| /r oh, really?&lt;br /&gt;
| Same as /reply.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /server-save&lt;br /&gt;
| /server-save&lt;br /&gt;
| Saves the game on the server in a multiplayer game.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /shout &amp;lt;message&amp;gt;&lt;br /&gt;
| /shout Hello world!&lt;br /&gt;
| Sends a message to all players including other forces.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /s &amp;lt;message&amp;gt;&lt;br /&gt;
| /s Hello world!&lt;br /&gt;
| Same as /shout.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /swap-players &amp;lt;player&amp;gt; [player]&lt;br /&gt;
| /swap-players AzureDiamond&lt;br /&gt;
| Swaps your character with the given player’s character, or if two players are given swaps the two player characters.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unban &amp;lt;player&amp;gt;&lt;br /&gt;
| /unban xTROLLx&lt;br /&gt;
| Unbans the specified player.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /unignore &amp;lt;player&amp;gt;&lt;br /&gt;
| /unignore Cthon98&lt;br /&gt;
| Allows the chat to show messages from this player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /unmute &amp;lt;player&amp;gt;&lt;br /&gt;
| /unmute Cthon98&lt;br /&gt;
| Allows the player to talk in chat again.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| /whisper &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /whisper AzureDiamond that&#039;s what I see&lt;br /&gt;
| Sends a message to the specified player.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /w &amp;lt;player&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
| /w AzureDiamond that&#039;s what I see&lt;br /&gt;
| Same as /whisper.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| /whitelist &amp;lt;add/remove/get/clear&amp;gt; [player]&lt;br /&gt;
| /whitelist get&lt;br /&gt;
| Adds or removes a player from the whitelist, where only whitelisted players can join the game. Enter nothing for “player” when using “get” to print a list of all whitelisted players. An empty whitelist disables the whitelist functionality allowing anyone to join.&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scripting and cheat commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:350px;max-width:50%&amp;quot;| Command&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| /cheat &amp;lt;all&amp;gt;&lt;br /&gt;
| Researches all technologies and enables cheat mode. Using the &#039;&#039;&#039;all&#039;&#039;&#039; option also gives the player some additional items.&lt;br /&gt;
|-&lt;br /&gt;
| /command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /c &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed).&lt;br /&gt;
|-&lt;br /&gt;
| /editor&lt;br /&gt;
| Toggles the map editor.&lt;br /&gt;
|-&lt;br /&gt;
| /measured-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) and measures time it took.&lt;br /&gt;
|-&lt;br /&gt;
| /silent-command &amp;lt;command&amp;gt;&lt;br /&gt;
| Executes a Lua command (if allowed) without printing it to the console.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a very powerful feature, which also allows cheating, and as such &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;achievements will be permanently disabled for the save&amp;lt;/span&amp;gt; as soon as you use a script command.&lt;br /&gt;
&lt;br /&gt;
== Basic example scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(1234*5678)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zoom beyond normal bounds ===&lt;br /&gt;
Note that zooming too far out can cause performance hits. Be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.zoom=0.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unlock and research all technologies ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_all_technologies()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Undo this with the command in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Unresearch all technologies ===&lt;br /&gt;
This does not reset manually applied bonuses&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	tech.researched=false&lt;br /&gt;
	game.player.force.set_saved_technology_progress(tech, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reset your force ===&lt;br /&gt;
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.reset()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create new force and change your force to new one ===&lt;br /&gt;
This creates new force with specified name, than you get this new force.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force = game.create_force(&amp;quot;new_force_name&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always show rail block visualization ===&lt;br /&gt;
Permanently show the rail block visualization instead of only when holding a rail signal. Disable by replacing true with false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.game_view_settings.show_rail_block_visualisation = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inventory manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Cheat mode ===&lt;br /&gt;
Allows for infinite free crafting. Disable by replacing true with false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.cheat_mode=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Refill resources (refill oil, iron etc.) ===&lt;br /&gt;
While holding the cursor over a resource tile in-game&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.amount=7500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can refill all resources in the map with the following command. Change ore.amount to the desired value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c surface = game.player.surface&lt;br /&gt;
for _, ore in pairs(surface.find_entities_filtered({type=&amp;quot;resource&amp;quot;})) do&lt;br /&gt;
    ore.amount = 10000&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the [[data.raw|internal name]] of the item desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, here&#039;s a stack of the god-mode energy system interface:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a powerful armor with equipment and some tools for construction:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c	local player = game.player&lt;br /&gt;
player.insert{name=&amp;quot;power-armor-mk2&amp;quot;, count = 1}&lt;br /&gt;
local p_armor = player.get_inventory(5)[1].grid&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;fusion-reactor-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;exoskeleton-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;energy-shield-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;personal-roboport-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;night-vision-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
	p_armor.put({name = &amp;quot;battery-mk2-equipment&amp;quot;})&lt;br /&gt;
player.insert{name=&amp;quot;construction-robot&amp;quot;, count = 25}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== World manipulation scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or from start position&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local radius=150&lt;br /&gt;
game.player.force.chart(game.player.surface, {{x = -radius, y = -radius}, {x = radius, y = radius}})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&lt;br /&gt;
&lt;br /&gt;
=== Hide revealed map ===&lt;br /&gt;
&lt;br /&gt;
Hides all revealed chunks, inverted map revealing.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local force = game.player.force&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reveal all generated map ===&lt;br /&gt;
&lt;br /&gt;
Revels all of the generated map to the player&#039;s team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.chart_all()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete chunks ===&lt;br /&gt;
If much of the map is revealed, it increases the size of the save file. The following command cancels the generation of all chunks that are currently queued for generation and removes chunks outside a 32 chunks radius around 0,0. Note that this will remove player entities if there are any on these chunks.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface;&lt;br /&gt;
game.player.force.cancel_charting(surface); &lt;br /&gt;
local chunk_radius = 32;&lt;br /&gt;
for chunk in surface.get_chunks() do&lt;br /&gt;
  if (chunk.x &amp;lt; -chunk_radius or chunk.x &amp;gt; chunk_radius or chunk.y &amp;lt; -chunk_radius or chunk.y &amp;gt; chunk_radius) then&lt;br /&gt;
    surface.delete_chunk(chunk)&lt;br /&gt;
  end&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.always_day=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change game speed ===&lt;br /&gt;
0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.speed=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expensive (marathon) or normal mode ===&lt;br /&gt;
To change from normal to expensive mode preset (this changes the research cost and intermediate product cost):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_difficulty=1&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change back to normal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.difficulty_settings.recipe_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_difficulty=0&lt;br /&gt;
game.difficulty_settings.technology_price_multiplier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Freeze time ===&lt;br /&gt;
Stops the advancement of the time if you replace &amp;quot;BOOL&amp;quot; with &amp;quot;true&amp;quot; or unfreezes it if you replace it with &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.freeze_daytime=BOOL&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.clear_pollution()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Completely turn off pollution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, surface in pairs(game.surfaces) do&lt;br /&gt;
  surface.clear_pollution()&lt;br /&gt;
end&lt;br /&gt;
game.map_settings.pollution.enabled = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a lot of pollution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.pollute(game.player.position, 1000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where speakers are, by who ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c speakers = game.player.surface.find_entities_filtered{force = game.player.force, type=&amp;quot;programmable-speaker&amp;quot;}&lt;br /&gt;
for key, speaker in pairs(speakers) do&lt;br /&gt;
    game.player.print(speaker.last_user.name .. &amp;quot; placed a speaker at X=&amp;quot; .. speaker.position.x .. &amp;quot;, Y=&amp;quot; .. speaker.position.y)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable friendly fire for your force ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.friendly_fire = false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11×11 patch of resources, centered on the player character, where the ground is not water.&lt;br /&gt;
The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center.&lt;br /&gt;
The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number.&lt;br /&gt;
A larger patch will have exponentially more ore.&lt;br /&gt;
Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number.&lt;br /&gt;
Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local ore=nil&lt;br /&gt;
local size=5&lt;br /&gt;
local density=10&lt;br /&gt;
for y=-size, size do&lt;br /&gt;
	for x=-size, size do&lt;br /&gt;
		a=(size+1-math.abs(x))*10&lt;br /&gt;
		b=(size+1-math.abs(y))*10&lt;br /&gt;
		if a&amp;lt;b then&lt;br /&gt;
			ore=math.random(a*density-a*(density-8), a*density+a*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if b&amp;lt;a then&lt;br /&gt;
			ore=math.random(b*density-b*(density-8), b*density+b*(density-8))&lt;br /&gt;
		end&lt;br /&gt;
		if surface.get_tile(game.player.position.x+x, game.player.position.y+y).collides_with(&amp;quot;ground-tile&amp;quot;) then&lt;br /&gt;
			surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove resources around the player ===&lt;br /&gt;
Removes all resource patches from the ground in a 50 x 50 area around the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local size=50&lt;br /&gt;
local pos=game.player.position&lt;br /&gt;
&lt;br /&gt;
for _, e in pairs(surface.find_entities_filtered{area={{pos.x-size, pos.y-size},{pos.x+size, pos.y+size}}, type=&amp;quot;resource&amp;quot;}) &lt;br /&gt;
	do e.destroy() &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3×3 square.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for y=0,2 do&lt;br /&gt;
	for x=0,2 do&lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local position=nil&lt;br /&gt;
for i=1,9 do&lt;br /&gt;
	position=game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
	if position then &lt;br /&gt;
		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=100000, position=position})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create 10 fishes ===&lt;br /&gt;
This creates 10 fishes around of player. The player must be on the water edge.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local player = game.player&lt;br /&gt;
local surface = player.surface&lt;br /&gt;
for i = 1, 10 do&lt;br /&gt;
  local position = surface.find_non_colliding_position(&#039;fish&#039;, player.position, 10, 1)&lt;br /&gt;
  if not position then return end&lt;br /&gt;
  surface.create_entity {name = &#039;fish&#039;, position = position}&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local entity=&amp;quot;belt&amp;quot;&lt;br /&gt;
local surface=game.player.surface&lt;br /&gt;
local count=0&lt;br /&gt;
for key, ent in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(ent.name,entity) then&lt;br /&gt;
		count=count+1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(count)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Emptying all pipes, underground pipes and pumps ===&lt;br /&gt;
Useful when pipes contain a fluid you dont want.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local deleted=0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=game.player.force})) do&lt;br /&gt;
	if string.find(entity.name, &amp;quot;pipe&amp;quot;) or &lt;br /&gt;
		string.find(entity.name, &amp;quot;pump&amp;quot;) &lt;br /&gt;
	then&lt;br /&gt;
		for i=1,#entity.fluidbox do&lt;br /&gt;
			deleted = deleted + 1&lt;br /&gt;
			entity.fluidbox[i] = nil;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
game.player.print(&amp;quot;Fluids removed from &amp;quot;..deleted ..&amp;quot; entities&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turn off cliff generation ===&lt;br /&gt;
Sets size to &amp;quot;none&amp;quot;. Only effective on chunks that are generated after using this command. Use [[#Remove all cliffs]] to delete existing cliffs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local mgs = game.player.surface.map_gen_settings&lt;br /&gt;
mgs.cliff_settings.cliff_elevation_0 = 1024&lt;br /&gt;
game.player.surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove all cliffs ===&lt;br /&gt;
Removes all cliffs existing cliffs from the world. Use [[#Turn off cliff generation]] to turn off cliff generation in new chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for _, v in pairs(game.player.surface.find_entities_filtered{type=&amp;quot;cliff&amp;quot;}) do&lt;br /&gt;
  v.destroy()&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Delete all decoratives ===&lt;br /&gt;
Delete the decoratives that can be found in the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.destroy_decoratives({})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change map generation settings ===&lt;br /&gt;
This allows to change the map generation settings for new chunks; it does not alter already generated chunks. [[#Delete chunks|Deleted chunks]] are affected by the setting change because they are newly generated when they get explored again.&lt;br /&gt;
&lt;br /&gt;
To change resource generation settings, replace &amp;quot;iron-ore&amp;quot; with the [[Data.raw#resource|resource]] that should be changed and replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command. Replace &amp;quot;iron-ore&amp;quot; with &amp;quot;enemy-base&amp;quot; to change the enemy base generation settings. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local resource = &amp;quot;iron-ore&amp;quot;&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[resource].size = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].frequency = &amp;quot;very-high&amp;quot;&lt;br /&gt;
mgs.autoplace_controls[resource].richness = &amp;quot;very-high&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change water generation settings, replace &amp;quot;very-high&amp;quot; with the desired [https://lua-api.factorio.com/latest/Concepts.html#MapGenSize MapGenSize] in the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.water = &amp;quot;very-high&amp;quot; --[[ size]]&lt;br /&gt;
mgs.terrain_segmentation  = &amp;quot;very-high&amp;quot; --[[ frequency]]&lt;br /&gt;
surface.map_gen_settings = mgs &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enemy/evolution scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].evolution_factor=X&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_evolution.time_factor=0&lt;br /&gt;
/c game.map_settings.enemy_evolution.pollution_factor=game.map_settings.enemy_evolution.pollution_factor*2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;2&amp;quot; at the end of the last command will double the default pollution factor. You can substitute another number to increase (or decrease) the pollution factor further.&lt;br /&gt;
&lt;br /&gt;
=== Kill all biters on the &amp;quot;enemy&amp;quot; force ===&lt;br /&gt;
Note that this will kill only mobile units, spawners will not be killed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all enemies ===&lt;br /&gt;
This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies. You can [[#Prevent biters being on newly generated chunks|prevent biters being on newly generated chunks]] if desired.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kill all nearby enemies ===&lt;br /&gt;
&lt;br /&gt;
This will kill all biters, bases and worms in a configurable radius. The default, 250 tiles, is about two zoomed-out screen widths on full HD. After destruction, it shows how many objects were destroyed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface=game.player.surface&lt;br /&gt;
local pp = game.player.position&lt;br /&gt;
local cnt = 0&lt;br /&gt;
for key, entity in pairs(surface.find_entities_filtered({force=&amp;quot;enemy&amp;quot;, radius=250, position=pp })) do&lt;br /&gt;
	cnt = cnt+1&lt;br /&gt;
	entity.destroy()&lt;br /&gt;
 end	&lt;br /&gt;
game.player.print(cnt)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable peaceful mode ===&lt;br /&gt;
Enabling peaceful mode prevents biter attacks until provoked. Substitute true for false to disable. Already existing biters are not affected by this command so attacks could continue for a while after activating peaceful mode.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.surface.peaceful_mode = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable/Disable biter expansion ===&lt;br /&gt;
Biter expansion allows biters to create new nests, it is enabled by default. Substitute true for false to disable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.map_settings.enemy_expansion.enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prevent biters being on newly generated chunks ===&lt;br /&gt;
On newly generated chunks no biters will be present, however all current biters will remain unaffected. Equivalent of setting the Enemy Base Size to None under the Terrain settings during map generation but achieved mid game by [[#Change map generation settings|changing map generation settings]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local surface = game.player.surface&lt;br /&gt;
local mgs = surface.map_gen_settings&lt;br /&gt;
mgs.autoplace_controls[&amp;quot;enemy-base&amp;quot;].size = &amp;quot;none&amp;quot;&lt;br /&gt;
surface.map_gen_settings = mgs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Player character scripts ==&lt;br /&gt;
Commands concerning the player directly.&lt;br /&gt;
=== Get player position ===&lt;br /&gt;
Prints coordinates of your current position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.position.x .. &amp;quot;, &amp;quot; .. game.player.position.y)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Teleport player ===&lt;br /&gt;
Moves the player to the specified location. You should be able to teleport to a specific player if you obtain their coordinates via them executing the previous command and giving them to you.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.teleport({X, Y})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Enable god mode ===&lt;br /&gt;
God mode removes your player character allowing you to fly over obstacles and take no damage.&lt;br /&gt;
&lt;br /&gt;
Disassociate your controls from the player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.character=nil&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.selected.destroy()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To undo, spawn a player character. This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.create_character()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable long reach ===&lt;br /&gt;
Enables long reach, which allows the player to build and interact with entities at a greater distance. The default reach is 10.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local reach = 10000&lt;br /&gt;
game.player.force.character_build_distance_bonus = reach&lt;br /&gt;
game.player.force.character_reach_distance_bonus = reach&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Research scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Enable Research Queue ===&lt;br /&gt;
Enable the research queue for the players current team. Can be done after the game has started if it was forgotten during the map&#039;s setup.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.research_queue_enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.laboratory_speed_modifier=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc.&lt;br /&gt;
&lt;br /&gt;
=== Research specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=true&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unresearch specific technologies ===&lt;br /&gt;
The internal technology names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.technologies[&#039;electric-energy-distribution-1&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;electric-energy-distribution-1&#039;, 0)&lt;br /&gt;
/c game.player.force.technologies[&#039;steel-processing&#039;].researched=false; game.player.force.set_saved_technology_progress(&#039;steel-processing&#039;, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific recipes ===&lt;br /&gt;
The internal recipe/item names can be found in the infoboxes on their respective pages.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled=true&lt;br /&gt;
/c game.player.force.recipes.loader.enabled=true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;fast-loader&amp;quot;].enabled = true&lt;br /&gt;
/c game.player.force.recipes[&amp;quot;express-loader&amp;quot;].enabled = true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enable all recipes ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modding tools ==&lt;br /&gt;
A list of the internal names of most things in the vanilla game can also be found on [[data.raw]].&lt;br /&gt;
&lt;br /&gt;
=== Print to console which tile are you have under the player position ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c game.player.print(game.player.surface.get_tile(game.player.position).name)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all researched technologies to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, tech in pairs(game.player.force.technologies) do &lt;br /&gt;
	if tech.researched then&lt;br /&gt;
    list[#list+1] = tech.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;techs.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write all enabled recipes to file ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
/c local list = {}&lt;br /&gt;
for _, recipe in pairs(game.player.force.recipes) do &lt;br /&gt;
	if recipe.enabled then&lt;br /&gt;
    list[#list+1] = recipe.name&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
game.write_file(&amp;quot;recipes.lua&amp;quot;, serpent.block(list) .. &amp;quot;\n&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command line parameters]]&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=178864</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=178864"/>
		<updated>2020-04-12T12:45:39Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Military structures */ Fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and structures are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military structures&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
There are a few exceptions:&lt;br /&gt;
* [[Artillery turret]]s and [[Artillery wagon]]s will not attack units automatically, they only attack structures automatically.&lt;br /&gt;
* Biters and spitters do &#039;&#039;not&#039;&#039; prioritize [[construction robot]]s or [[logistic robot]]s over other targets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and structures are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| [[Player]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center|32px]]&lt;br /&gt;
| [[Defender capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center|32px]]&lt;br /&gt;
| [[Distractor capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center|32px]]&lt;br /&gt;
| [[Destroyer capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center|32px]]&lt;br /&gt;
| [[Construction robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center|32px]]&lt;br /&gt;
| [[Logistic robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center|32px]]&lt;br /&gt;
| [[Land mine]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Compilatron.png|center]]&lt;br /&gt;
| [[Campaign#Introduction|Compilatron]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Small biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Small spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Medium biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Medium spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Big biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Big spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| [[Enemies#Biters|Behemoth biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Behemoth spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military structures ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center|32px]]&lt;br /&gt;
| [[Gun turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center|32px]]&lt;br /&gt;
| [[Flamethrower turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center|32px]]&lt;br /&gt;
| [[Laser turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center|32px]]&lt;br /&gt;
| [[Artillery turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center|32px]]&lt;br /&gt;
| [[Radar]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Small worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Medium worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Big worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Behemoth worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Biter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Spitter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/PlayerPort|Player port]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177342</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177342"/>
		<updated>2020-01-23T23:35:16Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and structures are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military structures&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
There are a few exceptions:&lt;br /&gt;
* [[Artillery turret]]s and [[Artillery wagon]]s will not attack units, they only attack structures.&lt;br /&gt;
* Biters and spitters will not attack [[construction robot]]s or [[logistic robot]]s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and structures are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| [[Player]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| [[Defender capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| [[Distractor capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| [[Destroyer capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| [[Construction robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| [[Logistic robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| [[Land mine]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Compilatron.png|center]]&lt;br /&gt;
| [[Campaign#Introduction|Compilatron]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Small biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Small spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Medium biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Medium spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Big biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Big spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| [[Enemies#Biters|Behemoth biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Behemoth spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military structures ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| [[Gun turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| [[Flamethrower turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| [[Laser turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| [[Artillery turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| [[Radar]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Small worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Medium worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Big worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Behemoth worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Biter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Spitter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/PlayerPort|Player port]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177341</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177341"/>
		<updated>2020-01-23T16:48:51Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: In Factorio 0.18.0 biters and spitters no longer attack construction/logistic robots.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and structures are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military structures&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
There are a few exceptions:&lt;br /&gt;
* [[Artillery turret]]s and [[Artillery wagon]]s will not attack any units.&lt;br /&gt;
* Biters and spitters will not attack [[construction robot]]s or [[logistic robot]]s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and structures are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| [[Player]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| [[Defender capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| [[Distractor capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| [[Destroyer capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| [[Construction robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| [[Logistic robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| [[Land mine]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Compilatron.png|center]]&lt;br /&gt;
| [[Campaign#Introduction|Compilatron]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Small biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Small spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Medium biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Medium spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Big biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Big spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| [[Enemies#Biters|Behemoth biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Behemoth spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military structures ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Default&amp;lt;br&amp;gt;force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| [[Gun turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| [[Flamethrower turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| [[Laser turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| [[Artillery turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| [[Radar]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Small worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Medium worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Big worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Behemoth worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Biter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Spitter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/PlayerPort|Player port]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Locomotive&amp;diff=177340</id>
		<title>Locomotive</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Locomotive&amp;diff=177340"/>
		<updated>2020-01-23T16:42:20Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: In version 0.18.1 biters no longer target rails&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Locomotive}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Locomotive&#039;&#039;&#039; is the engine for movement of [[Railway|trains]] over [[Railway#Tracks|track]]. Trains are useful for moving large amounts of items over large distances.&lt;br /&gt;
&lt;br /&gt;
Locomotives are also good vehicles for the player to reach fixed destinations, as they are considerably faster than the [[car]] or [[tank]].  Naturally they do not have the same freedom of movement, however, as they are confined to the track. They can be set up to travel automatically between [[train stop]]s, or be controlled manually, even if the [[player]] is in a [[cargo wagon]] attached to the train, rather than the controlling locomotive itself. Automatic trains can also use [[rail signal]]s and [[rail chain signal]]s to designate different or changing paths on a railway, as well as manage multiple trains on multiple or intertwining tracks.&lt;br /&gt;
&lt;br /&gt;
Locomotives are [[burner devices]] and require [[fuel]] to run; the more powerful the fuel used, the faster the locomotive&#039;s acceleration and top speed will be. [[Solid fuel]], [[rocket fuel]] and [[nuclear fuel]] will give +20%, +80% and +150% acceleration respectively, and provide +5%, +15% and +15% for top speed respectively. Multiple locomotives can be used on a single train to increase its speed.&lt;br /&gt;
&lt;br /&gt;
While locomotives can be assembled by hand, the [[engine unit]] for it require [[Assembling machine|automated construction]] to build, so it cannot be built from raw materials by hand. The color of the locomotive can be customized.&lt;br /&gt;
&lt;br /&gt;
== Connecting/Disconnecting a locomotive ==&lt;br /&gt;
[[File:locomotive_gui.png|thumb|right|200px|Locomotive GUI]]&lt;br /&gt;
&lt;br /&gt;
To connect locomotives, cargo wagons or [[fluid wagon]]s to each other, either place the cars next to each other on the track (there will be an outlined green connection), or connect an already existing disconnected car by driving the locomotive near the car and press {{Keybinding|G}} by default. To disconnect the last car in a train, press {{Keybinding|V}} by default.&lt;br /&gt;
&lt;br /&gt;
== Defense ==&lt;br /&gt;
Locomotives in transit can usually crash through everything in its way (including biters, [[car|other]] [[tank|vehicles]], and the player). However, if the locomotive is moving too slowly, or the target is too tough, it will stop the train instead. If the locomotive hits an [[enemy]], the enemies will fight back and try to destroy it.&lt;br /&gt;
&lt;br /&gt;
[[Construction robot]]s are a good way to automatically repair damage at train stations.&lt;br /&gt;
&lt;br /&gt;
[[File:train_kills_biters.gif|frame|none|Train killing three big biters.]]&lt;br /&gt;
&lt;br /&gt;
== Maximum speed ==&lt;br /&gt;
The maximum speed that a locomotive can get to depends on the train that it is pulling. The speed of an accelerating, fully fueled, train is calculated every tick by the game with the following formula:&lt;br /&gt;
&lt;br /&gt;
 train_speed = max(0, abs(train_speed) - train_friction_force ÷ train_weight)&lt;br /&gt;
 train_speed = train_speed + (10 × number_of_locomotives_in_moving_direction × fuel_acceleration_bonus ÷ train_weight)&lt;br /&gt;
 train_speed = train_speed × (1 - air_resistance_of_front_rolling_stock ÷ (train_weight ÷ 1000))&lt;br /&gt;
&lt;br /&gt;
Where train_friction_force is the summed up friction of each wagon and locomotive and train_weight is the summed up weight of each wagon and locomotive, see their individual pages for the weight values. The friction and air resistance of wagons and locomotives can be found in their prototypes. The calculated train_speed is capped to &amp;lt;code&amp;gt;max_speed = 1.2 * fuel_top_speed_multiplier&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Fuel duration (in seconds) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! 1 item of !! Burning time in seconds&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Wood}} || 3.33&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Coal}} || 6.67&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Solid fuel}} || 20&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Rocket fuel}} || 166.67&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Nuclear fuel}} || 2016.67&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Driving controls ==&lt;br /&gt;
&#039;&#039;These are the default bindings. They can be changed in the Options menu.&#039;&#039;&lt;br /&gt;
{|&lt;br /&gt;
|Enter/Exit&lt;br /&gt;
|{{Keybinding|enter}}&lt;br /&gt;
|-&lt;br /&gt;
|Accelerate&lt;br /&gt;
|{{Keybinding|W}}&lt;br /&gt;
|-&lt;br /&gt;
|Decelerate/Reverse&lt;br /&gt;
|{{Keybinding|S}}&lt;br /&gt;
|-&lt;br /&gt;
|Pick which fork to take at junction&lt;br /&gt;
|{{Keybinding|A}},{{Keybinding|D}}&lt;br /&gt;
|-&lt;br /&gt;
|Connect/Disconnect rolling stock&lt;br /&gt;
|{{Keybinding|G}},{{Keybinding|V}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
Locomotives are directly connected to the following achievements:&lt;br /&gt;
{{Achievement|getting-on-track}}&lt;br /&gt;
{{Achievement|getting-on-track-like-a-pro}}&lt;br /&gt;
{{Achievement|watch-your-step}}&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery widths=320px&amp;gt;&lt;br /&gt;
File:trains_colors.png|The player among different colored locomotives.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|0.17.0|&lt;br /&gt;
* Locomotive fuel consumption doubled.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.16.0|&lt;br /&gt;
* Locomotive will show train ID in its tooltip. The ID can be used in circuit network conditions.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.19|&lt;br /&gt;
* Locomotive snaps to a train stop when placing the first locomotive next to the train stop.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.7|&lt;br /&gt;
* Inserters will no longer take fuel from locomotives and instead will take the burnt result items if the locomotive fuel uses that system.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Renamed &amp;quot;diesel-locomotive&amp;quot; to &amp;quot;locomotive&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.0|&lt;br /&gt;
* Added support for equipment grids in locomotives.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* New locomotive graphics.&lt;br /&gt;
* Can now be colored.&lt;br /&gt;
* Trains are now regular size in horizontal and vertical orientations.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.1|&lt;br /&gt;
* Trains that are moving automatically cannot be rotated.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Now show contents in tooltip.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.18|&lt;br /&gt;
* Increased the crafting cost of the cargo wagon and locomotive.&lt;br /&gt;
* Removing and merging the locomotive of a train without any additional locomotives doesn&#039;t clear the schedule anymore.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.6|&lt;br /&gt;
* Copy paste can now be used for train schedules.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.2|&lt;br /&gt;
* Now recalculates path on rotation.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.0|&lt;br /&gt;
* Backer names are used for locomotives.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.9.0|&lt;br /&gt;
* Recipe change}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.5.0|&lt;br /&gt;
* Train can find the path backward when it has locomotives in the back&lt;br /&gt;
* New locomotive graphics.&lt;br /&gt;
* Locomotive + wagon + rails are more expensive.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.4.1|&lt;br /&gt;
* Smooth (precise) rolling stock placement.&lt;br /&gt;
* Rotating while building affects the direction of the rolling stock.&lt;br /&gt;
* Rolling stocks can be disconnected from both sides.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.4.0|&lt;br /&gt;
* Locomotive uses fuel.&lt;br /&gt;
* Locomotive and Car are minable&lt;br /&gt;
* Easier riding in locomotive and car (accelerate vs. brake vs. reverse)&lt;br /&gt;
* Automated train transportation. Trains can be given schedule to go to Train Stops (named after backers).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.8|&lt;br /&gt;
* Now shows health bar below locomotive.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.1|&lt;br /&gt;
* Now emits light if active.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Railway]]&lt;br /&gt;
* [[Cargo wagon]]&lt;br /&gt;
* [[Fluid wagon]]&lt;br /&gt;
&lt;br /&gt;
{{LogisticsNav}}&lt;br /&gt;
{{C|Transport}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Locomotive&amp;diff=177137</id>
		<title>Locomotive</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Locomotive&amp;diff=177137"/>
		<updated>2019-12-17T10:06:38Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Defense */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Locomotive}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Locomotive&#039;&#039;&#039; is the engine for movement of [[Railway|trains]] over [[Railway#Tracks|track]]. Trains are useful for moving large amounts of items over large distances.&lt;br /&gt;
&lt;br /&gt;
Locomotives are also good vehicles for the player to reach fixed destinations, as they are considerably faster than the [[car]] or [[tank]].  Naturally they do not have the same freedom of movement, however, as they are confined to the track. They can be set up to travel automatically between [[train stop]]s, or be controlled manually, even if the [[player]] is in a [[cargo wagon]] attached to the train, rather than the controlling locomotive itself. Automatic trains can also use [[rail signal]]s and [[rail chain signal]]s to designate different or changing paths on a railway, as well as manage multiple trains on multiple or intertwining tracks.&lt;br /&gt;
&lt;br /&gt;
Locomotives are [[burner devices]] and require [[fuel]] to run; the more powerful the fuel used, the faster the locomotive&#039;s acceleration and top speed will be. [[Solid fuel]], [[rocket fuel]] and [[nuclear fuel]] will give +20%, +80% and +150% acceleration respectively, and provide +5%, +15% and +15% for top speed respectively. Multiple locomotives can be used on a single train to increase its speed.&lt;br /&gt;
&lt;br /&gt;
While locomotives can be assembled by hand, the [[engine unit]] for it require [[Assembling machine|automated construction]] to build, so it cannot be built from raw materials by hand. The color of the locomotive can be customized.&lt;br /&gt;
&lt;br /&gt;
== Connecting/Disconnecting a locomotive ==&lt;br /&gt;
[[File:locomotive_gui.png|thumb|right|200px|Locomotive GUI]]&lt;br /&gt;
&lt;br /&gt;
To connect locomotives, cargo wagons or [[fluid wagon]]s to each other, either place the cars next to each other on the track (there will be an outlined green connection), or connect an already existing disconnected car by driving the locomotive near the car and press {{Keybinding|G}} by default. To disconnect the last car in a train, press {{Keybinding|V}} by default.&lt;br /&gt;
&lt;br /&gt;
== Defense ==&lt;br /&gt;
Locomotives in transit can usually crash through everything in its way (including biters, [[car|other]] [[tank|vehicles]], and the player). However, if the locomotive is moving too slowly, or the target is too tough, it will stop the train instead. If the locomotive hits an [[enemy]], the enemies will fight back and try to destroy the train and the rails.&lt;br /&gt;
&lt;br /&gt;
[[Construction robot]]s are a good way to automatically repair damage at train stations.&lt;br /&gt;
&lt;br /&gt;
[[File:train_kills_biters.gif|frame|none|Train killing three big biters.]]&lt;br /&gt;
&lt;br /&gt;
== Maximum speed ==&lt;br /&gt;
The maximum speed that a locomotive can get to depends on the train that it is pulling. The speed of an accelerating train can be calculated with the following formula:&lt;br /&gt;
&lt;br /&gt;
 train_speed = max(0, abs(train_speed) - train_friction_force ÷ train_weight)&lt;br /&gt;
 train_speed = train_speed + (10 × number_of_locomotives_in_moving_direction × fuel_acceleration_bonus ÷ train_weight)&lt;br /&gt;
 train_speed = train_speed × (1 - air_resistance_of_front_rolling_stock ÷ (train_weight ÷ 1000))&lt;br /&gt;
&lt;br /&gt;
Where train_friction_force is the summed up friction of each wagon and locomotive and train_weight is the summed up weight of each wagon and locomotive, see their individual pages for the weight values. The calculated train_speed is capped to &amp;lt;code&amp;gt;max_speed = 1.2 * fuel_top_speed_multiplier&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Fuel duration (in seconds) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! 1 item of !! Burning time in seconds&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Wood}} || 3.33&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Coal}} || 6.67&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Solid fuel}} || 20&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Rocket fuel}} || 166.67&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Nuclear fuel}} || 2016.67&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Driving controls ==&lt;br /&gt;
&#039;&#039;These are the default bindings. They can be changed in the Options menu.&#039;&#039;&lt;br /&gt;
{|&lt;br /&gt;
|Enter/Exit&lt;br /&gt;
|{{Keybinding|enter}}&lt;br /&gt;
|-&lt;br /&gt;
|Accelerate&lt;br /&gt;
|{{Keybinding|W}}&lt;br /&gt;
|-&lt;br /&gt;
|Decelerate/Reverse&lt;br /&gt;
|{{Keybinding|S}}&lt;br /&gt;
|-&lt;br /&gt;
|Pick which fork to take at junction&lt;br /&gt;
|{{Keybinding|A}},{{Keybinding|D}}&lt;br /&gt;
|-&lt;br /&gt;
|Connect/Disconnect rolling stock&lt;br /&gt;
|{{Keybinding|G}},{{Keybinding|V}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
Locomotives are directly connected to the following achievements:&lt;br /&gt;
{{Achievement|getting-on-track}}&lt;br /&gt;
{{Achievement|getting-on-track-like-a-pro}}&lt;br /&gt;
{{Achievement|watch-your-step}}&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery widths=320px&amp;gt;&lt;br /&gt;
File:trains_colors.png|The player among different colored locomotives.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|0.17.0|&lt;br /&gt;
* Locomotive fuel consumption doubled.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.16.0|&lt;br /&gt;
* Locomotive will show train ID in its tooltip. The ID can be used in circuit network conditions.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.19|&lt;br /&gt;
* Locomotive snaps to a train stop when placing the first locomotive next to the train stop.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.7|&lt;br /&gt;
* Inserters will no longer take fuel from locomotives and instead will take the burnt result items if the locomotive fuel uses that system.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Renamed &amp;quot;diesel-locomotive&amp;quot; to &amp;quot;locomotive&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.0|&lt;br /&gt;
* Added support for equipment grids in locomotives.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* New locomotive graphics.&lt;br /&gt;
* Can now be colored.&lt;br /&gt;
* Trains are now regular size in horizontal and vertical orientations.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.1|&lt;br /&gt;
* Trains that are moving automatically cannot be rotated.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Now show contents in tooltip.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.18|&lt;br /&gt;
* Increased the crafting cost of the cargo wagon and locomotive.&lt;br /&gt;
* Removing and merging the locomotive of a train without any additional locomotives doesn&#039;t clear the schedule anymore.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.6|&lt;br /&gt;
* Copy paste can now be used for train schedules.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.2|&lt;br /&gt;
* Now recalculates path on rotation.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.0|&lt;br /&gt;
* Backer names are used for locomotives.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.9.0|&lt;br /&gt;
* Recipe change}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.5.0|&lt;br /&gt;
* Train can find the path backward when it has locomotives in the back&lt;br /&gt;
* New locomotive graphics.&lt;br /&gt;
* Locomotive + wagon + rails are more expensive.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.4.1|&lt;br /&gt;
* Smooth (precise) rolling stock placement.&lt;br /&gt;
* Rotating while building affects the direction of the rolling stock.&lt;br /&gt;
* Rolling stocks can be disconnected from both sides.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.4.0|&lt;br /&gt;
* Locomotive uses fuel.&lt;br /&gt;
* Locomotive and Car are minable&lt;br /&gt;
* Easier riding in locomotive and car (accelerate vs. brake vs. reverse)&lt;br /&gt;
* Automated train transportation. Trains can be given schedule to go to Train Stops (named after backers).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.8|&lt;br /&gt;
* Now shows health bar below locomotive.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.1|&lt;br /&gt;
* Now emits light if active.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Railway]]&lt;br /&gt;
* [[Cargo wagon]]&lt;br /&gt;
* [[Fluid wagon]]&lt;br /&gt;
&lt;br /&gt;
{{LogisticsNav}}&lt;br /&gt;
{{C|Transport}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Compilatron.png&amp;diff=177135</id>
		<title>File:Compilatron.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Compilatron.png&amp;diff=177135"/>
		<updated>2019-12-17T08:51:40Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Game image}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177134</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177134"/>
		<updated>2019-12-17T08:25:53Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Military structures */ Added wiki links and force&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and structures are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military structures&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military structures, but not units, will also automatically be attacked by [[artillery turret]]s and [[artillery wagon]]s.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and structures are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| [[Player]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| [[Defender capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| [[Distractor capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| [[Destroyer capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| [[Construction robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| [[Logistic robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| [[Land mine]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Compilatron.png|center]]&lt;br /&gt;
| [[Campaign#Introduction|Compilatron]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Small biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Small spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Medium biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Medium spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Big biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Big spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| [[Enemies#Biters|Behemoth biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Behemoth spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military structures ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| [[Gun turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| [[Flamethrower turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| [[Laser turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| [[Artillery turret]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| [[Radar]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Small worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Medium worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Big worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| [[Enemies#Worms|Behemoth worm]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Biter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| [[Enemies#Nests|Spitter spawner]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/PlayerPort|Player port]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
| &lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177133</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177133"/>
		<updated>2019-12-17T08:10:56Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Military units */ Added wiki links and force&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and structures are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military structures&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military structures, but not units, will also automatically be attacked by [[artillery turret]]s and [[artillery wagon]]s.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and structures are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Force !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| [[Player]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| [[Defender capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| [[Distractor capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| [[Destroyer capsule]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| [[Construction robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| [[Logistic robot]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| [[Land mine]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Compilatron.png|center]]&lt;br /&gt;
| [[Campaign#Introduction|Compilatron]]&lt;br /&gt;
| player&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Small biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Small spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Medium biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Medium spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| [[Enemies#Biters|Big biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Big spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| [[Enemies#Biters|Behemoth biter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| [[Enemies#Spitters|Behemoth spitter]]&lt;br /&gt;
| enemy&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military structures ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Icon !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| Small worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| Medium worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| Big worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| Behemoth worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial&amp;diff=177132</id>
		<title>Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial&amp;diff=177132"/>
		<updated>2019-12-17T08:05:08Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Added Compilatron image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
The &#039;&#039;campaign&#039;&#039; gamemode is Factorio&#039;s equivalent of a story mode. Campaigns are pre-generated levels where the [[player]] must accomplish some preset task, such as scanning the surroundings, [[research]]ing a certain technology, or providing a certain amount of resources into a chest. Upon completion, a game finish report is given, similar to freeplay, where kills and completion time are tallied. Completing the campaigns is not necessary to play freeplay.&lt;br /&gt;
&lt;br /&gt;
== Playing the campaign ==&lt;br /&gt;
[[File:Campaign_menu_screen.png|thumb|right|The menu to enter a Campaign.]]&lt;br /&gt;
&lt;br /&gt;
To play a campaign, select &#039;&#039;&#039;Play&#039;&#039;&#039; from the title screen, then &#039;&#039;&#039;Start campaign&#039;&#039;&#039;. Select a campaign, and level, if applicable.&lt;br /&gt;
&lt;br /&gt;
The campaign will load, and instructions will be displayed to the player. Then, the player may complete the task. For an added challenge, attempt to complete the campaign as fast as possible.&lt;br /&gt;
&lt;br /&gt;
== Types of campaigns ==&lt;br /&gt;
&lt;br /&gt;
There are a few different types of campaigns in Factorio. These types include:&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;After crash landing on this alien world you will need to explore the area, harvest local resources and automate producing the items you need to survive.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This campaign has only 1 level, called &amp;quot;Arrival&amp;quot;. The Introduction is included with the demo.&lt;br /&gt;
&lt;br /&gt;
[[File:Compilatron_large.png|thumb|right|Compilatron.]] &lt;br /&gt;
&lt;br /&gt;
The Introduction explains basic concepts like mining, crafting automation, research and enemies. The player has to automate [[automation science pack]]s, build a radar and is then attacked by [[enemies|biters]]. To escape the biters, the player moves to a new base location where they have to set up [[power production]], automate more products and fight off an increasing amount of enemies while researching some technologies. During this journey, the player is accompanied by a robot companion called &amp;quot;Compilatron&amp;quot; which gives some goals to the player and offers assistance in the from of placing some buildings to improve mining automation.&lt;br /&gt;
&lt;br /&gt;
=== Main campaign ===&lt;br /&gt;
&lt;br /&gt;
There are plans to add a longer running campaign to the game. It is described as &amp;quot;guided freeplay&amp;quot; in [https://factorio.com/blog/post/fff-291 Friday Facts #291 - New Campaign].&lt;br /&gt;
&lt;br /&gt;
=== Transport belt madness ===&lt;br /&gt;
&lt;br /&gt;
So many chests and such a small island. Can you connect the chests without your head spinning? &lt;br /&gt;
&lt;br /&gt;
=== Tight spot ===&lt;br /&gt;
&lt;br /&gt;
Little space, limited resources and a fixed amount of time. Buy land and machines and sell your final product.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Multiplayer]]&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Compilatron.png&amp;diff=177129</id>
		<title>File:Compilatron.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Compilatron.png&amp;diff=177129"/>
		<updated>2019-12-17T07:46:53Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177076</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177076"/>
		<updated>2019-12-11T16:19:55Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: resolved prototype inheritance&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and buildings are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military buildings&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military buildings, but not units, will also be attacked by [[Artillery_turret|artillery turrets]] and [[Artillery_wagon|artillery wagons]].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and buildings are identified by a hard coded flag on certain prototypes. This cannot be changed by [[modding]]. The military prototypes are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| Player&lt;br /&gt;
| [[Prototype/Character|character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| Defender capsule&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| Distractor capsule&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| Destroyer capsule&lt;br /&gt;
| [[Prototype/CombatRobot|combat-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| Construction robot&lt;br /&gt;
| [[Prototype/ConstructionRobot|construction-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| Logistic robot&lt;br /&gt;
| [[Prototype/LogisticRobot|logistic-robot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| Land mine&lt;br /&gt;
| [[Prototype/LandMine|land-mine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| Small biter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| Small spitter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| Medium biter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| Medium spitter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| Big Biter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| Big spitter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| Behemoth biter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| Behemoth spitter&lt;br /&gt;
| [[Prototype/Unit|unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military buildings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/AmmoTurret|ammo-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/FluidTurret|fluid-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/ElectricTurret|electric-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|artillery-turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| Small worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| Medium worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| Big worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| Behemoth worm&lt;br /&gt;
| [[Prototype/Turret|turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|enemy-spawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|player-port]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|simple-entity-with-force]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177072</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177072"/>
		<updated>2019-12-11T15:18:34Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: plural artillery turrets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and buildings are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military buildings&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military buildings, but not units, will also be attacked by [[Artillery_turret|artillery turrets]] and [[Artillery_wagon|artillery wagons]].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and buildings are identified by a hard coded flag on certain prototypes (and their children). This cannot be changed by [[modding]]. The military prototypes are listed in the tables below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| Player&lt;br /&gt;
| [[Prototype/Character|Character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| Defender capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| Distractor capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| Destroyer capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| Construction robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| Logistic robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| Land mine&lt;br /&gt;
| [[Prototype/LandMine|LandMine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| Small biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| Small spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| Medium biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| Medium spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| Big Biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| Big spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| Behemoth biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| Behemoth spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military buildings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|ArtilleryTurret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|Radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| Small worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| Medium worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| Big worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| Behemoth worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|PlayerPort]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177071</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177071"/>
		<updated>2019-12-11T15:15:40Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Clean up intro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and buildings are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military buildings&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military buildings, but not units, will also be attacked by [[artillery turret]] and [[artillery wagon]].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and buildings are identified by a hard coded flag on certain prototypes (and their children). This cannot be changed by [[modding]]. The military prototypes are listed in the tables below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| Player&lt;br /&gt;
| [[Prototype/Character|Character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| Defender capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| Distractor capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| Destroyer capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| Construction robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| Logistic robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| Land mine&lt;br /&gt;
| [[Prototype/LandMine|LandMine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| Small biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| Small spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| Medium biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| Medium spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| Big Biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| Big spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| Behemoth biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| Behemoth spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military buildings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|ArtilleryTurret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|Radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| Small worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| Medium worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| Big worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| Behemoth worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|PlayerPort]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177070</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177070"/>
		<updated>2019-12-11T15:15:14Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and buildings are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military buildings&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military buildings, but not units, will also be attacked by [[Artillery turret]] and [[Artillery wagon]].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and buildings are identified by a hard coded flag on certain prototypes (and their children). This cannot be changed by [[modding]]. The military prototypes are listed in the tables below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| Player&lt;br /&gt;
| [[Prototype/Character|Character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| Defender capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| Distractor capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| Destroyer capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| Construction robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| Logistic robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| Land mine&lt;br /&gt;
| [[Prototype/LandMine|LandMine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| Small biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| Small spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| Medium biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| Medium spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| Big Biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| Big spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| Behemoth biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| Behemoth spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military buildings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|ArtilleryTurret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|Radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| Small worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| Medium worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| Big worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| Behemoth worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|PlayerPort]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer&amp;diff=177069</id>
		<title>Multiplayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer&amp;diff=177069"/>
		<updated>2019-12-11T14:37:31Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* PvP */ Add link to military building article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
In addition to being a single-player game, Factorio also supports multiplayer, allowing many players to cooperate and assist each other, or work against each other in pvp. This page documents how to set up a multiplayer game, how to join one, and the Multiplayer Admin features for managing other users and the server. By default, multiplayer games run the CO-OP [[Game modes and options|freeplay scenario]] where all players work together to launch a rocket with a satellite into space. Other scenarios, including PvP maps, are available for download from the [https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 Maps and Scenarios forum].&lt;br /&gt;
&lt;br /&gt;
== Setting Up a Multiplayer Game ==&lt;br /&gt;
&lt;br /&gt;
[[File:multiplayer_game_night.png|thumb|250px|A multiplayer game.]]Multiplayer games can be joined, hosted while playing, or hosted by a dedicated server.  Multiplayer games can be advertised to other players on the same LAN or worldwide.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;Multiplayer&#039;&#039; button in the &#039;&#039;Play&#039;&#039; menu to start playing a multiplayer game, choose &#039;&#039;New&#039;&#039; or &#039;&#039;Load&#039;&#039; or &#039;&#039;Scenarios&#039;&#039; to host and play, or &#039;&#039;Browse&#039;&#039; or &#039;&#039;Play on LAN&#039;&#039; to connect to an already-running game. The host can also choose not to advertise the game at all, in which case you&#039;ll need the server&#039;s (public or otherwise reachable) IP address; you can then &#039;&#039;Connect&#039;&#039; directly to that to join the game.&lt;br /&gt;
&lt;br /&gt;
Notes and tips:&lt;br /&gt;
&lt;br /&gt;
* All game instances need the installation of &#039;&#039;exactly the same&#039;&#039; game-versions and mods.&lt;br /&gt;
* Factorio servers use port &#039;&#039;&#039;34197&#039;&#039;&#039;. The port can be changed in the [[Application directory|config]] file.&lt;br /&gt;
* Factorio uses &#039;&#039;&#039;UDP only&#039;&#039;&#039;. The game builds its own &amp;quot;reliable delivery&amp;quot; layer built on UDP to deal with packet loss and reordering issues.&lt;br /&gt;
** Make sure you configure your router&#039;s port forwarding correctly for port &#039;&#039;&#039;34197&#039;&#039;&#039;.&lt;br /&gt;
** Make sure your router does not [https://doc.pfsense.org/index.php/Static_Port randomize the source port] on packets outbound from &#039;&#039;&#039;34197&#039;&#039;&#039;.  Some routers do this and require [https://forum.pfsense.org/index.php?PHPSESSID=3k4h9n5o2tksgqv910fknf7qt7&amp;amp;topic=142188.msg798594#msg798594 additional configuration] to prevent it.&lt;br /&gt;
** Make sure there is no firewall or anti-virus blocking the UDP-packets.&lt;br /&gt;
* The hard limit for the number of players is [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65,535]. However, practical limit for this is much lower, popular streamers have managed slightly over a hundred players.&lt;br /&gt;
&lt;br /&gt;
=== Dedicated/Headless server ===&lt;br /&gt;
&lt;br /&gt;
As of Factorio version 0.12.0 onwards, a dedicated (or headless) server can be started using the --start-server command line option. You can run factorio --help to get a list of all command-line arguments that Factorio accepts.&lt;br /&gt;
&lt;br /&gt;
In the headless mode:&lt;br /&gt;
* Graphics are not initialized (faster start up, less memory usage, works on completely headless servers)&lt;br /&gt;
* Game starts immediately and loads a save given as a parameter to the command&lt;br /&gt;
* The server has no character in game&lt;br /&gt;
* Game is paused while there are no players connected (though this can be overridden using the no-auto-pause option in the server-settings.json)&lt;br /&gt;
* Saves the game on exit (and autosaves normally)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;0.13 onwards expects --start-server to be followed by a path to a save file.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You will need to create your save file before you start the server, as the dedicated server REQUIRES a save file to be provided. This can easily be done using the --create command-line argument. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # This creates a new save, as if by clicking the New Game button in the GUI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # This starts a server that will host the file created on the previous line&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several JSON configuration files that factorio can make use of to change the server and map settings:&lt;br /&gt;
* &#039;&#039;&#039;map-gen-settings&#039;&#039;&#039; to set parameters used by the map generator such as width and height, ore patch frequency and size, etc. (Added in 0.13)&lt;br /&gt;
* &#039;&#039;&#039;map-settings&#039;&#039;&#039; to control pollution spread, biter expansion and evolution, and more (Added in 0.15)&lt;br /&gt;
* &#039;&#039;&#039;server-settings&#039;&#039;&#039; which consolidated several command-line options into a single file (Added in 0.14.12)&lt;br /&gt;
Example files for each of these parameters are included in the data subdirectory.&lt;br /&gt;
&lt;br /&gt;
The --map-gen-settings and --map-settings options must be used with the --create option when you create a new map.  For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting the factorio server requires you to specify the location of the server-settings.json file. By default this is in the factorio data folder. For example to start factorio using the most recent saved map, you would run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start a server and a client on the same computer you need to launch the client with the following launch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;--no-log-rotation&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[Console#Command_line_parameters]] for more command line parameters.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up a Linux Factorio server ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Factorio now requires &amp;lt;tt&amp;gt;glibc&amp;lt;/tt&amp;gt; version 2.18, but CentOS/RHEL 7 only ship with version 2.17 so this guide will no longer work without [https://forums.factorio.com/viewtopic.php?t=54654#p324493 manually compiling &amp;lt;tt&amp;gt;glibc&amp;lt;/tt&amp;gt; 2.18].&lt;br /&gt;
&lt;br /&gt;
This step-by-step guide has been verified on fresh CentOS 7 and RHEL 7 installs but should be applicable with little to no changes on most distributions.&lt;br /&gt;
&lt;br /&gt;
The guide assumes you will install the headless server under &#039;&#039;&#039;/opt/factorio&#039;&#039;&#039;, adjust paths according to your own setup. We will also suggest that you run the Factorio server as a separate user to harden security of your setup.&lt;br /&gt;
&lt;br /&gt;
Note that there are two distinct packages for Linux that can be used to run a headless server. First is the usual Linux download, that contains the full game. The other is the special  [https://www.factorio.com/download-headless headless package]. The headless package does not contain any files irrelevant for a pure server, such as graphics and sounds. It is also not linked against libraries that may not be present on a server machine, such as Xlib, libGL or libasound. This option should be selected if running in a 3rd party hosted server.&lt;br /&gt;
&lt;br /&gt;
This guide does not handle firewall/port forwarding since this can be done in various ways on Linux (make sure to read up how this is done as a Linux admin on your particular distribution)&lt;br /&gt;
&lt;br /&gt;
==== Basic installation ====&lt;br /&gt;
&lt;br /&gt;
* Download the selected package -- either full game or the headless package -- and upload the Linux tar.gz or tar.xz package to your server /tmp&lt;br /&gt;
* Extract the package in /tmp to /opt/factorio&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # Use the correct file name. It includes the factorio version number&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # if you downloaded a .tar.xz file (ver 0.15.x)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a new user to your system and assign ownership of the factorio dir to it (please, do not run as the root user, sudo may be needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try the binary&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As long as it fails saying it cannot find/open the savename.zip you are set! Just upload a save from your own computer and put it in the /opt/factorio/saves directory, or use the --create ./saves/newgame.zip argument.&lt;br /&gt;
&lt;br /&gt;
==== Additional configuration ====&lt;br /&gt;
&lt;br /&gt;
You can use a [https://github.com/Bisa/factorio-init Linux factorio-init script] to start/stop your headless server in a much better way. The script will ensure you only ever use the most recent save when your server starts (even if that was an auto-save) while also letting you set a number of other settings like Autosave frequency and Latency settings. This script can also simplify updating the server when combined with a [https://github.com/narc0tiq/factorio-updater Linux factorio-updater script].&lt;br /&gt;
&lt;br /&gt;
Additionally, if you plan to enable mods on your server a mod updater script can greatly simplify this process. Here are several existing options, or you can write your own!&lt;br /&gt;
* [https://github.com/pdemonaco/factorio-mod-updater Python Mod Updater]&lt;br /&gt;
* [https://github.com/astevens/factorio-mod-updater Ruby Mod Updater]&lt;br /&gt;
&lt;br /&gt;
=== How to list a server-hosted game on the matching server ===&lt;br /&gt;
&lt;br /&gt;
In order to publish the game to the matching server, Factorio needs to be given some more information than just the save file location. These information are provided in a &#039;&#039;server settings file&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To create a server settings file, look at the example file located in &#039;&#039;&#039;data/server-settings.example.json&#039;&#039;&#039; in the Factorio [[Application directory]]. The recommended way is to make a copy of this example file and edit the copy.&lt;br /&gt;
&lt;br /&gt;
The following values can be changed:&lt;br /&gt;
; Name: This will be the name under which the server will be listed in the server browser&lt;br /&gt;
; Description: A brief description of your server&lt;br /&gt;
; Tags: A list of game tags&lt;br /&gt;
; Max Players: Allows you to limit the number of players that can be connected to the server at the same time. If you want no limit, just set max_players to 0.&lt;br /&gt;
* Visibility for server browser: May be either public, LAN or hidden.&lt;br /&gt;
** Public: The server will appear in the public server list. This requires the login credentials below to be filled in.&lt;br /&gt;
** LAN: The server will not appear in the public server list, but will be available through the Play On LAN button&lt;br /&gt;
** Hidden: Clients will have to connect using the server&#039;s IP address&lt;br /&gt;
* User credentials using a username and password or authentication token (found on the factorio website or in the player-data.json): These are necessary if you wish to make the server public. Otherwise, they can be left empty.&lt;br /&gt;
** For security reasons it is recommended to use authentication token as this document is stored as plain text. Though it should be noted that an authentication token is a sensitive piece of information as well, and you are well-advised to keep it secret.&lt;br /&gt;
* Server Password&lt;br /&gt;
** Field name is game_password&lt;br /&gt;
* Whether to verify user identity&lt;br /&gt;
(There are additional values in v0.14 of factorio.)&lt;br /&gt;
&lt;br /&gt;
=== Technical Implementation Details ===&lt;br /&gt;
&lt;br /&gt;
Notes about some technical details surrounding multiplayer have been published by the development team in several Friday Facts blog posts:&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Lock step architecture]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 Client-server connections]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT punching, introduced in 0.13]&lt;br /&gt;
&lt;br /&gt;
=== More Guides ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ How to set up Factorio server with cookbook]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Tips ===&lt;br /&gt;
* The key for [[Console|console commands]] is also used initiate chat in multiplayer. To execute a command instead of chatting, you need to type &#039;&#039;/c&#039;&#039; before the command. Commands executed are &#039;&#039;visible to all players&#039;&#039;. Additionally, the multiplayer game must have been started with commands allowable for commands to work.&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /color r g b a&lt;br /&gt;
r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use [https://www.w3schools.com/colors/colors_converter.asp this site] to convert colors to rgb numbers). a is alpha channel aka transparency of the color to the base texture.&lt;br /&gt;
* To give yourself admin access, you need to create a server-adminlist.json in the same directory as factorio-current.log. The file should contain a list of admins, like so: &amp;lt;code&amp;gt;[ &amp;quot;user1&amp;quot;, &amp;quot;user2&amp;quot; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Joining a Multiplayer game ==&lt;br /&gt;
&lt;br /&gt;
As of version 0.13, players no longer necessarily have to port-forward to play with others. Players may join each other through Steam, or by just the port-forwarded host.&lt;br /&gt;
&lt;br /&gt;
Players wishing to join a game may do so in multiple ways:&lt;br /&gt;
&lt;br /&gt;
* Joining by directly inputting a public IP and port into Factorio.&lt;br /&gt;
* Selecting the server from the active public server menu.&lt;br /&gt;
* Joining through Steam&#039;s services.&lt;br /&gt;
* Playing a local LAN game.&lt;br /&gt;
&lt;br /&gt;
=== Joining by IP ===&lt;br /&gt;
&lt;br /&gt;
To join a multiplayer game by IP, you will need to know the public IP of a valid server. You can find this through social media, websites, or by word of mouth. After acquiring the IP and port, simply go to play -&amp;gt; Multiplayer -&amp;gt; Connect to server, and provide all the information it asks for.&lt;br /&gt;
&lt;br /&gt;
If the server has been set up correctly to accept public connections, you should be able to join the game.&lt;br /&gt;
&lt;br /&gt;
=== Joining via server list ===&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s devs keep a list of all public servers that declare themselves to the service, allowing players to join directly through Factorio. Most of these servers will be password-requiring, but many completely public servers can be connected to. To join via server list, go to Play -&amp;gt; Multiplayer -&amp;gt; Browse public games. Provide your Factorio.com login if asked, and a list of public servers will appear. Simply select one.&lt;br /&gt;
&lt;br /&gt;
=== Joining through Steam ===&lt;br /&gt;
&lt;br /&gt;
Steam provides a &amp;quot;game invite&amp;quot; system, simply use that to join. You can find more info about how to use steam in it&#039;s documentation. &#039;&#039;This is the most recommended way for the average player to use multiplayer with their friends, as it allows Steam to handle everything&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Joining a local LAN game ===&lt;br /&gt;
&lt;br /&gt;
If you have some friends on the same internet connection as you (in the same building or network), you may play a LAN game. Simply go to Play -&amp;gt; Multiplayer -&amp;gt; Play on LAN.&lt;br /&gt;
&lt;br /&gt;
=== Finding Other Players ===&lt;br /&gt;
&lt;br /&gt;
* Use the [https://forums.factorio.com/viewforum.php?f=53 multiplayer board in the forum].&lt;br /&gt;
* Many players use other software like Evolve to meet other players. This also has the &amp;quot;advantage&amp;quot; of creating a virtual LAN among the players. See down under software.&lt;br /&gt;
* Some also use [https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=9136 Steam] to find other players.&lt;br /&gt;
* There is an external [http://serverlist.lgms.nl/ server browser] with various search options.&lt;br /&gt;
* Tell your friends to buy Factorio, then play with them!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a Server Behind NAT ===&lt;br /&gt;
&lt;br /&gt;
Factorio requires that the server (in client-server mode) have a publicly accessible IP address or that all players are on the same LAN. If you are behind NAT, you must set up port forwarding ([[Multiplayer#Playing_over_LAN_.2F_Internet|see above]] for port number) or use virtual LAN software such as Hamachi or Evolve.&lt;br /&gt;
&lt;br /&gt;
Multiplayer games will be launched in client-server mode (also [http://www.factorio.com/blog/post/fff-99 multiplayer forwarding] mode). In this mode, all clients send their network traffic to the server and the server forwards the traffic to the other clients. The advantage of this is that it allows games where some players are inside a LAN and others are outside. The disadvantage may be slightly more lag as packets must travel an extra hop (through the server).&lt;br /&gt;
&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6393 Forwarding ports without logging into your router]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with Evolve]&lt;br /&gt;
* [http://steamcommunity.com/sharedfiles/filedetails/?id=653628496 A guide for connecting with Hamachi]&lt;br /&gt;
&lt;br /&gt;
== PvP ==&lt;br /&gt;
&lt;br /&gt;
In PvP mode, players can be on different forces. Each force can have one (free-for-all) or more players (teams). Each force has its own independent research progression. Additionally, each force&#039;s [[military units and buildings]] will attack other players as enemies, unless a cease fire is set. Note that, depending on the scenario, cease fires may be unidirectional — setting a cease fire with an opposing force does not guarantee a cease fire from them in return.&lt;br /&gt;
&lt;br /&gt;
To start a PvP game, you can select the &#039;PvP&#039; scenario from the &#039;Play&#039; menu, or download a custom scenario which also supports PvP.&lt;br /&gt;
&lt;br /&gt;
After downloading a PvP scenario, you need to move it to your application directory, and create the multiplayer game using the scenario.&lt;br /&gt;
&lt;br /&gt;
# Download the scenario and place the scenario directory in the &#039;&#039;scenarios&#039;&#039; directory within your [[Application_directory#Directory_locations_by_OS_and_installation_method|user data directory]].&lt;br /&gt;
# Launch Factorio&lt;br /&gt;
# Click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Multiplayer&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Scenario&#039;&#039;&lt;br /&gt;
# Choose the PvP scenario you want and click &#039;&#039;Create&#039;&#039;&lt;br /&gt;
# Choose latency and other settings, then click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Other players can now join the game&lt;br /&gt;
&lt;br /&gt;
=== Forces ===&lt;br /&gt;
&lt;br /&gt;
Forces can be manually created via the console. This allows any map/scenario to be used for PvP. This may not be as convenient as a pre-made PvP scenario, as there will be no way for players to turn on/off cease fires other than through the console.&lt;br /&gt;
&lt;br /&gt;
Each created force has its own research progression and different forces may attack each other.&lt;br /&gt;
&lt;br /&gt;
The console commands for setting up and controlling forces are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
game.create_force(&amp;quot;Name&amp;quot;)&lt;br /&gt;
--Creates the force &amp;quot;Name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
game.players[&amp;quot;Player_name&amp;quot;].force = game.forces[&amp;quot;Name&amp;quot;]&lt;br /&gt;
--Sets this player to the new force&lt;br /&gt;
&lt;br /&gt;
game.forces[&amp;quot;Name&amp;quot;].set_cease_fire(&amp;quot;Other_force_name&amp;quot;, true)&lt;br /&gt;
--Sets the new force ceasefire to the &amp;quot;other force&amp;quot;&lt;br /&gt;
&lt;br /&gt;
game.forces[&amp;quot;Name&amp;quot;].set_spawn_position({x = 10, y = 20}, game.surfaces[1])&lt;br /&gt;
--Sets the spawn position of the force&lt;br /&gt;
&lt;br /&gt;
game.print(#game.forces)&lt;br /&gt;
--Prints the number of forces&lt;br /&gt;
&lt;br /&gt;
for name, force in pairs (game.forces) do&lt;br /&gt;
   game.print(name)&lt;br /&gt;
end&lt;br /&gt;
--Prints the name of all the forces&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ability of players and entities belonging to one force to interact with structures belonging to another, non-friendly force is limited. However, some types of interactions are still possible:&lt;br /&gt;
&lt;br /&gt;
;Manual pickup from belts&lt;br /&gt;
: Players can pick up items traveling along a transport belt that belongs to an opposing force. Note however that this can&#039;t be automated: Inserters will &#039;&#039;not&#039;&#039; take items from an opposing force&#039;s belts.&lt;br /&gt;
;Belt network connection&lt;br /&gt;
: Belts will connect to each other regardless of force membership, so it&#039;s possible to extend an opposing force&#039;s belt line, and items will flow to them. It is also possible to side-load into, and place items onto (with inserters) an opposing force&#039;s belt line.&lt;br /&gt;
;Fluid network connection&lt;br /&gt;
: Pipes (and storage tanks, and pumps, &amp;amp;c) will connect to each other regardless of force membership. For example, it&#039;s possible to pump fluids out of or into a storage tank belonging to an opposing force.&lt;br /&gt;
;Power leeching&lt;br /&gt;
: Players can draw power from an opposing force&#039;s electric network, by building structures inside the coverage area of a power pole belonging to an opposing force. Power poles that you build next to a power pole belonging to an opposing force will automatically connect to it, but will be impossible to connect or disconnect manually.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
=== Narrative history ===&lt;br /&gt;
&lt;br /&gt;
Because of the potentially immense amount of activity on a map, the game engine utilizes a [https://www.factorio.com/blog/post/fff-76 lock step architecture]. All instances of the game run full simulations of the entire world and only player actions are transferred across the network.&lt;br /&gt;
&lt;br /&gt;
Multiplayer games were introduced to Factorio with version 0.11.0. The only connection method available was peer-to-peer mode which meant every player had to be able to directly communicate with every other player. In version 0.12.4, a client-server mode of communication was introduced in which the server (either a dedicated one or the player who hosted the game) relays messages to all peers. This means that direct connection between all players is no longer necessary. As of version 0.13, P2P connecting is completely removed.&lt;br /&gt;
&lt;br /&gt;
As of version 0.12.0, the game features &amp;quot;latency hiding&amp;quot; mechanics where the game simulates some of the player&#039;s actions locally to make some common interactions (such as moving the player&#039;s character) more fluid.  Not every action is a part of latency hiding – most notably, car or train driving and shooting are not a part of it.&lt;br /&gt;
&lt;br /&gt;
=== Version history ===&lt;br /&gt;
&lt;br /&gt;
Maintainer note: The following history may not be fully up to date, or comprehensive. Factorio&#039;s multiplayer has undergone a great deal of small changes since its inception, however this history will provide a rough overview.&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.14|&lt;br /&gt;
* Added multiplayer server option &amp;quot;Autosave only on server&amp;quot;.&lt;br /&gt;
* Deconstructing/canceling deconstruction sets the &amp;quot;last user&amp;quot; on an entity.&lt;br /&gt;
* Decreased the size of connection accept message with lot of mod which could help some people with 50+ mod multiplayer games.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.13|&lt;br /&gt;
* Reconnecting to multiplayer game that the player is already in (due to being dropped, most often) instantly closes the previous connection and connects the player.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.11|&lt;br /&gt;
* Multiplayer user names can only consist of letters, and &amp;lt;code&amp;gt; -_. &amp;lt;/code&amp;gt; characters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.10|&lt;br /&gt;
* Disabled 32bit (x86) multiplayer. All hosts and members must be running the 64bit (x86_64) version of the game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.8|&lt;br /&gt;
* More than 10 players in one game will reduce the rate the game is saved to the server.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.6|&lt;br /&gt;
* Username is now set to username setting, not email.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.5|&lt;br /&gt;
* Added AFK Auto kick interval to multiplayer host settings (with never as default).}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.3|&lt;br /&gt;
* When save of scenario is loaded in multiplayer, it&#039;s scenario is saved in user scenarios.&lt;br /&gt;
* Added &amp;lt;code&amp;gt;/time&amp;lt;/code&amp;gt; command to print the current map age.&lt;br /&gt;
* Added option to host multiplayer game with scenario (it only had new game/load game there).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.2|&lt;br /&gt;
* Can specify limit of upload speed when hosting.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.0|&lt;br /&gt;
* Server doesn&#039;t stop/slow down the game when some client is too slow, stops communicating or saves the game longer than the server.&lt;br /&gt;
* Players automatically quit game after 3 desyncs.&lt;br /&gt;
* Removed the option to enable/disable latency hiding, it is always on on clients (and off on the server).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.10|&lt;br /&gt;
* Server stdout messages now contain time stamps and message-type tags}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.2|&lt;br /&gt;
* Limit multiplayer player name to 60 characters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Improved Multiplayer game UX&lt;br /&gt;
* Server games are published to the server and clients can browse existing games.&lt;br /&gt;
* Removed multiplayer peer-to-peer mode.&lt;br /&gt;
* Building sound is played also for other players in multiplayer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.31|&lt;br /&gt;
* Human readable error notice when multiplayer connection wasn&#039;t successful. (https://forums.factorio.com/23132)&lt;br /&gt;
* Improved map download speed when connecting to multiplayer game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.30|&lt;br /&gt;
* Mod checksums are calculated when the game starts and are compared with other peers when joining a multiplayer game. This is to ensure everyone has exactly the same mod in order to prevent desyncs caused by local changes made to mod files.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.28|&lt;br /&gt;
* Added --port to specify which network port the game should use, when hosting with --start-server or --mp-load-game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.27|&lt;br /&gt;
* The report of different mods when trying to connect to multiplayer game is now scroll-able when needed.&lt;br /&gt;
* Better message when the server leaves a multiplayer game}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.11|&lt;br /&gt;
* Added --no-auto-pause: When running as a server, --no-auto-pause will prevent stopping the game when no players are connected.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.9|&lt;br /&gt;
* Added resume button to multiplayer game menu}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.7|&lt;br /&gt;
*New command line options for the headless server: --disallow-commands and --peer-to-peer}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.5|&lt;br /&gt;
* Multiplayer broadcast (heartbeats) is done via a single message when not using peer2peer.&lt;br /&gt;
* Further optimizations in size of the Multiplayer heartbeat (message sent every tick).&lt;br /&gt;
* LatencyState is suspended when player is killed (and waiting for respawn) in Multiplayer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.4|&lt;br /&gt;
* Simple mechanism for multiplayer relaying via the server.&lt;br /&gt;
* Less annoying glitches when running and shooting in multiplayer with latency hiding.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Multiplayer latency hiding (gives impression that some common tasks are performed immediately)&lt;br /&gt;
* Factorio can run as a dedicated server without graphics.&lt;br /&gt;
* Basic PvP: New forces can now be created and merged back together; a cease-fire can be agreed upon between forces&lt;br /&gt;
* IPv6 support for multiplayer.&lt;br /&gt;
* DNS names can be used when connecting to multiplayer game.&lt;br /&gt;
* Player&#039;s logistic filters are now remembered after respawn in multiplayer&lt;br /&gt;
* Smaller multiplayer heartbeat packet size.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.19|&lt;br /&gt;
* Multiplayer dropping threshold is doubled during map upload / download.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.17|&lt;br /&gt;
* Autosaves in multiplayer are performed at the same time by all clients (interval is set by hosting player).&lt;br /&gt;
* Progress bar is shown when non-responsive peers are about to be dropped from the game in the Multiplayer.&lt;br /&gt;
* Progress bar is shown when other peers in multiplayer are saving map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.16|&lt;br /&gt;
* Revived character (after dying in multiplayer) are placed on the spawn point instead of the center of the map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.2|&lt;br /&gt;
*  Mods that don&#039;t affect game state are not needed to be synchronized when playing multiplayer game or replaying game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.0|&lt;br /&gt;
* Introduced}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Player&amp;diff=177068</id>
		<title>Player</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Player&amp;diff=177068"/>
		<updated>2019-12-11T14:30:26Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add link to military building article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{:Infobox:Player}}&lt;br /&gt;
Factorio is played from the angled top down perspective of the &#039;&#039;player&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;physical representation&#039;&#039; (or the &#039;&#039;&#039;Engineer&#039;&#039;&#039;) of the player is the &#039;&#039;character&#039;&#039;, who is always at the center of view. In multiplayer, player characters will appear in different colors. Color can be set manually with the &amp;lt;code&amp;gt;/color&amp;lt;/code&amp;gt; command, see [[Console#Change_Player_color|Console]]. These colors transfer to any entered [[car]] or [[tank]], depending on which player is driving them. These colors also transfer to [[gun turret]]s, [[laser turret]]s or [[gate]]s, depending on who they were placed by.&lt;br /&gt;
&lt;br /&gt;
The character is &#039;&#039;&#039;part of the player&#039;&#039;&#039; and represents the physical existence of the player in the game-world. In technical terms: A character is just one property of the [[player]], and it is the only that can be controlled at a time.&lt;br /&gt;
&lt;br /&gt;
The character&#039;s maximum [[Damage|health]] is 250 (without energy shields). The character&#039;s main inventory has 80 slots (without bonuses from [[Power_armor|power armor]], [[Toolbelt_(research)|toolbelt research]], or [[Character_logistic_trash_slots_(research)|logistic trash slots]]). Similar to the stationary radar, the character constantly reveals an area of 5×5 [[Map_structure#Chunk|chunks]], centered on the chunk the character occupies.&lt;br /&gt;
&lt;br /&gt;
== Distinction between player and character ==&lt;br /&gt;
&lt;br /&gt;
[[File:twoplayers.png|thumb|right|180x180px|Two different color characters in multiplayer.]]&lt;br /&gt;
&lt;br /&gt;
Technically the player is only the &amp;quot;player-view&amp;quot;. The player is unlike the &#039;&#039;character&#039;&#039;, (the little person that runs around on the ground) The character is part of the player, but the player is not just the character.&lt;br /&gt;
&lt;br /&gt;
You can for example play in god-mode (such as in the sandbox game mode). In that mode you don&#039;t have a character, only a player.&lt;br /&gt;
&lt;br /&gt;
In other words, the Player is a term that encompasses both the internal code that defines a player, and the entity in game that interacts with machines/rocks/trees, which is the &#039;&#039;character&#039;&#039;. While this distinction is important for modding and understanding the game&#039;s core, the terms can be used interchangeably for most conversations. For the purpose of this article, &amp;quot;player&amp;quot; will be used.&lt;br /&gt;
&lt;br /&gt;
== World interaction ==&lt;br /&gt;
The player has six primary ways of interacting with the world:&lt;br /&gt;
&lt;br /&gt;
# Crafting items personally from resources using the craft menu (Default open key: E)&lt;br /&gt;
# Placing entities or [[tile]]s by selecting them from the inventory or quickbar (Default: Left Mouse Button)&lt;br /&gt;
## Opening contextual menus for entities like [[Assembling machine|Assembly Machines]] or [[Chests]], using the same button&lt;br /&gt;
## Removing an entity from the world, returning it to your inventory (Default: &#039;&#039;&#039;Hold&#039;&#039;&#039; Right Mouse Button)&lt;br /&gt;
# Harvesting resources from a resource entity (Default: &#039;&#039;&#039;Hold&#039;&#039;&#039; RMB)&lt;br /&gt;
# Picking up non-placed items from the ground and placing them in your inventory (Default: Hold/press F)&lt;br /&gt;
# Firing weapons at [[Military_units_and_buildings|enemies]] (Default: Press or hold Spacebar depending on weapon)&lt;br /&gt;
# Passively with a flashlight that automatically turns on during the night time (which transfers to headlights if the player is in a vehicle.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For more key-bindings, see [[Keyboard bindings]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note: The player can do that only, if his character owns the abilities for this. For example: He cannot fire a weapon, cause he has no weapons-slots.&lt;br /&gt;
&lt;br /&gt;
== Death ==&lt;br /&gt;
When a player is killed, it leaves behind a corpse that lasts 15 minutes and contains all items that were located in the player&#039;s inventory, quickbar, trash slots, and equipment slots. 10 seconds after being killed, the player respawns at the center of the world. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--== Equipment ==&lt;br /&gt;
&lt;br /&gt;
Equipment are items used to speed up entity/resource collection, kill [[enemies]], protect the player&#039;s health, etc. All equipment except for weapons and capsules have durability, and will break after enough uses. Examples of equipment and the equipment inventory are discussed below.&lt;br /&gt;
&lt;br /&gt;
[[File:Equipment slots.png|thumb|right|1: The tool slot for pickaxes. 2: The armor slot. 3: The weapon slots. 4: The ammo slots.]]&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
Removing or harvesting machines, entities, or resources from the world requires effort and this is implemented by way of a progress bar that needs to fill uninterrupted in order to complete and pick up the object. Starting without a pickaxe, it will take around two seconds to cut down a single tree. Since this is the sort of action required thousands of times over the course of a game, &#039;&#039;it is heavily recommended to craft an [[iron axe]] as the first action the player takes in the game&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A full list of all tools in the game:&lt;br /&gt;
&lt;br /&gt;
* [[Iron axe]]&lt;br /&gt;
* [[Steel axe]]&lt;br /&gt;
* [[Repair pack]]&lt;br /&gt;
* [[Discharge defense remote]]&lt;br /&gt;
&lt;br /&gt;
=== Weapons ===&lt;br /&gt;
Eventually, whether in a peaceful game or not, one will need the capability to destroy the various [[Enemies]] that live in the world.&lt;br /&gt;
&lt;br /&gt;
This capability mostly comes in the form of [[Turrets]] for base defense, but for the player there are two broad categories, more traditional weapons and capsules; discussed below. To fire the main equip-able weapons, the weapon must be in one of the weapon slots. (see above)&lt;br /&gt;
&lt;br /&gt;
If all the preparation is done, fire the weapon with the target enemy key (Default: Spacebar) or the target cursor key (Default: C). Target enemy is a &#039;&#039;safe&#039;&#039; auto-aim that will snap to any enemy in range and begin firing at it for as long as the key is held down. A green target reticle will be shown below the enemy when in range, red when not.&lt;br /&gt;
&lt;br /&gt;
Target cursor will fire your weapon in the direction of your cursor, which is mainly used to clear obstacles such as [[Tree]]s and rocks that block placing things. Bear in mind that damage is calculated as a combination of weapon, ammunition and technology together. Target cursor is capable of shooting anything with health, so be careful when near important buildings. In late game, player gunfire can nearly instantly destroy some buildings.&lt;br /&gt;
&lt;br /&gt;
Each player starts with a simple [[Pistol]] and ten magazines of [[Firearm magazine|basic ammo]], which will fend off the first few biter attacks, but will quickly be insufficient against the growing alien forces.&lt;br /&gt;
&lt;br /&gt;
A list of all traditional weapons in the game:&lt;br /&gt;
&lt;br /&gt;
* [[Pistol]]&lt;br /&gt;
* [[Submachine gun]]&lt;br /&gt;
* [[Shotgun]]&lt;br /&gt;
* [[Combat shotgun]]&lt;br /&gt;
* [[Rocket launcher]]&lt;br /&gt;
* [[Flamethrower]]&lt;br /&gt;
&lt;br /&gt;
=== Capsules ===&lt;br /&gt;
Capsules are consumable weapons systems, they are picked up from the inventory and thrown somewhere in the game world to spawn their effect at that position. Early in the game, these take the form of instant effect grenades that detonate upon reaching the location they were thrown to.&lt;br /&gt;
&lt;br /&gt;
A list of all throw-able capsules in the game:&lt;br /&gt;
&lt;br /&gt;
* [[Grenade]]&lt;br /&gt;
* [[Cluster grenade]]&lt;br /&gt;
* [[Poison capsule]]&lt;br /&gt;
* [[Slowdown capsule]]&lt;br /&gt;
&lt;br /&gt;
=== Combat Robot Capsules ===&lt;br /&gt;
With the mid-game comes access to combat robot capsules, which are deployed the exact same way as previous capsules, however they deploy different forms of hovering robots, with various behaviors and types of attacks/movement. The amount of robots that can be out at one time is limited by the [[Follower robot count (research)|Robot follower count research]].&lt;br /&gt;
&lt;br /&gt;
A list of all robot capsules in the game:&lt;br /&gt;
&lt;br /&gt;
* [[Defender capsule]]&lt;br /&gt;
* [[Distractor capsule]]&lt;br /&gt;
* [[Destroyer capsule]]&lt;br /&gt;
&lt;br /&gt;
=== Armor ===&lt;br /&gt;
Once the player has faced the first proper attack, they will quickly come to learn how much damage they can handle, not much at all. Equipping a decent set of armor is therefore a priority. There are two subcategories of armor in the game, however early in the game the player will only have access to simple basic armor.&lt;br /&gt;
&lt;br /&gt;
A list of all armors in the game:&lt;br /&gt;
&lt;br /&gt;
* [[Light armor]]&lt;br /&gt;
* [[Heavy armor]]&lt;br /&gt;
* [[Modular armor]]&lt;br /&gt;
* [[Power armor]]&lt;br /&gt;
* [[Power armor MK2]]&lt;br /&gt;
&lt;br /&gt;
In addition to protection from damage, some advanced armors also give a bonus to inventory size: 10 slots for modular armor, 20 for power armor, and 30 for power armor mk2.&lt;br /&gt;
&lt;br /&gt;
=== Armor Modules ===&lt;br /&gt;
Once the player has crafted any modular armor they gain access to various general purpose enhancements, which can be freely added or removed from any modular armor. While all of them are capable of fitting in even the [[Modular armor]] individually, their usefulness greatly depends on player choice; i.e. there are no specific best modules or best arrangement of modules.&lt;br /&gt;
&lt;br /&gt;
A list of all armor modules in the game:&lt;br /&gt;
&lt;br /&gt;
* [[Exoskeleton]]&lt;br /&gt;
* [[Battery MK1]]&lt;br /&gt;
* [[Battery MK2]]&lt;br /&gt;
* [[Portable solar panel]]&lt;br /&gt;
* [[Portable fusion reactor]]&lt;br /&gt;
* [[Energy shield]]&lt;br /&gt;
* [[Energy shield MK2]]&lt;br /&gt;
* [[Night vision]]&lt;br /&gt;
* [[Personal laser defense]]&lt;br /&gt;
* [[Discharge defense]]--&amp;gt;&lt;br /&gt;
== Quickbar and shortcut bar ==&lt;br /&gt;
{{Main|Quickbar}}&lt;br /&gt;
The quickbar is a user interface component for creating links to items that are always visible at the bottom of the screen. Once created they can be quickly selected at any time without needing to open the inventory. It shows between one and four bars from a set of ten available, each containing 10 slots. Clicking any filled slot will place the chosen item in the player&#039;s hand if available in the inventory.&lt;br /&gt;
&lt;br /&gt;
{{Main|Shortcut bar}}&lt;br /&gt;
The shortcut bar is a group of icons for accessing regularly used features such as obtaining [[blueprint]]s and [[deconstruction planner]]s with a simple mouse click. It is always visible at the bottom of the screen, appearing to the right of the quickbar. The icons can be hidden and their order can be changed. A maximum of 12 icons can be visible at one time.&lt;br /&gt;
&lt;br /&gt;
[[File:Quickbar and shortcut bar.png]]&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=120px&amp;gt;&lt;br /&gt;
File:playerportrait.png|Portrait of the player character; seen when selecting the &amp;quot;First steps&amp;quot; campaign.&lt;br /&gt;
File:All_armor.png|The player character in every type of armor.&lt;br /&gt;
File:Multicolor_all.png|Different possible colors of players, cars, tanks, gun turrets and laser turrets. &amp;lt;small&amp;gt;(Pre 0.17)&amp;lt;/small&amp;gt;&lt;br /&gt;
File:Playerflashlight.png|The player character&#039;s flashlight during the night.&lt;br /&gt;
File:dead_player.png|The player&#039;s corpse.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.14|&lt;br /&gt;
* Surplus items from crafting are again available for crafting other items. For example, crafting two green circuits will no longer result in two extra copper wires in the player&#039;s inventory. This only applies to items that are automatically crafted as a prerequisite; items the player has explicitly requested to craft will not be used to satisfy the dependencies of any further orders.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Armors have inventory size bonuses (10 for modular armor, 20 for power armor, 30 for power armor mk2).}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.1|&lt;br /&gt;
* Changed fast inventory transfer from the main player inventory so ctrl+clicking empty slots doesn&#039;t move items to the logistic trash slots.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* New muzzle flash graphics.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.4|&lt;br /&gt;
* Improved player running animation.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.0|&lt;br /&gt;
* New player animation, depends on armor}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.9|&lt;br /&gt;
* Mining a chest now fails instead of spilling items onto the ground.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.9.0|&lt;br /&gt;
* Player gets a separate warning icon when a building is destroyed.&lt;br /&gt;
* Recipe gui contains recipes not craftable by player (however, their tooltip shows machines where they can be crafted).}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.0|&lt;br /&gt;
* Player now starts with 1 [[burner mining drill]] and one [[stone furnace]] in the freeplay.&lt;br /&gt;
* The player can repair structures using [[repair pack]]s.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.7.0|&lt;br /&gt;
* Player moves slower while shooting.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.6.0|&lt;br /&gt;
* Added the ability for the player to request items directly from logistic robots.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.5.0|&lt;br /&gt;
*Player picks all items in range when picking items on the ground, instead of 1 per tick&lt;br /&gt;
* Shooting particles added}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.4.0|&lt;br /&gt;
* Player slides around corners}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.8|&lt;br /&gt;
* Player no longer collides with [[Underground belt]].&lt;br /&gt;
* Added auto-targeting for guns.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.1|&lt;br /&gt;
* Added warning message when the player tries to build in an invalid position.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.2.0|&lt;br /&gt;
* Screen reddens when taking damage&lt;br /&gt;
* Character animations added}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Armor]]&lt;br /&gt;
* [[Weapons]]&lt;br /&gt;
* [[Multiplayer]]&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Artillery_wagon&amp;diff=177067</id>
		<title>Artillery wagon</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Artillery_wagon&amp;diff=177067"/>
		<updated>2019-12-11T14:28:15Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add link to military building article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{:Infobox:Artillery wagon}}&lt;br /&gt;
The &#039;&#039;&#039;artillery wagon&#039;&#039;&#039; is an end-game wagon added in game version 0.16 mounting a [https://en.wikipedia.org/wiki/Railway_gun rail cannon] that can be added to a train. It fires [[artillery shell]]s, relatively slow-moving projectiles that explore chunks of terrain they travel across. The wagon gun has both automatic and manual (even longer-ranged) firing modes. Projectiles have sufficient damage to destroy spawners and any type of worm with a single hit, and have a modest area of effect. Infinitely-stacking research upgrades are available for range and firing speed, but not damage.&lt;br /&gt;
&lt;br /&gt;
The [[artillery turret]] is essentially the same weapon, but deployed as a static structure like other turrets.&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
Artillery wagons have a massive range, outranging fixed fortifications by a factor of 10 or more. In automatic mode, when the train is stopped, the artillery wagon will automatically scan for [[Military_units_and_buildings|enemy buildings]] (spawners and worms) and shoot at them. Automatic mode cannot target mobile units (biters and spitters); shells do, however, damage mobile units in the vicinity of impact normally.&lt;br /&gt;
&lt;br /&gt;
In manual mode, a [[Artillery targeting remote|special item]] is used to point-and-click anywhere in the world, map, or zoomed-in map; each click corresponds to one shell delivered to that location, so long as any working artillery turrets and / or wagons are in range. Targeting remotes show the number of fire-ready (loaded and, for wagons, stationary) artillery pieces in range of cursor position when held. Manual fire can be ordered on unexplored areas; shells will explore all chunks they travel across (but no surrounding chunks).&lt;br /&gt;
&lt;br /&gt;
Range in automatic mode is 224 tiles (7 chunks); in manual mode, 560 tiles (17.5 chunks). Infinite [[Artillery shell range (research)|research]] is available to increase range, at +30% of base range per level, applied to both automatic and manual range.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
Aside from the considerable expense of research and assembly for both wagons and shells, there are certain considerations that make these wagons unwise as a full replacement for traditional base defenses, despite their phenomenal range and the advantage of mobility.&lt;br /&gt;
&lt;br /&gt;
Artillery shelling will antagonize enemy mobile units in the vicinity of the impact into rushing the wagon&#039;s location at time of firing, regardless of their normal &amp;quot;aggro radius&amp;quot;. Artillery wagons are relatively slow-firing, although infinite [[Artillery shell shooting speed (research)|research]] is available to improve firing speed, at +100% per level, affecting both wagons and stationary turrets and applying to both automatic and manual mode. They also cannot target mobile units in automatic mode. Importantly, artillery has a &#039;&#039;minimum&#039;&#039; range as well, which is 32 tiles.&lt;br /&gt;
&lt;br /&gt;
Together, these limitations mean that an artillery wagon needs to be defended, or else moved around rapidly, in the latter case decreasing its value as base defense. For defense, any conventional approach such as walls, gun, laser, and / or flamethrower turrets, or the personal intervention of the player will do. However, players should keep in mind that extensive shelling of large biter-infested areas will produce massive attack waves centered on the position of the artillery piece at time of firing, and should plan close-range defenses accordingly.&lt;br /&gt;
&lt;br /&gt;
Logistic considerations are also important, as artillery shells have a stack size of 1, meaning any-size container can only hold a modest supply and an inserter will only ever move a single shell at a time. Players may wish to consider assembling near artillery wagon stops if practical. The wagon itself can hold a supply of 100 shells (while artillery turrets only hold 15), providing a portable magazine of some size that can be towed around with the weapon without external storage.&lt;br /&gt;
&lt;br /&gt;
== Train properties ==&lt;br /&gt;
The artillery wagon can fire while stopped at a train stop, but &#039;&#039;&#039;not&#039;&#039;&#039; when stopped at a red signal or when moving. When a train with an artillery wagon is stopped at a train stop, aiming and shooting counts as activity for the purposes of &amp;quot;X seconds of inactivity&amp;quot; departure conditions in the train&#039;s schedule. This includes the time that the wagon spends scanning the area around it to find enemies, which is done at 1 chunk per tick. Only when it has scanned all chunks and did not find an enemy it will count as inactive.&lt;br /&gt;
&lt;br /&gt;
When part of a manual-mode (player-driven) train, artillery wagons will fire whenever the train is stopped, regardless of where it was stopped.&lt;br /&gt;
&lt;br /&gt;
Artillery wagons weigh as much as 4 [[Cargo wagon|regular wagons]] (or 2 [[locomotive]]s) for the purposes of train acceleration calculations. Fortunately, [[nuclear fuel]] provides a massive 250% boost to acceleration (compared to 180% for rocket fuel, the next best type), making it an attractive fuel for artillery trains.&lt;br /&gt;
&lt;br /&gt;
== Logistics ==&lt;br /&gt;
In addition to firing them, artillery wagons can be used to transport shells from place to place. Inserters will both load and unload artillery wagons in the same manner as they would any other wagon, with the obvious difference that artillery wagons can only take artillery shells as cargo. However, each artillery wagon can hold 100 shells, while a regular cargo wagon only holds 40.&lt;br /&gt;
&lt;br /&gt;
Thus, artillery wagons are the most space-efficient method of transporting artillery shells by rail. They are not, however, the most mass-efficient one, as an artillery wagon weighs 4 times as much as a regular wagon, but holds only 2.5 times as many shells. Thus, if train length is not a concern but acceleration and / or fuel efficiency is, regular wagons are superior for transporting shells.&lt;br /&gt;
&lt;br /&gt;
Furthermore, players need to keep in mind that an artillery wagon&#039;s auto-fire behavior cannot be turned off in any way, and wagons will auto-fire whenever the usual conditions (see above) are met. In cleared, defended areas, however, they can reliably function as shell transport wagons.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Railway_gun Large rail-transported cannon] were built in the late 19th and early 20th century, up until and including World War II. The larger models were heavy and very slow firing and took many hours to set up, but had a greater range and power per shot than any other weapon in existence at the time (considerably greater than battleship-size naval guns, for example). The advent of rocketry, as well as large bomber planes capable of deploying multi-ton bombs, eventually made these guns obsolete.&lt;br /&gt;
** Perhaps the best-known examples were the [https://en.wikipedia.org/wiki/Big_Bertha_(howitzer) &#039;&#039;Dicke Bertha&#039;&#039;] (Big Bertha, literally &amp;quot;Fat Bertha&amp;quot;) and the [https://en.wikipedia.org/wiki/Schwerer_Gustav &#039;&#039;Schwerer Gustav&#039;&#039;] (Heavy Gustav), the largest gun ever fired.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.16.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.factorio.com/blog/post/fff-220 Friday Facts #220 - The best Friday Facts ever]&lt;br /&gt;
* [[Artillery turret]]&lt;br /&gt;
* [[Artillery shell]]&lt;br /&gt;
* [[Artillery targeting remote]]&lt;br /&gt;
* [[Locomotive]]&lt;br /&gt;
* [[Railway]]&lt;br /&gt;
&lt;br /&gt;
{{LogisticsNav}}&lt;br /&gt;
{{C|Transport}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Artillery_turret&amp;diff=177066</id>
		<title>Artillery turret</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Artillery_turret&amp;diff=177066"/>
		<updated>2019-12-11T14:26:25Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{:Infobox:Artillery turret}}&lt;br /&gt;
The artillery turret is a super-long-range static defense structure added in game version 0.16. It fires [[Artillery shell|artillery shells]], relatively slow-moving projectiles that explore chunks of terrain they travel across. The turret has both automatic and manual (even longer-ranged) firing modes. Projectiles have sufficient damage to destroy spawners and any type of worm with a single hit, and have a modest area of effect. Infinitely-stacking research upgrades are available for range and firing speed, but not damage.&lt;br /&gt;
&lt;br /&gt;
The [[Artillery wagon|artillery wagon]] is essentially the same weapon, only mounted on a train car and therefore mobile.&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
Artillery turrets have a massive range, outranging other fixed fortifications by a factor of 10 or more. There are no special limits on how many may be built or where and, being ammunition-based, these turrets do not require electric power to operate.&lt;br /&gt;
&lt;br /&gt;
In automatic mode, they function much the same as other turrets, automatically scanning for valid targets within range and firing on them. Automatic mode can only target [[Military_units_and_buildings|enemy buildings]] (spawners and worms), not mobile units (biters and spitters); shells do, however, damage mobile units in the vicinity of impact normally.&lt;br /&gt;
&lt;br /&gt;
In manual mode, an [[Artillery targeting remote]] is used to point-and-click anywhere in the world, map, or zoomed-in map; each click corresponds to one shell delivered to that location, so long as any working artillery turrets and / or wagons are in range. Targeting remotes show the number of fire-ready (loaded and, for wagons, stationary) artillery pieces in range of cursor position when held. Manual fire can be ordered on unexplored areas; shells will explore all chunks they travel across (but no surrounding chunks).&lt;br /&gt;
&lt;br /&gt;
Range in automatic mode is 224 tiles (7 chunks); in manual mode, 560 tiles (17.5 chunks). Infinite [[Artillery shell range (research)|research]] is available to increase range, at +30% of base range per level, applied to both automatic and manual range.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
Aside from the considerable expense of research and assembly for both turrets and shells, there are certain considerations that make a base defense based purely on these turrets unwise, despite their phenomenal range.&lt;br /&gt;
&lt;br /&gt;
Artillery shelling will antagonize enemy mobile units in the vicinity of the impact into rushing the turret emplacement, regardless of their normal &amp;quot;aggro radius&amp;quot;. Artillery turrets are relatively slow-firing, although infinite [[Artillery shell shooting speed (research)|research]] is available to improve firing speed, at +100% per level, affecting both stationary turrets and wagons and applying to both automatic and manual mode. They also cannot target mobile units in automatic mode. Importantly, artillery has a &#039;&#039;minimum&#039;&#039; range as well, which is 32 tiles.&lt;br /&gt;
&lt;br /&gt;
Together, these limitations mean that an artillery turret needs to be defended by other means. Any conventional approach such as walls, gun, laser, and / or flamethrower turrets, or the personal intervention of the player will do. However, players should keep in mind that extensive shelling of large biter-infested areas will produce massive attack waves centered on the position of the artillery piece at time of firing, and should plan close-range defenses accordingly.&lt;br /&gt;
&lt;br /&gt;
Logistic considerations are also important, as artillery shells have a stack size of 1, meaning any-size container can only hold a modest supply and an inserter will only ever move a single shell at a time. Players may wish to consider on-site assembly for permanent and semi-permanent emplacements. The turret itself can hold 15 shells, and the wagon version can hold a full 100, providing a buffer of some size in the event supply is interrupted.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.16.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Artillery wagon]]&lt;br /&gt;
* [[Artillery shell]]&lt;br /&gt;
* [[Artillery targeting remote]]&lt;br /&gt;
&lt;br /&gt;
{{CombatNav}}&lt;br /&gt;
{{C|Defense}}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177065</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177065"/>
		<updated>2019-12-11T14:19:08Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Military units */ Added worms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and buildings are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military buildings&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military buildings, but not units, will also be attacked by:&lt;br /&gt;
* [[Artillery turret]]&lt;br /&gt;
* [[Artillery wagon]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and buildings are identified by a hard coded flag on certain prototypes (and their children). This cannot be changed by [[modding]]. The military prototypes are listed in the tables below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| Player&lt;br /&gt;
| [[Prototype/Character|Character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| Defender capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| Distractor capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| Destroyer capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| Construction robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| Logistic robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| Land mine&lt;br /&gt;
| [[Prototype/LandMine|LandMine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| Small biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| Small spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| Medium biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| Medium spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| Big Biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| Big spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| Behemoth biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| Behemoth spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military buildings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|ArtilleryTurret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|Radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small_worm.png|center|50px]]&lt;br /&gt;
| Small worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium_worm.png|center|50px]]&lt;br /&gt;
| Medium worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big_worm.png|center|50px]]&lt;br /&gt;
| Big worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth_worm.png|center|50px]]&lt;br /&gt;
| Behemoth worm&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|PlayerPort]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177064</id>
		<title>Military units and structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Military_units_and_structures&amp;diff=177064"/>
		<updated>2019-12-11T14:04:47Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: Add TOC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Some units and buildings are marked as &#039;&#039;&#039;Military units&#039;&#039;&#039; or &#039;&#039;&#039;Military buildings&#039;&#039;&#039; and are high priority targets for enemy forces. They will be attacked on sight by:&lt;br /&gt;
&lt;br /&gt;
* [[Enemies#Biters|Biters]], [[Enemies#Spitters|spitters]], and [[Enemies#Worms|worms]].&lt;br /&gt;
* [[Gun_turret|Turrets]], [[combat robots]], and [[personal laser defense]].&lt;br /&gt;
* The [[player]], when holding down &amp;quot;shoot enemy&amp;quot; (spacebar).&lt;br /&gt;
&lt;br /&gt;
Military buildings, but not units, will also be attacked by:&lt;br /&gt;
* [[Artillery turret]]&lt;br /&gt;
* [[Artillery wagon]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Modding ==&lt;br /&gt;
Military units and buildings are identified by a hard coded flag on certain prototypes (and their children). This cannot be changed by [[modding]]. The military prototypes are listed in the tables below.&lt;br /&gt;
&lt;br /&gt;
== Military units ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Player.png|center]]&lt;br /&gt;
| Player&lt;br /&gt;
| [[Prototype/Character|Character]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Defender_capsule.png|center]]&lt;br /&gt;
| Defender capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Distractor_capsule.png|center]]&lt;br /&gt;
| Distractor capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Destroyer_capsule.png|center]]&lt;br /&gt;
| Destroyer capsule&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Construction_robot.png|center]]&lt;br /&gt;
| Construction robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Logistic_robot.png|center]]&lt;br /&gt;
| Logistic robot&lt;br /&gt;
| [[Prototype/FlyingRobot|FlyingRobot]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Land_mine.png|center]]&lt;br /&gt;
| Land mine&lt;br /&gt;
| [[Prototype/LandMine|LandMine]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center|64px]]&lt;br /&gt;
| Small biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center|72px]]&lt;br /&gt;
| Small spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center|64px]]&lt;br /&gt;
| Medium biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center|72px]]&lt;br /&gt;
| Medium spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center|64px]]&lt;br /&gt;
| Big Biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center|72px]]&lt;br /&gt;
| Big spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|64px]]&lt;br /&gt;
| Behemoth biter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center|72px]]&lt;br /&gt;
| Behemoth spitter&lt;br /&gt;
| [[Prototype/Unit|Unit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Military buildings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Prototype&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Gun_turret.png|center]]&lt;br /&gt;
| Gun turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Flamethrower_turret.png|center]]&lt;br /&gt;
| Flamethrower turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Laser_turret.png|center]]&lt;br /&gt;
| Laser turret&lt;br /&gt;
| [[Prototype/Turret|Turret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Artillery_turret.png|center]]&lt;br /&gt;
| Artillery turret&lt;br /&gt;
| [[Prototype/ArtilleryTurret|ArtilleryTurret]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Radar.png|center]]&lt;br /&gt;
| Radar&lt;br /&gt;
| [[Prototype/Radar|Radar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter_nest.png|center|50px]]&lt;br /&gt;
| Biter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter_nest.png|center|50px]]&lt;br /&gt;
| Spitter spawner&lt;br /&gt;
| [[Prototype/EnemySpawner|EnemySpawner]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Player port&lt;br /&gt;
| [[Prototype/PlayerPort|PlayerPort]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| SimpleEntityWithForce&lt;br /&gt;
| [[Prototype/SimpleEntityWithForce|SimpleEntityWithForce]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Enemies&amp;diff=177063</id>
		<title>Enemies</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Enemies&amp;diff=177063"/>
		<updated>2019-12-11T13:51:44Z</updated>

		<summary type="html">&lt;p&gt;DaveMcW: /* Defense */ Add link to military building article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&#039;&#039;&#039;Enemies&#039;&#039;&#039; (also commonly called &#039;&#039;&#039;biters&#039;&#039;&#039;) are creatures that want to harm the [[player]]. They are the native inhabitants of the extraterrestrial world in the form of arthropods living in organic nests, coexisting with each other peacefully. They are encountered in three species: Biters, spitters and worms. The species are further distinguished in four stages of growth, and thus strength. Enemies and nests show up on the map as red dots. Much like the player, enemies can slowly regain lost health.&lt;br /&gt;
&lt;br /&gt;
== Achievements ==&lt;br /&gt;
Enemies are directly connected to the following achievements:&lt;br /&gt;
{{Achievement|it-stinks-and-they-dont-like-it}}&lt;br /&gt;
{{Achievement|steamrolled}}&lt;br /&gt;
&lt;br /&gt;
==Creatures==&lt;br /&gt;
===Biters===&lt;br /&gt;
Biters are one of two main antagonists in the game. They come in four sizes: small, medium, big and behemoth. In the beginning of a game, there will only be the small ones. With increasing [[pollution]], they will become bigger, related to the enemy&#039;s [[#Evolution|evolution]]. As common sense may suggest, their method of attack is a straightforward charge to &amp;quot;bite&amp;quot; things.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Info&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_biter.png|center]] || Small Biter&lt;br /&gt;
| Weakest of biters, can be easily killed with a pistol.&lt;br /&gt;
* Health: 15&lt;br /&gt;
* Damage: 7 Physical&lt;br /&gt;
* Attack speed: 1.71/s&lt;br /&gt;
* Speed: 43.2km/h &lt;br /&gt;
* Range: 1&lt;br /&gt;
* Pollution to join attack: 4&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_biter.png|center]] || Medium Biter&lt;br /&gt;
| Stronger and slightly faster than the small biter. Can pose a problem for and even kill weaker players.&lt;br /&gt;
* Health: 75&lt;br /&gt;
* Damage: 15 Physical&lt;br /&gt;
* Attack speed: 1.71/s&lt;br /&gt;
* Speed: 51.8km/h&lt;br /&gt;
* Range: 1&lt;br /&gt;
* Pollution to join attack: 20&lt;br /&gt;
&lt;br /&gt;
[[Damage#Resistance|Resistances]]:&lt;br /&gt;
*Explosion: 0/10%&lt;br /&gt;
*Physical: 4/10%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_biter.png|center]] || Big Biter&lt;br /&gt;
| Dangerous, resistant to small arms. Can attack through walls, hitting objects directly behind them.&lt;br /&gt;
* Health: 375&lt;br /&gt;
* Damage: 30 Physical&lt;br /&gt;
* Attack speed: 1.71/s&lt;br /&gt;
* Speed: 49.7km/h&lt;br /&gt;
* Range: 2&lt;br /&gt;
* Pollution to join attack: 80&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 0/10%&lt;br /&gt;
*Physical: 8/10%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_biter.png|center]] || Behemoth Biter&lt;br /&gt;
| Extremely durable and nearly immune to small arms, except for the strongest ordnance. Can attack through walls, hitting objects directly behind them.&lt;br /&gt;
* Health: 3000&lt;br /&gt;
* Damage: 90 Physical&lt;br /&gt;
* Attack speed: 1.2/s&lt;br /&gt;
* Speed: 64.8km/h&lt;br /&gt;
* Range: 2&lt;br /&gt;
* Pollution to join attack: 400&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 12/10%&lt;br /&gt;
*Physical: 12/10%&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Spitters===&lt;br /&gt;
&#039;&#039;&#039;Spitters&#039;&#039;&#039; are much like [[Enemies#Biters|biters]] and only appear slightly later on in the game as the evolution factor increases. Their main difference from biters is their ranged attack. Using predictive aiming, they spit a stream of acid at enemies which leaves behind a puddle of acid where it hits the ground. Due to the spitters&#039; predictive aiming, the acid stream can be dodged by suddenly changing walking directions or standing still.[https://factorio.com/blog/post/fff-279] Both the stream and the puddle of acid deal damage of time and slow down players and vehicles. Most entities of the game have a much lower resistance to acid than other damage types (including [[turret]]s and [[armor]]), so spitters are effectively more potent against the player and his factories. Their behaviour and size classification are the same as with biters, but their health is universally lower and they are resistant exclusively against explosives, with no physical resistance.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Info&lt;br /&gt;
|-&lt;br /&gt;
| [[File:small_spitter.png|center]] || Small Spitter&lt;br /&gt;
| Weakest of spitters. Easy to kill with any weapon, but attacks at range.&lt;br /&gt;
* Health: 10&lt;br /&gt;
* Damage: 12 Acid&lt;br /&gt;
* Attack speed: 0.6/s&lt;br /&gt;
* Area of effect size: 1&lt;br /&gt;
* Speed: 40.0km/h&lt;br /&gt;
* Range: 13&lt;br /&gt;
* Pollution to join attack: 4&lt;br /&gt;
|-&lt;br /&gt;
| [[File:medium_spitter.png|center]] || Medium Spitter&lt;br /&gt;
| Stronger and slower than the smaller version. Can pose a problem for and even kill weaker players.&lt;br /&gt;
* Health: 50&lt;br /&gt;
* Damage: 24 Acid&lt;br /&gt;
* Attack speed: 0.6 /s&lt;br /&gt;
* Area of effect size: 1.25&lt;br /&gt;
* Speed: 35.6km/h&lt;br /&gt;
* Range: 14&lt;br /&gt;
* Pollution to join attack: 12&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 0/10%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:big_spitter.png|center]] || Big Spitter&lt;br /&gt;
| An even bulkier spitter and so can take more damage.&lt;br /&gt;
* Health: 200&lt;br /&gt;
* Damage: 36 Acid&lt;br /&gt;
* Attack speed: 0.6/s&lt;br /&gt;
* Area of effect size: 1.35&lt;br /&gt;
* Speed: 32.4km/h&lt;br /&gt;
* Range: 15&lt;br /&gt;
* Pollution to join attack: 30&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 0/15%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:behemoth_spitter.png|center]] || Behemoth Spitter&lt;br /&gt;
| The bulkiest of the spitters and so can take even more damage.&lt;br /&gt;
* Health: 1500&lt;br /&gt;
* Damage: 60 Acid&lt;br /&gt;
* Attack speed: 0.6/s&lt;br /&gt;
* Area of effect size: 1.75&lt;br /&gt;
* Speed: 32.4km/h&lt;br /&gt;
* Range: 16&lt;br /&gt;
* Pollution to join attack: 200&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 0/30%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Worms===&lt;br /&gt;
&lt;br /&gt;
The Worms are natural allies of biters and spitters and will attack the player if they get close enough with an attack similar to spitters&#039;. They act like static [[turret]]s and will not follow attackers. They rely on high damage, great range and splash damage to keep the player away from the worms and the nests they protect, but either one of these advantages can be overcome. Unlike other enemies, they are also highly resistant to fire. They will spit acid at the player, which can also leave acidic puddles on the ground that can still damage players and vehicles, as well as slow them both down and leave a brief acidic, damaging effect for a few seconds. However, placed buildings and tiles are unaffected by the acid puddles, but still take damage normally by the acid projectile.&lt;br /&gt;
&lt;br /&gt;
Worms come in 4 sizes, their power increasing with size. Like biters and spitters, behemoth, big and medium worms spawning is influenced by the evolution factor. Worms are only created during enemy expansion when a certain evolution factor requirement is fulfilled. This is 0.3 for the medium worm, 0.5 for the big worm and 0.9 for the behemoth worm. Below these evolution factors, worms can only be created by the map generation. In map generation, the game restricts higher tier worms behind the distance from the starting point. The further away the player goes from the starting area, the stronger the worms become.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small worm.png|center]] || Small Worm&lt;br /&gt;
| A weak worm. It is still capable of killing the player unless it is targeted as priority.&lt;br /&gt;
* Health: 200&lt;br /&gt;
* Damage: 36 Acid&lt;br /&gt;
* Attack speed: 15/s&lt;br /&gt;
* Area of effect size: 1.4&lt;br /&gt;
* Range: 25&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium worm.png|center]] || Medium Worm&lt;br /&gt;
| Medium worms are dangerous to even more advanced players. They should be handled with care.&lt;br /&gt;
* Health: 400&lt;br /&gt;
* Damage: 48 Acid&lt;br /&gt;
* Attack speed: 15/s&lt;br /&gt;
* Area of effect size: 1.55&lt;br /&gt;
* Range: 30&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 5/15%&lt;br /&gt;
*Fire: 2/50%&lt;br /&gt;
*Physical: 5/0%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big worm.png|center]] || Big Worm&lt;br /&gt;
| Big worms are not as much more dangerous as resilient. They are almost immune to common gunfire of any sort.&lt;br /&gt;
* Health: 750&lt;br /&gt;
* Damage: 72 Acid&lt;br /&gt;
* Attack speed: 15/s&lt;br /&gt;
* Area of effect size: 1.75&lt;br /&gt;
* Range: 38&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 10/30%&lt;br /&gt;
*Fire: 3/70%&lt;br /&gt;
*Physical: 10/0%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth worm.png|center]] || Behemoth Worm&lt;br /&gt;
| Behemoth worms are the most dangerous of worms. They are just as resilient as Big worms, with much greater range.&lt;br /&gt;
* Health: 750&lt;br /&gt;
* Damage: 96 Acid&lt;br /&gt;
* Attack speed: 15/s&lt;br /&gt;
* Area of effect size: 2&lt;br /&gt;
* Range: 48&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Acid: 0/100%&lt;br /&gt;
*Explosion: 10/30%&lt;br /&gt;
*Fire: 3/70%&lt;br /&gt;
*Physical: 10/0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:worm.gif]] || A worm&#039;s attack animation.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Nests==&lt;br /&gt;
&lt;br /&gt;
The spawn points of biters and spitters. While nests themselves are generally defenseless, the enemies they release over time effectively serve as a form of guards to distract the player and any nearby turrets, and are often accompanied by worms. Nests exposed to pollution will use it to send enemies to join attacks. Enemies not engaged in combat may seek out the nearest nest for protection.&lt;br /&gt;
&lt;br /&gt;
The nests are highly resistant to fire and otherwise generally more resilient than a medium worm.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:biter_nest.png]] || Biter&#039;s nest&lt;br /&gt;
|&lt;br /&gt;
* Health: 350&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 5/15%&lt;br /&gt;
*Fire: 3/60%&lt;br /&gt;
*Physical: 2/15%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:spitter_nest.png]] || Spitter&#039;s nest&lt;br /&gt;
|&lt;br /&gt;
* Health: 350&lt;br /&gt;
&lt;br /&gt;
Resistances:&lt;br /&gt;
*Explosion: 5/15%&lt;br /&gt;
*Fire: 3/60%&lt;br /&gt;
*Physical: 2/15%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Expansions ===&lt;br /&gt;
Every 4-60 minutes, a group of 5-20 biters/spitters will leave their base to create a new base which will consist of as many worms/nests as there are members in the group. This group will search for a suitable spot that&#039;s 3-7 chunks away from existing bases. The interval between enemy expansions is global, and the higher enemy evolution, the shorter the interval is on average. Furthermore, with higher evolution, the groups are bigger on average.&lt;br /&gt;
&lt;br /&gt;
Once they have found a suitable spot, each biter/spitter in the group dies and forms a new nest or worm. There is a delay between each member sacrificing itself for to create a worm/nest, so creating the new base from the expansion group can take quite a long time, depending on the group size. Medium worms are only formed if the current evolution is higher than 0.3, big worms only if the current evolution is higher than 0.5 and behemoth worms are only formed if current evolution is higher than 0.9. The game randomly chooses whether to form a new biter nest, spitter nest, small worm, or bigger worm if the evolution factor is high enough. [https://gist.github.com/Bilka2/aa88490c23124a6f214c02c73a368aa7]&lt;br /&gt;
&lt;br /&gt;
==Defense==&lt;br /&gt;
Nests spawn biters and spitters &amp;quot;for free&amp;quot;. However, biters and spitters will only aggressively engage the player&#039;s factory if the pollution cloud of the factory reaches a nest because pollution is consumed to send biters or spitters to join the next attack. Every 1 to 10 minutes (random) the mustered biters launch an attack. If not all biters have arrived at the rendezvous point by that time, they will wait up to an additional 2 minutes for stragglers. The attack then proceeds to their target over the shortest path possible, accounting for terrain, but not for player entities that could pose an obstacle (like [[wall]]s).&lt;br /&gt;
&lt;br /&gt;
If there is a clear path somewhere around those obstacles, the biters will attempt to go around. If there is no clear passage or a clear passage would mean deviating too far from the original course, the biters will attack whatever is in their way to go through. This can be exploited to an extent; creating mazes at regular intervals along a barrier can direct the biters through a gauntlet not dissimilar to tower defense.&lt;br /&gt;
&lt;br /&gt;
However, if a biter comes in proximity of a [[Military_units_and_buildings|military unit or building]], it will prioritize these and attempt to immediately attack them instead, again trying to reach the new target over the shortest possible path with no too great detours, if possible.&lt;br /&gt;
&lt;br /&gt;
==Evolution==&lt;br /&gt;
[[File:Evolution Biters.png|thumb|right|400px|Spawn chances of biters from biter spawners by evolution factor.]]&lt;br /&gt;
[[File:Evolution Spitters.png|thumb|right|400px|Spawn chances of spitters from spitter spawners by evolution factor.]]&lt;br /&gt;
[[File:Evolution Weights.png|thumb|right|400px|Weight graph of both spawners by evolution factor. The values shown are primarily for indicating when certain types start and stop spawning, for actual chances refer to the tables or other charts.]]&lt;br /&gt;
The evolution factor is a global variable that determines what kind of biters will be spawned. You can check the variable in the dev console via the following command (does not disable achievements):&lt;br /&gt;
&lt;br /&gt;
  /evolution&lt;br /&gt;
&lt;br /&gt;
The evolution factor goes from 0 (not evolved at all) to 1 (maximal evolution). At the moment the evolution factor can only increase.&lt;br /&gt;
&lt;br /&gt;
Besides choosing what kind of biter will be spawned, the evolution factor also influences the spawning interval. This interval (&amp;lt;code&amp;gt;spawning_cooldown&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;enemy-spawner&amp;lt;/code&amp;gt; definition) is interpolated between 360 (0 evolution) and 150 (1 evolution) game ticks (= 6 to 2.5 seconds).&lt;br /&gt;
&lt;br /&gt;
=== Methods of increasing ===&lt;br /&gt;
&lt;br /&gt;
The evolution factor is increased by three kinds of events:&lt;br /&gt;
&lt;br /&gt;
* The passage of time very slightly increases the evolution factor.&lt;br /&gt;
* The global [[Pollution|pollution production]] increases the evolution factor.&lt;br /&gt;
* Destroying [[Enemies#Nests|nests]] significantly increases the evolution factor.&lt;br /&gt;
&lt;br /&gt;
All these values are set in &amp;lt;code&amp;gt;game.map_settings.enemy_evolution&amp;lt;/code&amp;gt;. From there they can be changed or modded.&lt;br /&gt;
&lt;br /&gt;
The default settings are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Source per&lt;br /&gt;
!Variable in &amp;lt;code&amp;gt;enemy_evolution&amp;lt;/code&amp;gt;&lt;br /&gt;
!Percent increase&lt;br /&gt;
|-&lt;br /&gt;
| [[Time#Seconds|Second]] || &amp;lt;code&amp;gt;time_factor&amp;lt;/code&amp;gt; || 0.0004%&lt;br /&gt;
|-&lt;br /&gt;
| 1 Pollution unit || &amp;lt;code&amp;gt;pollution_factor&amp;lt;/code&amp;gt; || 0.00009% &lt;br /&gt;
|-&lt;br /&gt;
| Destroyed enemy spawner || &amp;lt;code&amp;gt;destroy_factor&amp;lt;/code&amp;gt; || 0.2%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Pollution production is the total pollution produced by [[Pollution#Polluters|buildings]] per tick, not the pollution spreading on the map, so it is not reduced by trees or other absorbers.&lt;br /&gt;
e.g. : 10 boilers produce 300 pollution in one minute, raising the evolution factor by around 0.027%.&lt;br /&gt;
&lt;br /&gt;
The percentages are applied on the base of &amp;lt;code&amp;gt;1 - current_evolution_factor&amp;lt;/code&amp;gt;. So for instance destroying enemy spawners in the beginning of the game results in increase of evolution factor by 0.005 (half a percent) while doing this when the evolution factor is 0.5 the increase is only 0.0025 (quarter a percent).&lt;br /&gt;
&lt;br /&gt;
This also means that the evolution factor approaches 1 asymptotically - generally, increases past 0.9 or so are &#039;&#039;very&#039;&#039; slow and the number never actually reaches 1.0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn chances by evolution factor ===&lt;br /&gt;
&lt;br /&gt;
The probability charts show the chances of each type of biter/spitter for each spawner at all evolution levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;evoChecker&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced: Evolution factor components and computation ===&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:calc(100%-400px); overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
This section has charts plotting the individual evolution factor components and discusses possibilities for manually estimating the evolution factor.&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Evolution_factor_by_time.png|400px|thumb|right|1. Single-component evolution factor increase with time]]&lt;br /&gt;
[[File:Evolution_factor_by_pollution.png|400px|thumb|right|2. Single-component evolution factor increase with pollution]]&lt;br /&gt;
[[File:Evolution_factor_by_spawners.png|400px|thumb|right|3. Single-component evolution factor increase with destroyed spawners]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Data from version 0.16.51.&lt;br /&gt;
&lt;br /&gt;
* All charts end at approximately an evolution factor of 0.99.&lt;br /&gt;
&lt;br /&gt;
*To simplify calculation, the time and pollution charts are calculated using steps of 1,000 seconds / 1,000,000 pollution units - in both cases 1,000 times larger than the unit the game uses for the calculation. Because of the recursive nature of the calculation, this makes the values in the charts somewhat &#039;&#039;&#039;higher&#039;&#039;&#039; than those the game would obtain in the same calculation; however, the difference is fairly minimal (less than 1 percentage point). The spawners chart is calculated 1-to-1 and therefore accurate.&lt;br /&gt;
&lt;br /&gt;
*While time passed is shown on save files and spawners destroyed can be retrieved from player statistics, the game does not currently report the total pollution released by the player. Also, none of the well-known Factorio calculators show pollution generated by a particular factory. Therefore, to make use of the pollution chart the player&#039;s pollution output would need to be manually estimated.&lt;br /&gt;
&lt;br /&gt;
*Given that the game reports the actual evolution factor (console: &amp;lt;code&amp;gt;/evolution&amp;lt;/code&amp;gt;) whenever the player wishes, these charts are intended primarily to help estimate the impact of planned base expansions and similar activities on the evolution factor&#039;s future development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comments&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These charts (click to enlarge) represent the situation where each evolution factor component (time, pollution, destroyed spawners) is the &#039;&#039;only&#039;&#039; component contributing to the evolution factor in that entire game. They are therefore &#039;&#039;&#039;not realistic&#039;&#039;&#039;, as in a typical game all three components will contribute, some at varying times and intensities.&lt;br /&gt;
&lt;br /&gt;
Because of how contributions to the evolution factor (hereinafter, EF) are calculated (multiplied by &amp;lt;code&amp;gt;(1 - current EF)&amp;lt;/code&amp;gt;), it is &#039;&#039;&#039;not&#039;&#039;&#039; possible to simply add the values indicated by these charts for a game&#039;s time passed, pollution generated, and / or spawners destroyed so far to retrieve the total evolution factor.&lt;br /&gt;
&lt;br /&gt;
For example, if 20 hours have passed (single-component EF =~ 0.25), 10 million pollution units were released (single-component EF =~ 0.15), and 200 spawners were destroyed (single-component EF =~ 0.35), the actual evolution factor will &#039;&#039;&#039;not&#039;&#039;&#039; be (0.25 + 0.15 + 0.35 =) ~0.85.&lt;br /&gt;
&lt;br /&gt;
However, the evolution factor will always be &#039;&#039;&#039;less&#039;&#039;&#039; than the sum of all individual components as indicated by these charts, and &#039;&#039;&#039;at least&#039;&#039;&#039; as high as the highest individual component. Thus, using the values from above, the EF will be &#039;&#039;at least&#039;&#039; 0.35 and &#039;&#039;less than&#039;&#039; 0.85. A smarter approach is required to compute the amount of pollution released.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Computation of actual evolution factor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The actual EF can be computed as follow :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; 1 - EF = (1 - E[t]) * (1 - E[p]) * (1 - E[s])&amp;lt;/code&amp;gt;, where &#039;&#039;E[t]&#039;&#039;, &#039;&#039;E[p]&#039;&#039;, and &#039;&#039;E[s]&#039;&#039; are the single-component values from the pollution, time, and spawner charts, in that order.&lt;br /&gt;
&lt;br /&gt;
A key observation in understanding where this formula comes from is that each increpmental change of the evolution factor is effectively a multiplication of &amp;lt;code&amp;gt;1 - EF&amp;lt;/code&amp;gt; by a constant (depending on the nature of the change). For example, an other way of saying that killing a biter nest augment evolution by 0.2% of &amp;lt;code&amp;gt;1 - EF&amp;lt;/code&amp;gt;, is to say that killing a biter nest multiplies &amp;lt;code&amp;gt;1 - EF&amp;lt;/code&amp;gt; by 0.998.&lt;br /&gt;
&lt;br /&gt;
So like multiplication, evolution is, barring rounding errors, associative and commutative. The commutativity means that the order in which you make actions increasing evolution do not matter, and along the assossiativity grounds the formula above.&lt;br /&gt;
&lt;br /&gt;
That knowledge can also be applied to compute the above charts exactly, or to compute a component of evolution without having to refer to the chart at all. For example, pollution as a function of time only is &amp;lt;code&amp;gt;1 - 0.999996 ^ t&amp;lt;/code&amp;gt; where t is the time in seconds.&lt;br /&gt;
&lt;br /&gt;
For the values from above, we can deduce the evolution factor &amp;lt;code&amp;gt;1 - EF = (1 - 0.25) * (1 - 0.15) * (1 - 0.35) = 0.75 * 0.85 * 0.35 = 0.41&amp;lt;/code&amp;gt;, which gives an evolution factor of &amp;lt;code&amp;gt;0.59&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This formula can also be used to estimate impact of future player activities on the EF : a set of actions that is known to bring the evolution factor of a world from 0 to EF(2) (eg using the above chart and formula) will bring it from EF(1) to &amp;lt;code&amp;gt;1 - (1-EF(1)) * (1-EF(2))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if the player planned to spend the next 20 hours building up their base, releasing 10 million pollution and destroying 200 spawners in the meantime (i.e., the same numbers as in the example above), and the EF at the start of the project were, say, 0.55, then the estimated EF at project end will be &amp;lt;code&amp;gt;1 - (1 - 0.55) * (1 - 0.59) = 0.81&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery widths=270px heights=140px&amp;gt;&lt;br /&gt;
File:player_near_enemy_nests.png|The player near some enemy nests and worms.&lt;br /&gt;
File:player_worms_acid.png|The player among acid puddles created by attacking worms.&lt;br /&gt;
File:player_attacked_by_biters.png|Both the player and some buildings getting attacked by biters.&lt;br /&gt;
File:enemy_nests_mapgen.png|Enemy nests seen in a map generation preview (deathworld setting).&lt;br /&gt;
File:turret_wall_biters.png|Line of gun turrets defending against biters.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|0.17.0|&lt;br /&gt;
* Behemoth worm added.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Increased the damage, range, and health of worms.&lt;br /&gt;
* Decreased health and resist of Behemoth biters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.10|&lt;br /&gt;
* Biters and other units won&#039;t become aggressive as a result of friendly-fire.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Big and behemoth enemies now spawn 50% slower.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.26|&lt;br /&gt;
* Running biters over with a vehicle will now anger them in peaceful mode.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Updated sounds for enemies.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.17|&lt;br /&gt;
* Items dropped by enemies([[alien artifact|*]]) are now collected automatically and from longer distances.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.6|&lt;br /&gt;
* Range of spitters is now 15, less than turrets.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.0|&lt;br /&gt;
* Spitters added.&lt;br /&gt;
* Drawing of enemies optimised, so adding new colors does not impact VRAM.&lt;br /&gt;
* Blood splashes on death are now procedural.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.9.0|&lt;br /&gt;
* Turrets no longer search for enemies when none are near.&lt;br /&gt;
* Biters can no longer destroy the shipwreck in the 3rd new hope campaign.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.1|&lt;br /&gt;
* Further improvement to enemy AI.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.0|&lt;br /&gt;
* Decreased the range of medium worm from 25 to 20.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.7.2|&lt;br /&gt;
* Biter AI improved.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.7.1|&lt;br /&gt;
* Peaceful mode added for freeplay.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.7.0|&lt;br /&gt;
* Enemy creepers were replaced by small, medium and big biters.&lt;br /&gt;
* Enemy turrets were replaced by small, medium and big shooting worms.&lt;br /&gt;
* Enemies move and attack in groups.&lt;br /&gt;
* Enemies wander around their base when they have nothing to do.&lt;br /&gt;
* Enemies call for help when attacked.&lt;br /&gt;
* Enemies can create new bases.&lt;br /&gt;
* Enemies can now destroy all player creations they find.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced, called &#039;creepers&#039;}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Damage]]&lt;br /&gt;
* [[Pollution]]&lt;/div&gt;</summary>
		<author><name>DaveMcW</name></author>
	</entry>
</feed>