<?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=Maoman</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=Maoman"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Maoman"/>
	<updated>2026-06-08T13:59:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=184557</id>
		<title>Tutorial talk:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=184557"/>
		<updated>2021-02-12T11:10:29Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Memory cells */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Memory cells  ==&lt;br /&gt;
&lt;br /&gt;
I am aiming to update the &amp;quot;memory cells&amp;quot; section.&lt;br /&gt;
* The &amp;quot;advanced cell&amp;quot; does not handle 1-tick bursts properly. (I updated the article and wrote about that)&lt;br /&gt;
* There should be more versions of the memory cell, including versions that can handle negative input.&lt;br /&gt;
&lt;br /&gt;
I may post some of my designs here once I finish polishing them.&lt;br /&gt;
-- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thank you for this, designs are appreciated here. It&#039;s good that you remain objective about their advantages and disadvantages. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thank you for your incredible work on the Wiki. I am always 100% objective. In this particular scenario, the initial design is objectively flawed. Try connecting a simple clock (self-connected arithmetic combinator with + 1) into it and then disconnecting it suddenly, its memory will flicker between the last two values. More generally, if the current input is only given for 1 tick, then it flickers between the current and the previous input. I do not want to remove it without the approval of the original poster. Here is a demo of the flicker. This device on the left sends a 1-tick pulse of 1. The lamp turns on if the output signal is 1. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: (edit: fixed link): https://streamable.com/5r7w8&lt;br /&gt;
&lt;br /&gt;
::: Because your memory cell has the same size, the other memory cell has no advantages over it. So, I am okay with a removal of the &amp;quot;positive cell&amp;quot;. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok. Let&#039;s wait for a while in case the original poster has comments that we&#039;ve missed.&lt;br /&gt;
&lt;br /&gt;
:::: There&#039;s one advantage for the previous design: It&#039;s useful for someone that absolutely requires a reset-on-negative and not reset on a dedicated line, and does not care about the flicker issue. But that seems like a very rare edge case, and someone who needs it is most likely very experienced and doesn&#039;t need this guide. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
There is a mistake in the new image for the &amp;quot;Positives and Negatives cell&amp;quot; by &amp;quot;Zippy.&amp;quot; In the original image there is a green wire connecting the input of [2] to the input of [3] which must be present for the memory cell to function properly; without it the [M] output simply increments on each tick. In case that description is confusing, here is an image where I use the blueprint selection box to highlight the wire I&#039;m talking about: https://i.imgur.com/XRLAEkh.png [[User:Maoman|Maoman]] ([[User talk:Maoman|talk]]) 11:07, 12 February 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Binary gates redundant? ==&lt;br /&gt;
&lt;br /&gt;
The binary gates do not seem to have much function, because As of 0.16, arithmetic combinators have built-in binary logic support. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:56, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I am not very experienced in combinators, but aren&#039;t the combinators OR, XOR and AND option bitwise instead of binary? [[User:My3DS]] changed the page to specify that just yesterday, so it seems important to me. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I am not sure I understand the difference between &amp;quot;bitwise&amp;quot; and &amp;quot;binary&amp;quot; in the context of 1-bit inputs.&lt;br /&gt;
&lt;br /&gt;
:: The built-in OR, XOR, and AND produce exactly the same truth tables as the ones currently in the article for inputs of 1&#039;s and zeros, and are additionally capable of performing more than that for inputs greater than 1.&lt;br /&gt;
&lt;br /&gt;
:: -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:25, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Like I said, combinators aren&#039;t my strong suit :) So yes, they are redundant, but I&#039;d personally wait and see what My3DS wants to do with the gates before removing them. Perhaps give them a week, and if nothing is changed until then, remove them. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok :), does the wiki have some sort of &amp;quot;pinging&amp;quot; system to let them see the conversation?. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: You can&#039;t ping people directly, but if you leave a message on someones talk page, they will see a notification until they check it. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 18:12, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Thank you :) -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I can see the merit in these designs for 3 or more inputs. But I think  it should be clear to the reader that the 2-input designs are alternatives to the built-in ones, and that the bitwise vs binary sentence should be clarified. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
I have updated the page to have some clarification of what is meant by bitwise and some additional notes on the gates, as some can function with boolean or non-boolean values (or binary vs non-binary values), and some can have more inputs. Let me know if something doesn&#039;t make sense or should be improved. I&#039;m also not sure if the built in ones should be under the others or before it. [[User:BlackJack69|BlackJack69]] ([[User talk:BlackJack69|talk]]) 00:19, 12 February 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== This is not a beginner tutorial at the moment ==&lt;br /&gt;
&lt;br /&gt;
This page seems inappropriate for circuit beginners and I&#039;ve added a sentence at the beginning to keep beginners from getting frustrated; the circuit network page and cookbook page should be more helpful for beginners. A beginner section on this (or on a different page) that explains how to connect wires, how signals work and so on would be useful.&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a decent overlap with the cookbook page (the madzuri setup, memory cells, sr latches, logic gates). And virtual signals are explained here and on the circuit network page. That is not a problem as such but it means there is more work to keep it updated. In sections where the intended depth of explanation is comparable between the pages, it may be better to keep the content on one page and have a link on the other one. [[User:Unique 2|Unique 2]] ([[User talk:Unique 2|talk]]) 23:25, 10 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Working on improving the Virtual Signal section ==&lt;br /&gt;
&lt;br /&gt;
So far I&#039;ve rewritten the section explaining wildcards, as it was very terse compared to overview at the [[Circuit network#Logic signals]] section. Given that this is a tutorial page, they should be explained in depth, which I attempted to do.&lt;br /&gt;
&lt;br /&gt;
I plan to add a similar explanation for the other virtual signals, but for now I&#039;ve stayed up way past my bed time :) --[[User:ZeroKnight|ZeroKnight]] ([[User talk:ZeroKnight|talk]]) 10:41, 4 October 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=184556</id>
		<title>Tutorial talk:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=184556"/>
		<updated>2021-02-12T11:07:39Z</updated>

		<summary type="html">&lt;p&gt;Maoman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Memory cells  ==&lt;br /&gt;
&lt;br /&gt;
I am aiming to update the &amp;quot;memory cells&amp;quot; section.&lt;br /&gt;
* The &amp;quot;advanced cell&amp;quot; does not handle 1-tick bursts properly. (I updated the article and wrote about that)&lt;br /&gt;
* There should be more versions of the memory cell, including versions that can handle negative input.&lt;br /&gt;
&lt;br /&gt;
I may post some of my designs here once I finish polishing them.&lt;br /&gt;
-- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thank you for this, designs are appreciated here. It&#039;s good that you remain objective about their advantages and disadvantages. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thank you for your incredible work on the Wiki. I am always 100% objective. In this particular scenario, the initial design is objectively flawed. Try connecting a simple clock (self-connected arithmetic combinator with + 1) into it and then disconnecting it suddenly, its memory will flicker between the last two values. More generally, if the current input is only given for 1 tick, then it flickers between the current and the previous input. I do not want to remove it without the approval of the original poster. Here is a demo of the flicker. This device on the left sends a 1-tick pulse of 1. The lamp turns on if the output signal is 1. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: (edit: fixed link): https://streamable.com/5r7w8&lt;br /&gt;
&lt;br /&gt;
::: Because your memory cell has the same size, the other memory cell has no advantages over it. So, I am okay with a removal of the &amp;quot;positive cell&amp;quot;. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok. Let&#039;s wait for a while in case the original poster has comments that we&#039;ve missed.&lt;br /&gt;
&lt;br /&gt;
:::: There&#039;s one advantage for the previous design: It&#039;s useful for someone that absolutely requires a reset-on-negative and not reset on a dedicated line, and does not care about the flicker issue. But that seems like a very rare edge case, and someone who needs it is most likely very experienced and doesn&#039;t need this guide. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
There is a mistake in the new image by &amp;quot;Zippy.&amp;quot; In the original image there is a green wire connecting the input of [2] to the input of [3] which must be present for the memory cell to function properly; without it the [M] output simply increments on each tick. In case that description is confusing, here is an image where I use the blueprint selection box to highlight the wire I&#039;m talking about: https://i.imgur.com/XRLAEkh.png [[User:Maoman|Maoman]] ([[User talk:Maoman|talk]]) 11:07, 12 February 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Binary gates redundant? ==&lt;br /&gt;
&lt;br /&gt;
The binary gates do not seem to have much function, because As of 0.16, arithmetic combinators have built-in binary logic support. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:56, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I am not very experienced in combinators, but aren&#039;t the combinators OR, XOR and AND option bitwise instead of binary? [[User:My3DS]] changed the page to specify that just yesterday, so it seems important to me. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I am not sure I understand the difference between &amp;quot;bitwise&amp;quot; and &amp;quot;binary&amp;quot; in the context of 1-bit inputs.&lt;br /&gt;
&lt;br /&gt;
:: The built-in OR, XOR, and AND produce exactly the same truth tables as the ones currently in the article for inputs of 1&#039;s and zeros, and are additionally capable of performing more than that for inputs greater than 1.&lt;br /&gt;
&lt;br /&gt;
:: -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:25, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Like I said, combinators aren&#039;t my strong suit :) So yes, they are redundant, but I&#039;d personally wait and see what My3DS wants to do with the gates before removing them. Perhaps give them a week, and if nothing is changed until then, remove them. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok :), does the wiki have some sort of &amp;quot;pinging&amp;quot; system to let them see the conversation?. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: You can&#039;t ping people directly, but if you leave a message on someones talk page, they will see a notification until they check it. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 18:12, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Thank you :) -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I can see the merit in these designs for 3 or more inputs. But I think  it should be clear to the reader that the 2-input designs are alternatives to the built-in ones, and that the bitwise vs binary sentence should be clarified. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
I have updated the page to have some clarification of what is meant by bitwise and some additional notes on the gates, as some can function with boolean or non-boolean values (or binary vs non-binary values), and some can have more inputs. Let me know if something doesn&#039;t make sense or should be improved. I&#039;m also not sure if the built in ones should be under the others or before it. [[User:BlackJack69|BlackJack69]] ([[User talk:BlackJack69|talk]]) 00:19, 12 February 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== This is not a beginner tutorial at the moment ==&lt;br /&gt;
&lt;br /&gt;
This page seems inappropriate for circuit beginners and I&#039;ve added a sentence at the beginning to keep beginners from getting frustrated; the circuit network page and cookbook page should be more helpful for beginners. A beginner section on this (or on a different page) that explains how to connect wires, how signals work and so on would be useful.&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a decent overlap with the cookbook page (the madzuri setup, memory cells, sr latches, logic gates). And virtual signals are explained here and on the circuit network page. That is not a problem as such but it means there is more work to keep it updated. In sections where the intended depth of explanation is comparable between the pages, it may be better to keep the content on one page and have a link on the other one. [[User:Unique 2|Unique 2]] ([[User talk:Unique 2|talk]]) 23:25, 10 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Working on improving the Virtual Signal section ==&lt;br /&gt;
&lt;br /&gt;
So far I&#039;ve rewritten the section explaining wildcards, as it was very terse compared to overview at the [[Circuit network#Logic signals]] section. Given that this is a tutorial page, they should be explained in depth, which I attempted to do.&lt;br /&gt;
&lt;br /&gt;
I plan to add a similar explanation for the other virtual signals, but for now I&#039;ve stayed up way past my bed time :) --[[User:ZeroKnight|ZeroKnight]] ([[User talk:ZeroKnight|talk]]) 10:41, 4 October 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136906</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136906"/>
		<updated>2017-05-09T08:21:54Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Freeze Time Passage */ Clarified for non-programmers&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 {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. 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 re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&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. 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;
Note that the console can also accept raw Lua code as well as game 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 {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} 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 auto-complete 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;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
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{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&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;
 /c 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;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&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;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&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 you replace &amp;quot;BOOL&amp;quot; with &amp;quot;true&amp;quot; or unfreezes it if you replace it with &amp;quot;false&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 /c game.player.surface.freeze_daytime(BOOL)&lt;br /&gt;
&lt;br /&gt;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11x11 patch of resources, centered on the player character. The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center. The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number. A larger patch will have exponentially more ore. Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number. Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 local ore = nil&lt;br /&gt;
 local size = 5&lt;br /&gt;
 local density = 10&lt;br /&gt;
 for y=-size,size do&lt;br /&gt;
  for x=-size,size do&lt;br /&gt;
   a = (((size+1) - math.abs(x))*10)&lt;br /&gt;
   b = (((size+1) - math.abs(y))*10)&lt;br /&gt;
   if a &amp;lt; b then&lt;br /&gt;
    ore = math.random(((a*density)-(a*(density-8))),((a*density)+(a*(density-8))))&lt;br /&gt;
   end&lt;br /&gt;
   if b &amp;lt; a then&lt;br /&gt;
    ore = math.random(((b*density)-(b*(density-8))),((b*density)+(b*(density-8))))&lt;br /&gt;
   end&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&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;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&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. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &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;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&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;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&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;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.15.9&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
0.15.x Adds in a couple of new command line options.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
  --check-unused-prototype-data      Print a warning for all prototype values&lt;br /&gt;
                                     that were not accessed&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --map-settings FILE                Map settings for use with --create. See&lt;br /&gt;
                                     data/base/prototypes/map-settings.lua&lt;br /&gt;
  --preset arg                       Name of the map generation preset to be&lt;br /&gt;
                                     used.&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1.000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
  --fullscreen BOOL                  start game in windowed mode (saved to&lt;br /&gt;
                                     configuration)&lt;br /&gt;
  --max-texture-size N               maximal size of texture that the game can&lt;br /&gt;
                                     use (saved to configuration). Should be&lt;br /&gt;
                                     power of two greater than 2048&lt;br /&gt;
  --graphics-quality arg             accepted values: normal, low, very-low&lt;br /&gt;
  --video-memory-usage arg           accepted values: all, high, medium, low&lt;br /&gt;
  --gfx-safe-mode                    resets some graphics settings to values&lt;br /&gt;
                                     that should work on most configurations&lt;br /&gt;
  --shader arg                       enable/disable shader postprocessing&lt;br /&gt;
                                     (saved to configuration)&lt;br /&gt;
  --disable-audio                    Disable audio. Mainly for faster startup&lt;br /&gt;
                                     during development.&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
  --server-whitelist FILE            Path to file with server whitelist.&lt;br /&gt;
  --server-banlist FILE              Path to file with server banlist.&lt;br /&gt;
  --console-log FILE                 Path to file where a copy of the server&#039;s&lt;br /&gt;
                                     log will be stored&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&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>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136869</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136869"/>
		<updated>2017-05-08T10:58:36Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Add new resource patch */ reworded to clarify a few things.&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 {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. 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 re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&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. 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;
Note that the console can also accept raw Lua code as well as game 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 {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} 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 auto-complete 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;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
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{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&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;
 /c 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;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&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;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&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;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11x11 patch of resources, centered on the player character. The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center. The default numbers result in a patch with 2500-3000 ore.&lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to a larger number. A larger patch will have exponentially more ore. Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to a larger number. Entering a very large number shouldn&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
To choose which resource is spawned, change &amp;quot;stone&amp;quot; near the bottom to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 local ore = nil&lt;br /&gt;
 local size = 5&lt;br /&gt;
 local density = 10&lt;br /&gt;
 for y=-size,size do&lt;br /&gt;
  for x=-size,size do&lt;br /&gt;
   a = (((size+1) - math.abs(x))*10)&lt;br /&gt;
   b = (((size+1) - math.abs(y))*10)&lt;br /&gt;
   if a &amp;lt; b then&lt;br /&gt;
    ore = math.random(((a*density)-(a*(density-8))),((a*density)+(a*(density-8))))&lt;br /&gt;
   end&lt;br /&gt;
   if b &amp;lt; a then&lt;br /&gt;
    ore = math.random(((b*density)-(b*(density-8))),((b*density)+(b*(density-8))))&lt;br /&gt;
   end&lt;br /&gt;
   surface.create_entity({name=&amp;quot;stone&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&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;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&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. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &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;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&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;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&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;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.15.9&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
0.15.x Adds in a couple of new command line options.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
  --check-unused-prototype-data      Print a warning for all prototype values&lt;br /&gt;
                                     that were not accessed&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --map-settings FILE                Map settings for use with --create. See&lt;br /&gt;
                                     data/base/prototypes/map-settings.lua&lt;br /&gt;
  --preset arg                       Name of the map generation preset to be&lt;br /&gt;
                                     used.&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1.000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
  --fullscreen BOOL                  start game in windowed mode (saved to&lt;br /&gt;
                                     configuration)&lt;br /&gt;
  --max-texture-size N               maximal size of texture that the game can&lt;br /&gt;
                                     use (saved to configuration). Should be&lt;br /&gt;
                                     power of two greater than 2048&lt;br /&gt;
  --graphics-quality arg             accepted values: normal, low, very-low&lt;br /&gt;
  --video-memory-usage arg           accepted values: all, high, medium, low&lt;br /&gt;
  --gfx-safe-mode                    resets some graphics settings to values&lt;br /&gt;
                                     that should work on most configurations&lt;br /&gt;
  --shader arg                       enable/disable shader postprocessing&lt;br /&gt;
                                     (saved to configuration)&lt;br /&gt;
  --disable-audio                    Disable audio. Mainly for faster startup&lt;br /&gt;
                                     during development.&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
  --server-whitelist FILE            Path to file with server whitelist.&lt;br /&gt;
  --server-banlist FILE              Path to file with server banlist.&lt;br /&gt;
  --console-log FILE                 Path to file where a copy of the server&#039;s&lt;br /&gt;
                                     log will be stored&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&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>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136631</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136631"/>
		<updated>2017-05-04T08:37:41Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Add new resource patch */ minor fix&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 {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. 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 re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&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. 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;
Note that the console can also accept raw Lua code as well as game 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 {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} 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 auto-complete 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;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
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{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&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;
 /c 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;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&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;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&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;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11x11 patch of resources, centered on the player character. The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center. &lt;br /&gt;
&lt;br /&gt;
For resources other than stone, change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to any other number. Entering a number above 30 is not recommended. A larger patch will have proportionally more ore.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to any other number. Entering a large number won&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 local ore = nil&lt;br /&gt;
 local size = 5&lt;br /&gt;
 local density = 10&lt;br /&gt;
 for y=-size,size do&lt;br /&gt;
  for x=-size,size do&lt;br /&gt;
   a = (((size+1) - math.abs(x))*10)&lt;br /&gt;
   b = (((size+1) - math.abs(y))*10)&lt;br /&gt;
   if a &amp;lt; b then&lt;br /&gt;
    ore = math.random(((a*density)-(a*(density-8))),((a*density)+(a*(density-8))))&lt;br /&gt;
   end&lt;br /&gt;
   if b &amp;lt; a then&lt;br /&gt;
    ore = math.random(((b*density)-(b*(density-8))),((b*density)+(b*(density-8))))&lt;br /&gt;
   end&lt;br /&gt;
   surface.create_entity({name=&amp;quot;uranium-ore&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&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;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&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. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &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;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&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;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&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;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&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>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136625</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136625"/>
		<updated>2017-05-04T08:25:35Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Add new resource patch */ Added a &amp;quot;density&amp;quot; variable&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 {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. 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 re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&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. 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;
Note that the console can also accept raw Lua code as well as game 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 {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} 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 auto-complete 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;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
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{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&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;
 /c 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;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&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;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&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;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11x11 patch of resources, centered on the player character. The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center. &lt;br /&gt;
&lt;br /&gt;
For resources other than stone, change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to any other number. Entering a number above 30 is not recommended. A larger patch will have proportionally more ore.&lt;br /&gt;
&lt;br /&gt;
If you want a richer patch, change &amp;quot;local density = 10&amp;quot; to any other number. Entering a large number won&#039;t hurt anything but you probably don&#039;t need to go above 100.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 local ore = nil&lt;br /&gt;
 local size = 5&lt;br /&gt;
 local density = 10&lt;br /&gt;
 for y=-size,size do&lt;br /&gt;
  for x=-size,size do&lt;br /&gt;
   a = (((size+1) - math.abs(x))*10)&lt;br /&gt;
   b = (((size+1) - math.abs(y))*10)&lt;br /&gt;
   if a &amp;lt; b then&lt;br /&gt;
    ore = math.random(((a*density)-(a*(density-2))),((a*density)+(a*(density-2))))&lt;br /&gt;
   end&lt;br /&gt;
   if b &amp;lt; a then&lt;br /&gt;
    ore = math.random(((b*density)-(b*(density-2))),((b*density)+(b*(density-2))))&lt;br /&gt;
   end&lt;br /&gt;
   surface.create_entity({name=&amp;quot;uranium-ore&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&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;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&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. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &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;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&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;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&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;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&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>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136624</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136624"/>
		<updated>2017-05-04T08:12:41Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Add new resource patch */ cleaned it up a bit&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 {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. 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 re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&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. 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;
Note that the console can also accept raw Lua code as well as game 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 {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} 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 auto-complete 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;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
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{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&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;
 /c 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;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&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;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&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;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11x11 patch of resources, centered on the player character. The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center. &lt;br /&gt;
&lt;br /&gt;
For resources other than stone, change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to any other number. Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 local ore = nil&lt;br /&gt;
 local size = 5&lt;br /&gt;
 for y = -size, size do&lt;br /&gt;
  for x = -size, size do&lt;br /&gt;
   a = (((size+1) - math.abs(x))*10)&lt;br /&gt;
   b = (((size+1) - math.abs(y))*10)&lt;br /&gt;
   if a &amp;lt; b then&lt;br /&gt;
    ore = math.random(((a * 10)-(a * 2)),((a * 10)+(a * 2)))&lt;br /&gt;
   end&lt;br /&gt;
   if b &amp;lt; a then&lt;br /&gt;
    ore = math.random(((b * 10)-(b * 2)),((b * 10)+(b * 2)))&lt;br /&gt;
   end&lt;br /&gt;
   surface.create_entity({name = &amp;quot;stone&amp;quot;, amount = ore, position = {game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&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;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&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. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &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;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&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;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&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;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&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>Maoman</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Console&amp;diff=136623</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Console&amp;diff=136623"/>
		<updated>2017-05-04T08:05:08Z</updated>

		<summary type="html">&lt;p&gt;Maoman: /* Add new resource patch */ Made a much better bit of code for generating a new resource patch. Now if only I can figure out how to make a circle.&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 {{keybinding|/}} (slash) or {{keybinding|~}} (tilde) keys.&lt;br /&gt;
&lt;br /&gt;
You can customize the keys via &#039;&#039;&#039;Options Menu -&amp;gt; Keyboard -&amp;gt; Toggle Lua console&#039;&#039;&#039;. 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 re-display all recent messages). Note that by default, all executed commands are made visible to all users. You can set the fade out time via &#039;&#039;&#039;Options Menu -&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. 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;
Note that the console can also accept raw Lua code as well as game 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 {{keybinding|&amp;amp;uarr;}} and {{keybinding|&amp;amp;darr;}} keys to scroll through the console history.&lt;br /&gt;
&lt;br /&gt;
Use the {{keybinding|&amp;amp;larr;}} and {{keybinding|&amp;amp;rarr;}} 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 auto-complete 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;
=== Large Screenshots ===&lt;br /&gt;
&lt;br /&gt;
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{&amp;lt;parameters&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The command takes the following parameters, separated by commas:&lt;br /&gt;
&lt;br /&gt;
* showgui - Boolean value, true or false. True if GUIs should be included in the screenshot.&lt;br /&gt;
* resolution - Takes an x and y, in the form {x = XPOS, y = YPOS}&lt;br /&gt;
* show_entity_info - Boolean value, true if alt info should be shown in the screenshot.&lt;br /&gt;
* zoom - A value to take the screenshot from a certain zoom.&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;
 /c 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;
For instance, here&#039;s a god-mode energy system interface:&lt;br /&gt;
&lt;br /&gt;
 /c game.player.insert{name=&amp;quot;electric-energy-interface&amp;quot;}&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;
=== Reveal the map around the player ===&lt;br /&gt;
&lt;br /&gt;
Reveals the map around the player, similar to a [[radar]].&lt;br /&gt;
&lt;br /&gt;
  /c local radius = 150; game.player.force.chart(game.player.surface, {{game.player.position.x - radius, game.player.position.y - radius}, {game.player.position.x + radius, game.player.position.y + radius}})&lt;br /&gt;
&lt;br /&gt;
Change 150 to the desired radius, higher values take longer.&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;
=== Remove all pollution ===&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 for coord in surface.get_chunks() do&lt;br /&gt;
  surface.pollute({coord.x * 32, coord.y * 32}, -10000000)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new resource patch ===&lt;br /&gt;
This creates a new 11x11 patch of resources, centered on the player character. The patch it creates is perfectly square but it randomizes the amount similar to natural generation, with fewer ore at the edges and more ore in the center. &lt;br /&gt;
&lt;br /&gt;
For resources other than stone, change &amp;quot;stone&amp;quot; to &amp;quot;iron-ore&amp;quot;, &amp;quot;copper-ore&amp;quot;, &amp;quot;coal&amp;quot;, or &amp;quot;uranium-ore&amp;quot;. If you want a larger patch, change &amp;quot;local size = 5&amp;quot; to any other number. Entering a number above 30 is not recommended.&lt;br /&gt;
&lt;br /&gt;
 /c local surface = game.player.surface;&lt;br /&gt;
 local ore = nil&lt;br /&gt;
 local size = 5&lt;br /&gt;
 for y=-size,size do&lt;br /&gt;
  for x=-size,size do&lt;br /&gt;
   a = (((size+1) - math.abs(x))*10)&lt;br /&gt;
   b = (((size+1) - math.abs(y))*10)&lt;br /&gt;
   if a &amp;lt; b then&lt;br /&gt;
    ore = math.random(((a*10)-(a*2)),((a*10)+(a*2)))&lt;br /&gt;
   end&lt;br /&gt;
   if b &amp;lt; a then&lt;br /&gt;
    ore = math.random(((b*10)-(b*2)),((b*10)+(b*2)))&lt;br /&gt;
   end&lt;br /&gt;
   surface.create_entity({name=&amp;quot;uranium-ore&amp;quot;, amount=ore, position={game.player.position.x+x, game.player.position.y+y}})&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Add new oil patch ===&lt;br /&gt;
This creates 9 crude oil patches in a 3x3 square.&lt;br /&gt;
&lt;br /&gt;
 /c for y=0,2 do&lt;br /&gt;
   for x=0,2 do&lt;br /&gt;
     game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position={game.player.position.x+x*7-7, game.player.position.y+y*7-7}})&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
or randomly without any collision:&lt;br /&gt;
&lt;br /&gt;
 /c local position = nil&lt;br /&gt;
 for i=1,9 do&lt;br /&gt;
 	position = game.player.surface.find_non_colliding_position(&amp;quot;crude-oil&amp;quot;, game.player.position, 0, i/2+1.5)&lt;br /&gt;
 	if position then &lt;br /&gt;
 		game.player.surface.create_entity({name=&amp;quot;crude-oil&amp;quot;, amount=5000, position=position})&lt;br /&gt;
 	end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
=== Count entities ===&lt;br /&gt;
Counts all entities whose name includes the string in local entity.&lt;br /&gt;
&lt;br /&gt;
 /c&lt;br /&gt;
 local entity = &amp;quot;belt&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 local surface = game.player.surface&lt;br /&gt;
 local count = 0&lt;br /&gt;
 for c in surface.get_chunks() do&lt;br /&gt;
   for key, ent in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= game.player.force})) do&lt;br /&gt;
     if string.find(ent.name,entity) then&lt;br /&gt;
       count = count + 1&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
 game.player.print(count)&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;
=== Disable biter expansion ===&lt;br /&gt;
This prevents biters from creating new spawners.&lt;br /&gt;
 /c game.map_settings.enemy_expansion.enabled = false&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. Available names are: Black, blue, brown, cyan, gray, green, orange, pink, purple, red, white, and yellow &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;
To undo&lt;br /&gt;
&lt;br /&gt;
 /c game.player.create_character()&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;
=== Enabling specific recipes ===&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;electric-energy-interface&amp;quot;].enabled = true&lt;br /&gt;
 /c game.player.force.recipes[&amp;quot;rocket-silo&amp;quot;].enabled = true&lt;br /&gt;
&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;
== Command Line Parameters ==&lt;br /&gt;
&#039;&#039;&#039;As of Game Version 0.14.21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Command line parameters can be used to set settings in the command line before the game launches, this is useful mainly for advanced users or server hosts.&lt;br /&gt;
&lt;br /&gt;
General options:&lt;br /&gt;
  -h [ --help ]                      display help&lt;br /&gt;
  --version                          show version information&lt;br /&gt;
  -v [ --verbose ]                   enable verbose logging&lt;br /&gt;
  -c [ --config ] PATH               config file to use&lt;br /&gt;
  --no-log-rotation                  don&#039;t rotate log file&lt;br /&gt;
  --mod-directory PATH               Mod directory to use&lt;br /&gt;
&lt;br /&gt;
Running options:&lt;br /&gt;
  -s [ --map2scenario ] arg          map to scenario conversion&lt;br /&gt;
  -m [ --scenario2map ] arg          scenario to map conversion&lt;br /&gt;
  --apply-update arg                 immediately apply update package&lt;br /&gt;
  --create FILE                      create a new map&lt;br /&gt;
  --map-gen-settings FILE            Map generation settings for use with&lt;br /&gt;
                                     --create. See data/map-gen-settings.exampl&lt;br /&gt;
                                     e.json&lt;br /&gt;
  --start-server FILE                start a multiplayer server&lt;br /&gt;
  --start-server-load-scenario FILE  start a multiplayer server and load the&lt;br /&gt;
                                     specified scenario&lt;br /&gt;
  --start-server-load-latest         start a multiplayer server and load the&lt;br /&gt;
                                     latest available save&lt;br /&gt;
  --until-tick TICK                  run a save until given map tick&lt;br /&gt;
  --mp-connect ADDRESS               start factorio and connect to address&lt;br /&gt;
  --load-game FILE                   start Factorio and load a game in&lt;br /&gt;
                                     singleplayer&lt;br /&gt;
  --benchmark FILE                   load save and run benchmark&lt;br /&gt;
  --benchmark-ticks N (=1,000)       number of ticks for benchmarking. Default&lt;br /&gt;
                                     is 1000&lt;br /&gt;
  --force-opengl                     use OpenGL for rendering&lt;br /&gt;
  --force-d3d                        use Direct3D for rendering&lt;br /&gt;
&lt;br /&gt;
Server options:&lt;br /&gt;
  --port N                           network port to use&lt;br /&gt;
  --bind ADDRESS[:PORT]              IP address (and optionally port) to bind&lt;br /&gt;
                                     to&lt;br /&gt;
  --rcon-port N                      Port to use for RCON&lt;br /&gt;
  --rcon-password PASSWORD           Password for RCON&lt;br /&gt;
  --server-settings FILE             Path to file with server settings. See&lt;br /&gt;
                                     data/server-settings.example.json&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer ===&lt;br /&gt;
&lt;br /&gt;
  --start-server SAVE&lt;br /&gt;
&lt;br /&gt;
Will start a Headless (Dedicated) server, with no GUI.&lt;br /&gt;
&lt;br /&gt;
  --mp-connect ADDRESS&lt;br /&gt;
ADDRESS is the IP:port of the remote host. Port is optional.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101&lt;br /&gt;
  ./factorio --mp-connect 192.168.1.101:2345&lt;br /&gt;
&lt;br /&gt;
As above, port can be specified by placing the port number after a colon in the address.&lt;br /&gt;
&lt;br /&gt;
  --map2scenario SAVE&lt;br /&gt;
Converts a save game to a User Scenario, allows saved game state to be loaded into map editor. Assuming that save game name is &amp;quot;foo.zip&amp;quot;, executing &#039;./factorio --map2scenario s1&#039; will result in Factorio loading, opening the save file, and saving the scenario into the scenario folder.&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>Maoman</name></author>
	</entry>
</feed>