Contents
Search

/c game.player.print()

Console Command
Command /c game.player.print()
Command Category Description Run Lua scripts. WARNING: The use of scripting and cheat commands will disable achievements. Please proceed with caution.
Description Use it as calculator.
Example /c game.player.print(1234*5678)
Admin None
Category
How To Use

The command console is Factorio's command-line interface, which can be used for running cheat commands, as well as chatting with other players and receiving occasional status updated.

To open the console, press the / or ~ key. The ~ key is usually located below the Esc key. The / key is also usually the ? key.

The console can accept raw Lua code as well as game commands.

Use the Tab key to auto-complete commands and player IDs. Enter the first few letters and then press the Tab key.

Disclaimer: Because commands can sometimes make unexpected changed to your game, it is recommended that you save your game before using any commands.

/c game.player.teleport({X, Y})
Category
Scripting and Cheat Commands
Description
Teleport player. 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. To teleport to the world's origin, use 0,0.
Read More
/c game.player.zoom=
Category
Scripting and Cheat Commands
Description
Zoom beyond normal bounds. Zooming too far out can cause performance issues.
Read More
/measured-command
Category
Scripting and Cheat Commands
Description
Executes a Lua command and measures time it took.
Read More
/c game.player.surface.freeze_daytime=
Category
Scripting and Cheat Commands
Description
Freeze time. Stops the advancement of the time if you replace "BOOL" with "true" or unfreezes it if you replace it with "false".
Read More
/c game.speed=X
Category
Scripting and Cheat Commands
Description
Change game speed. 0.5 is half speed, 1 is default, 2 is double speed, etc. Minimum is 0.01. This can be used for a lot of things like when you know you will have to wait for long periods of time for something to complete. Increasing will decrease performance, be careful.
Read More
/c game.player.force.friendly_fire =
Category
Scripting and Cheat Commands
Description
Disable friendly fire for your force
Read More
/c game.player.force.laboratory_speed_modifier=
Category
Scripting and Cheat Commands
Description
Enable faster research. 1 is normal speed, 2 is double speed 3 is triple etc.
Read More
/c game.player.force.reset()
Category
Scripting and Cheat Commands
Description
This resets all data for your force, including kill and production statistics, technologies, bonuses and charting status.
Read More
/c game.player.selected.amount=
Category
Scripting and Cheat Commands
Description
Refill resources (refill oil, iron etc.) While holding the cursor over a resource tile in-game
Read More
/c game.player.surface.always_day=true
Category
Scripting and Cheat Commands
Description
Turn off night. Enables eternal day.
Read More
/command
Category
Scripting and Cheat Commands
Description
Executes a Lua command.
Read More
/c game.player.cheat_mode=
Category
Scripting and Cheat Commands
Description
Allows for infinite free crafting. Disable by replacing true with false.
Read More
See example for the script
Category
Scripting and Cheat Commands
Description
Completely turn off pollution
Read More
/c game.forces[" "].kill_all_units()
Category
Scripting and Cheat Commands
Description
Kill all biters on the "enemy" force. Note that this will kill only mobile units, spawners will not be killed.
Read More
/c game.player.insert{name=" ", count= }
Category
Scripting and Cheat Commands
Description
Add items to the player's inventory. Replace iron-plate with the internal name of the item desired.
Read More
/c game.player.print(game.player.position.x .. ", " .. game.player.position.y)
Category
Scripting and Cheat Commands
Description
Get player position. Prints coordinates of your current position.
Read More
/c
Category
Scripting and Cheat Commands
Description
Executes a Lua command.
Read More