Factorio Cheats: Console Commands for PC

Codes last checked on against the sources listed at the bottom of this page. Covers PC.

Published by

Cheat mode

CheatCommandEffect
Enable cheat modePC/cheat allTurns on cheat mode: unlocked recipes, infinite crafting, and no build restrictions
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 current enemy evolution factor to the console
Show game timePC/timePrint the current in-game time 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

How to enter cheats

PC

  1. Press ~ or / 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.

FAQ

How do you open the console in Factorio?

Press the grave/tilde key (~) or the forward slash (/) key.

Do Factorio console commands disable achievements?

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

Is there a cheat mode in Factorio?

Yes. /cheat all turns on unlocked recipes and infinite crafting, 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.

Part of

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