Factorio Cheats: Console Commands for PC
- PC Press the grave key (`) to open the console. Type /cheat all for quick cheats, or /c followed by a Lua command for anything else.
Published by Andrew B.
No cheats match that filter.
Cheat mode
| Cheat | Command | Effect |
|---|---|---|
| Enable cheat mode | PC/cheat all | Researches every technology, turns on cheat mode, and gives you some extra items |
| Disable cheat mode | PC/cheat off | Turns cheat mode back off |
Items and research
| Cheat | Command | Effect |
|---|---|---|
| Add item | PC/c game.player.insert{name="item-name", count=100} | Add the named item and amount to your inventory |
| Research everything | PC/c game.player.force.research_all_technologies() | Instantly research every technology for your force |
| Toggle player cheat mode | PC/c game.player.cheat_mode=true | Gives free, instant crafting for your character specifically |
Speed and movement
| Cheat | Command | Effect |
|---|---|---|
| Set game speed | PC/c game.speed=2 | Change the game's simulation speed; 1 is normal |
| Teleport player | PC/c game.player.teleport({X, Y}) | Move your character to the given map coordinates |
| Set mining speed | PC/c game.player.force.manual_mining_speed_modifier=1000 | Multiply your force's manual mining speed |
| Set crafting speed | PC/c game.player.force.manual_crafting_speed_modifier=1000 | Multiply your force's manual crafting speed |
World and display
| Cheat | Command | Effect |
|---|---|---|
| Always day | PC/c game.player.surface.always_day=true | Stop the day/night cycle so it's always daytime on the surface |
| Show evolution factor | PC/evolution | Print the enemy evolution factor for every surface; add a surface name, like nauvis, for just one |
| Show game time | PC/time | Print how old the map is to the console |
Debug and testing
| Cheat | Command | Effect |
|---|---|---|
| Open map editor | PC/editor | Toggle the built-in map editor for the current save |
| Take screenshot | PC/screenshot | Save 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
- Press the grave key (`), left of 1, to open the console.
- For a listed slash command, type it exactly as shown and press Enter.
- 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.
- Factorio 2.0 and Space Age The Factorio Wiki lists /cheat with a planet or space platform name as well as all and off. Naming a planet or platform also moves you to that location's origin. Factorio Wiki: Console
- Achievements GameServerKings says achievements are permanently disabled for the save after one script command, /cheat, or the map editor. Admin commands like /promote, /ban, and /config, and installing mods, don't disable them. GameServerKings: Factorio console commands
- Multiplayer servers GameServerKings says the allow_commands server setting defaults to admins-only, so /c only works for admins. Setting it to true lets every connected player run Lua. GameServerKings: Factorio console commands
- Server panel console GameServerKings says commands sent from a server's panel console have no player, so game.player is nil. Use game.players["YourName"] in place of game.player there. GameServerKings: Factorio console commands
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.
