<?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=Aubergine18</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=Aubergine18"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Aubergine18"/>
	<updated>2026-04-25T10:37:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129722</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129722"/>
		<updated>2016-09-09T11:02:12Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: some brief notes about new console features in 0.14.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* chatting with other players&lt;br /&gt;
* running commands / scripts / cheats&lt;br /&gt;
* occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;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;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the &#039;&#039;&#039;/&#039;&#039;&#039; (slash) or &#039;&#039;&#039;~&#039;&#039;&#039; (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customise the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
&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). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately redisplay all recent messages).&lt;br /&gt;
&lt;br /&gt;
You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; 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). This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32389 Factorio 0.14.5 and later], you can clear the console with the &#039;&#039;&#039;/clear&#039;&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;up arrow&#039;&#039;&#039; and &#039;&#039;&#039;down arrow&#039;&#039;&#039; keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;left arrow&#039;&#039;&#039; and &#039;&#039;&#039;right arrow&#039;&#039;&#039; keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32389 Factorio 0.14.5 and later], the &#039;&#039;&#039;Tab&#039;&#039;&#039; key will autocomplete commands and player ids.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
These are just the main chat features - there are also options for banning, ignoring and muting players; see the console &#039;&#039;&#039;/help&#039;&#039;&#039; for a full list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&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;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129701</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129701"/>
		<updated>2016-09-08T15:24:44Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* chatting with other players&lt;br /&gt;
* running commands / scripts / cheats&lt;br /&gt;
* occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;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;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the &#039;&#039;&#039;/&#039;&#039;&#039; (slash) or &#039;&#039;&#039;~&#039;&#039;&#039; (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customise the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
&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). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately redisplay all recent messages).&lt;br /&gt;
&lt;br /&gt;
You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide everything on 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). This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;up arrow&#039;&#039;&#039; and &#039;&#039;&#039;down arrow&#039;&#039;&#039; keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;left arrow&#039;&#039;&#039; and &#039;&#039;&#039;right arrow&#039;&#039;&#039; keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&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;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129699</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129699"/>
		<updated>2016-09-08T15:24:15Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: /* Inventory Manipulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* chatting with other players&lt;br /&gt;
* running commands / scripts / cheats&lt;br /&gt;
* occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;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;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the &#039;&#039;&#039;/&#039;&#039;&#039; (slash) or &#039;&#039;&#039;~&#039;&#039;&#039; (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customise the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
&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). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately redisplay all recent messages).&lt;br /&gt;
&lt;br /&gt;
You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide everything on 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). This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;up arrow&#039;&#039;&#039; and &#039;&#039;&#039;down arrow&#039;&#039;&#039; keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;left arrow&#039;&#039;&#039; and &#039;&#039;&#039;right arrow&#039;&#039;&#039; keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&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;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129698</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129698"/>
		<updated>2016-09-08T15:23:52Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: /* Basic Command Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* chatting with other players&lt;br /&gt;
* running commands / scripts / cheats&lt;br /&gt;
* occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;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;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the &#039;&#039;&#039;/&#039;&#039;&#039; (slash) or &#039;&#039;&#039;~&#039;&#039;&#039; (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customise the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
&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). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately redisplay all recent messages).&lt;br /&gt;
&lt;br /&gt;
You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide everything on 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). This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;up arrow&#039;&#039;&#039; and &#039;&#039;&#039;down arrow&#039;&#039;&#039; keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;left arrow&#039;&#039;&#039; and &#039;&#039;&#039;right arrow&#039;&#039;&#039; keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&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;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129697</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129697"/>
		<updated>2016-09-08T15:21:34Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: /* Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* chatting with other players&lt;br /&gt;
* running commands / scripts / cheats&lt;br /&gt;
* occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;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;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the &#039;&#039;&#039;/&#039;&#039;&#039; (slash) or &#039;&#039;&#039;~&#039;&#039;&#039; (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customise the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
&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). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately redisplay all recent messages).&lt;br /&gt;
&lt;br /&gt;
You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide everything on 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). This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;up arrow&#039;&#039;&#039; and &#039;&#039;&#039;down arrow&#039;&#039;&#039; keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;left arrow&#039;&#039;&#039; and &#039;&#039;&#039;right arrow&#039;&#039;&#039; keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&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;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129692</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129692"/>
		<updated>2016-09-08T15:17:23Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: Refactored opening sections of page to detail different uses of console&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The in-game console is used for:&lt;br /&gt;
&lt;br /&gt;
* chatting with other players&lt;br /&gt;
* running commands / scripts / cheats&lt;br /&gt;
* occasional status updates&lt;br /&gt;
&lt;br /&gt;
There are three types of command:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Multiplayer&#039;&#039;&#039; - message filtering, banning users, etc.&lt;br /&gt;
* &#039;&#039;&#039;Information&#039;&#039;&#039; - display various information about the game&lt;br /&gt;
* &#039;&#039;&#039;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;
=== Using the console ===&lt;br /&gt;
The console display can be toggled with the &#039;&#039;&#039;/&#039;&#039;&#039; (slash) or &#039;&#039;&#039;~&#039;&#039;&#039; (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customise the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;.&lt;br /&gt;
&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). Documentation about message and command prefixes can be found further down this page.&lt;br /&gt;
&lt;br /&gt;
When console is closed, only the most recent messages/commands will be displayed, but they will gradually fade away (opening the console will immediately redisplay all recent messages).&lt;br /&gt;
&lt;br /&gt;
You can set the fade out time via &#039;&#039;&#039;Options Menu -&amp;gt; Other Settings -&amp;gt; Message Delay&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to immediately hide everything on 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). This not only closes the console, but it also hides all the recent messages/commands.&lt;br /&gt;
&lt;br /&gt;
=== Console history ===&lt;br /&gt;
&lt;br /&gt;
The console has an inbuilt history; it&#039;s a bit like a text editor where only one line of text is displayed at a time.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;up arrow&#039;&#039;&#039; and &#039;&#039;&#039;down arrow&#039;&#039;&#039; keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;&#039;left arrow&#039;&#039;&#039; and &#039;&#039;&#039;right arrow&#039;&#039;&#039; keys to cursor through the currently displayed message or command, which you can edit (delete, insert, etc.) and resend (by pressing &#039;&#039;&#039;Return&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multiplayer Chat ==&lt;br /&gt;
&lt;br /&gt;
Send private message to specific player with &#039;&#039;&#039;/whisper&#039;&#039;&#039; (or &#039;&#039;&#039;/w&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /whisper &amp;lt;playerId&amp;gt; &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reply to the most recently received private message with &#039;&#039;&#039;/reply&#039;&#039;&#039; (or &#039;&#039;&#039;/r&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 /reply &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], group chat works like this:&lt;br /&gt;
&lt;br /&gt;
 hello my team!&lt;br /&gt;
&lt;br /&gt;
 /s hello all players!&lt;br /&gt;
 /shout same as /s&lt;br /&gt;
&lt;br /&gt;
In Factorio 0.14.3 and earlier, group chat worked like this:&lt;br /&gt;
&lt;br /&gt;
 hello all players!&lt;br /&gt;
&lt;br /&gt;
 /team hello my team!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
To see a list of all available commands, enter &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;) in to the console. The available commands will depend on Factorio version and game setup.&lt;br /&gt;
&lt;br /&gt;
 /help&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?f=3&amp;amp;t=32248 Factorio 0.14.4 and later], the &#039;&#039;&#039;/help&#039;&#039;&#039; command will just display a list of commands on - to get full details for a command add the command name (without slash) after &#039;&#039;&#039;/help&#039;&#039;&#039; (or &#039;&#039;&#039;/h&#039;&#039;&#039;), for example if you want help on the &#039;&#039;&#039;/evolution&#039;&#039;&#039; command, you&#039;d type:&lt;br /&gt;
&lt;br /&gt;
 /h evolution&lt;br /&gt;
&lt;br /&gt;
=== Scripting and cheat commands ===&lt;br /&gt;
You can run Lua script commands via the console. It works similarly to any command line interface or the JavaScript console for your browser.&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;
To run a script, prefix it with &#039;&#039;&#039;/command&#039;&#039;&#039; (or &#039;&#039;&#039;/c&#039;&#039;&#039;), for example:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print &#039;hello me!&#039;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re in a multiplayer game, the command will be echoed to all other players (so they can see if you&#039;re cheating).&lt;br /&gt;
&lt;br /&gt;
In [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5 and later], multiplayer server admins can use &#039;&#039;&#039;/silent-command&#039;&#039;&#039; (only via RCON/server console) instead of &#039;&#039;&#039;/c&#039;&#039;&#039; to avoid the command being echoed to all players.&lt;br /&gt;
&lt;br /&gt;
 /silent-command game.player.print &#039;only admins can use (and see) silent commands&#039;&lt;br /&gt;
&lt;br /&gt;
Mod developers can also take advantage of the special &#039;&#039;&#039;/measured-command&#039;&#039;&#039; which is like &#039;&#039;&#039;/c&#039;&#039;&#039; but will time how long the command takes to run. This is very useful for performance tuning your scripts.&lt;br /&gt;
&lt;br /&gt;
 /measured-command game.player.print &#039;how much time does this take to run?&#039;&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command Examples==&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129657</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129657"/>
		<updated>2016-09-08T13:33:52Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: /* See also */ Changed main link to latest, added new link to list of versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;NOTE: Many of the below commands will likely only work in version 0.13, and will disable Achievements for the world they are used in. Use with caution. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Console Overview ==&lt;br /&gt;
The Factorio console is the built in interface for executing Lua commands within Factorio. It works similarly to any command line interface or the JavaScript console for your browser.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
== Using the console ==&lt;br /&gt;
=== Opening the console ===&lt;br /&gt;
With default key bindings, the console is opened with the &#039;&#039;&#039; &#039;/&#039; or &#039;~&#039;&#039;&#039;&#039; keys. Like most others, this key binding may be customized within the Options Menu-&amp;gt;Keyboard&amp;gt;&amp;quot;Toggle Lua console&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Inputting commands ===&lt;br /&gt;
&lt;br /&gt;
The console is also the chat window in multiplayer. You need to type &#039;/c&#039; in front of your commands, otherwise it will be sent as a chat message. The console has an inbuilt history. You can use the &amp;quot;cursor-up&amp;quot;-key to repeat or quickly edit and re-issue previous commands.&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
Note: As of [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5], multiplayer server admins can use `/silent-command&#039; (only via RCON/server console) instead of &#039;/c&#039;, to avoid the command being echoed to all players&#039; consoles.&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/latest/ - Factorio API reference for latest version&lt;br /&gt;
* http://lua-api.factorio.com/ - links to specific versions of API reference&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=129656</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=129656"/>
		<updated>2016-09-08T13:16:29Z</updated>

		<summary type="html">&lt;p&gt;Aubergine18: /* Inputting commands */ added note about /silent-command introduced in 0.14.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;NOTE: Many of the below commands will likely only work in version 0.13, and will disable Achievements for the world they are used in. Use with caution. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Console Overview ==&lt;br /&gt;
The Factorio console is the built in interface for executing Lua commands within Factorio. It works similarly to any command line interface or the JavaScript console for your browser.&lt;br /&gt;
&lt;br /&gt;
You can essentially fire any Lua command here, just as you would from a Lua program - Factorio [[Mods]] are merely Lua commands. Therefore you don&#039;t necessarily need &amp;quot;cheats&amp;quot; active per-se, as the console allows you full access to the game&#039;s internals. You only need a familiarity with the commands and types, as shown in the below examples and the [[Modding]] section.&lt;br /&gt;
&lt;br /&gt;
== Using the console ==&lt;br /&gt;
=== Opening the console ===&lt;br /&gt;
With default key bindings, the console is opened with the &#039;&#039;&#039; &#039;/&#039; or &#039;~&#039;&#039;&#039;&#039; keys. Like most others, this key binding may be customized within the Options Menu-&amp;gt;Keyboard&amp;gt;&amp;quot;Toggle Lua console&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Inputting commands ===&lt;br /&gt;
&lt;br /&gt;
The console is also the chat window in multiplayer. You need to type &#039;/c&#039; in front of your commands, otherwise it will be sent as a chat message. The console has an inbuilt history. You can use the &amp;quot;cursor-up&amp;quot;-key to repeat or quickly edit and re-issue previous commands.&lt;br /&gt;
&lt;br /&gt;
The game ignores newlines when pasting &amp;quot;scriptlets&amp;quot; in the console. This means they can be written in a human readable form in an editor and copy/pasted into the console, making understanding and editing a bit easier.&lt;br /&gt;
&lt;br /&gt;
Note: As of [https://forums.factorio.com/viewtopic.php?p=203991#p203991 Factorio 0.14.5], multiplayer server admins can use `/silent-command&#039; (only via RCON/server console) instead of &#039;/c&#039;, to avoid the command being echoed to all players&#039; consoles.&lt;br /&gt;
&lt;br /&gt;
=== Use it as calculator ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.print(1234 * 5678)&lt;br /&gt;
&lt;br /&gt;
=== Mine faster ===&lt;br /&gt;
 /c game.player.force.manual_mining_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Craft faster ===&lt;br /&gt;
 /c game.player.force.manual_crafting_speed_modifier=1000&lt;br /&gt;
&lt;br /&gt;
=== Unlock and Research all Technology ===&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.research_all_technologies()&lt;br /&gt;
&lt;br /&gt;
Undo this with:&lt;br /&gt;
&lt;br /&gt;
 for _, tech in pairs(game.player.force.technologies) do tech.researched=false end&lt;br /&gt;
&lt;br /&gt;
=== Reset any modifiers to default ===&lt;br /&gt;
This includes Tech and speed alterations.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.force.reset()&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;
&lt;br /&gt;
 /c game.player.zoom = 0.1&lt;br /&gt;
&lt;br /&gt;
== Inventory Manipulation ==&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;
 /c game.player.selected.amount=7500&lt;br /&gt;
&lt;br /&gt;
=== Add items to the player&#039;s inventory ===&lt;br /&gt;
Replace iron-plate with the internal name of the item desired.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;iron-plate&amp;quot;, count=100}&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;
&lt;br /&gt;
 /c game.player.cheat_mode=true&lt;br /&gt;
&lt;br /&gt;
== World Manipulation ==&lt;br /&gt;
=== Turn off night ===&lt;br /&gt;
Enables eternal day.&lt;br /&gt;
 /c game.surfaces[1].always_day=true&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. 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;
&lt;br /&gt;
 /c game.speed = X&lt;br /&gt;
&lt;br /&gt;
=== Freeze Time Passage ===&lt;br /&gt;
Stops the advancement of the time if true is passed, or unfreezes it if false is passed.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 5x5 patch of resources, centered on the player character. For resources other than stone, just change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, or &amp;quot;coal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for y=-2,2 do&lt;br /&gt;
  for x=-2,2 do&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=5000, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== Enemy/Evolution ==&lt;br /&gt;
=== Check how far the biters have evolved ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements.&lt;br /&gt;
 /evolution&lt;br /&gt;
&lt;br /&gt;
=== Set evolution factor ===&lt;br /&gt;
Ranges from 0 (new game) to 1.&lt;br /&gt;
&lt;br /&gt;
 /c game.evolution_factor=X&lt;br /&gt;
&lt;br /&gt;
=== Disable time-based evolution &amp;amp; increases pollution-based evolution ===&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;
&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 and worms, spawners will not be killed.&lt;br /&gt;
 /c game.forces[&amp;quot;enemy&amp;quot;].kill_all_units()&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.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
    for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= &amp;quot;enemy&amp;quot;})) do&lt;br /&gt;
        entity.destroy()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enable peaceful mode ===&lt;br /&gt;
Peaceful mode prevents biter attacks until provoked. Substitute false for true to disable.&lt;br /&gt;
 /c game.player.surface.peaceful_mode = true&lt;br /&gt;
&lt;br /&gt;
== Player Character ==&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;
&lt;br /&gt;
 /c game.player.print({&amp;quot;&amp;quot;, &amp;quot;(&amp;quot;, game.player.position.x, &amp;quot;, &amp;quot;, game.player.position.y, &amp;quot;)&amp;quot;})&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;
&lt;br /&gt;
 /c game.player.teleport({X, Y})&lt;br /&gt;
&lt;br /&gt;
To teleport to the world&#039;s origin, use 0,0.&lt;br /&gt;
&lt;br /&gt;
=== Spawn a player character ===&lt;br /&gt;
This is useful for escaping god mode. (see [[Console#Enable_god_mode]].) This will spawn a new player at the spawn point of the world, and connect your controls to it.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.character = game.player.surface.create_entity{name=&amp;quot;player&amp;quot;, position = {0,0}, force = game.forces.player}&lt;br /&gt;
&lt;br /&gt;
=== Change Player color ===&lt;br /&gt;
Note that commands that do not start with &amp;quot;/c&amp;quot; do not disable achievements. Replace COLOR with the name of a color.&lt;br /&gt;
 /color COLOR&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;
&lt;br /&gt;
 /c game.player.character = nil&lt;br /&gt;
&lt;br /&gt;
Then, hover the mouse over the useless player and destroy it by typing:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.selected.destroy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research ==&lt;br /&gt;
=== Enable faster research ===&lt;br /&gt;
 /c game.player.force.laboratory_speed_modifier = 1&lt;br /&gt;
1 is normal speed, 2 is double speed 3 is triple etc. I think it goes up to 100.&lt;br /&gt;
&lt;br /&gt;
=== Enabling specific technologies ===&lt;br /&gt;
[http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=6633 Enabling technologies] (forums)&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;
&lt;br /&gt;
=== Finish research immediately ===&lt;br /&gt;
 /c for name,technology in pairs(game.player.force.technologies) do technology.researched=technology.enabled end&lt;br /&gt;
&lt;br /&gt;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
And finally, this is how you would take a large HD screenshot. As usual, replace the X and Y with the values you wish.&lt;br /&gt;
&lt;br /&gt;
The file is put into a folder called &amp;quot;script-output&amp;quot;, which is located in the same location as the mods folder. These pictures can be quite large.&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 /c game.take_screenshot{showgui = true, resolution = {x = XPOS, y = YPOS}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* http://lua-api.factorio.com/0.13.10/ - Factorio API, replace the number at the end with the current factorio version.&lt;br /&gt;
[[Category:Console]]&lt;/div&gt;</summary>
		<author><name>Aubergine18</name></author>
	</entry>
</feed>