Factorio Cheats: Console Commands for PC

Published by

Cheat mode

CheatCommandEffect
Enable cheat modePC/cheat allResearches every technology, turns on cheat mode, and gives you some extra items
Disable cheat modePC/cheat offTurns cheat mode back off

Items and research

CheatCommandEffect
Add itemPC/c game.player.insert{name="item-name", count=100}Add the named item and amount to your inventory
Research everythingPC/c game.player.force.research_all_technologies()Instantly research every technology for your force
Toggle player cheat modePC/c game.player.cheat_mode=trueGives free, instant crafting for your character specifically

Speed and movement

CheatCommandEffect
Set game speedPC/c game.speed=2Change the game's simulation speed; 1 is normal
Teleport playerPC/c game.player.teleport({X, Y})Move your character to the given map coordinates
Set mining speedPC/c game.player.force.manual_mining_speed_modifier=1000Multiply your force's manual mining speed
Set crafting speedPC/c game.player.force.manual_crafting_speed_modifier=1000Multiply your force's manual crafting speed

World and display

CheatCommandEffect
Always dayPC/c game.player.surface.always_day=trueStop the day/night cycle so it's always daytime on the surface
Show evolution factorPC/evolutionPrint the enemy evolution factor for every surface; add a surface name, like nauvis, for just one
Show game timePC/timePrint how old the map is to the console

Debug and testing

CheatCommandEffect
Open map editorPC/editorToggle the built-in map editor for the current save
Take screenshotPC/screenshotSave a screenshot to the game's script-output folder

A code here did not work? Tell us and it gets rechecked. Report a code

How to enter cheats in Factorio

PC

  1. Press the grave key (`), left of 1, to open the console.
  2. For a listed slash command, type it exactly as shown and press Enter.
  3. For a Lua command, type /c followed by the code and press Enter.

Do cheats disable achievements in Factorio?

Yes, scripting commands do. The Factorio Wiki says achievements are permanently disabled for the save as soon as you use a script command such as /c, and /cheat and the map editor count too. If you only want the research queue, the wiki lists /enable-research-queue as a way to turn it on without losing achievements. Factorio Wiki: Console

Can you use these cheats in multiplayer?

On a server, the allow_commands setting decides who can run /c. GameServerKings says the default is admins-only, true opens Lua to every player, and the host can change it with /config set allow-commands admins-only. If a server has no admin yet, the host can run /promote with your name from the server console. GameServerKings: Factorio console commands

Compatibility notes

Which releases these codes apply to, and where one behaves differently. Each note links to the source that documents it.

FAQ

How do you open the console in Factorio?

Press the grave key (`), the key left of 1 and above Tab. You can rebind it in Settings under Controls.

Do Factorio console commands disable achievements?

Only the scripting commands do. /c, /sc, /cheat, and the map editor permanently disable achievements for that save; admin commands like /promote, /ban, or /config don't.

Is there a cheat mode in Factorio?

Yes. /cheat all researches every technology and turns on cheat mode, and /cheat off turns it back off.

How do you add items to your inventory in Factorio?

Use a Lua command like /c game.player.insert{name="iron-plate", count=100}, replacing the item name and count.

How do you research everything instantly in Factorio?

Run /c game.player.force.research_all_technologies() to unlock every technology for your force.

Can you use Lua commands on a Factorio server?

Only if the server lets you. The allow_commands setting defaults to admins-only, so you need admin rights unless the host sets it to true.

Part of

References: Factorio Wiki: Console; GameServerKings: Factorio console commands.