Guides/Console commands
BELTWORKS // FIELD GUIDE
Using Console Commands in Factorio
Configurable, searchable database of Factorio console commands. Each entry includes a command template with placeholders that map to user-selectable parameters.
By Daniel Robles · Beltworks · Updated 2026-08-19
Overview
Factorio's console is a built-in developer/debug tool that lets players run Lua-based commands to modify the game state — from spawning items to adjusting enemy evolution or revealing the map. It's accessed by pressing the grave/tilde key (` or ~, depending on keyboard layout) during a game, which opens a text input at the bottom of the screen.
Commands fall into two broad categories. Built-in commands (like /help, /time, /players, or /seed) are simple, single-purpose utilities that don't require scripting knowledge. Lua commands, prefixed with /c (short for "command," run once) or /silent-command (same thing, without console echo), give direct access to the game's scripting API. This is where most of the powerful stuff lives — game.player.insert{...} to give yourself items, game.player.force.research_all_technologies() to instantly complete the tech tree, or game.player.character.destructible = false for player invincibility, or game.player.vehicle.destructible = false while driving a tank/car/spidertron. Built-in /editor (also Ctrl+Shift+F11) drops you into the map editor so you can paint terrain even while looking at another planet in remote view — then Tools → Tiles.
Caveats
- Using console commands disables achievements for that save unless the scenario explicitly allows it — Factorio treats commands as a form of cheating by default, separate from the in-game "cheat mode" toggle.
- Commands only affect single-player or games where you have admin rights on a server; multiplayer servers can restrict console access entirely.
- Syntax matters — Lua is case-sensitive and expects exact item/entity internal names (e.g.
, not "Iron Plate").
iron-plate - Always test destructive or map-altering commands on a save you don't mind breaking — some effects aren't reversible through the console.
Open the console
Press the grave/tilde key (` or ~) during gameplay to open the console.
/cRuns a Lua command once, echoing it to console history/silent-commandRuns a Lua command once without echoing it/helpLists built-in (non-Lua) commands
Using /c or /silent-command disables Steam achievements for that save unless the map/scenario allows cheats.
Command builder
Filter by category, tweak parameters, then copy the finished string into Factorio.
33 commands · 203 items / 196 techs in selectors
Enable Cheat Mode
cheatsToggles cheat mode on for the player, enabling instant crafting, infinite reach, unlimited health regen, and unrestricted item placement.
/c game.player.cheat_mode = true
Disables achievements for the save.
Give Item
itemsAdds a specified quantity of an item directly to the player's inventory.
/c game.player.insert{name="iron-plate", count=20}Item names use internal snake-case IDs, not display names.
Remove Item
itemsRemoves a specified quantity of an item from the player's inventory.
/c game.player.remove_item{name="iron-plate", count=20}Clear Inventory
itemsEmpties the player's main inventory completely.
/c game.player.get_main_inventory().clear()
Research Specific Technology
researchInstantly completes a single named technology for the player's force.
/c game.player.force.technologies['automation'].researched = true
Research All Technologies
researchInstantly completes the entire technology tree for the player's force.
/c game.player.force.research_all_technologies()
Set Research Speed Multiplier
researchMultiplies the rate at which science packs progress research (does not affect production speed).
/c game.player.force.laboratory_speed_modifier = 2
Set Game Speed
worldChanges the overall simulation speed. 1 is normal speed; higher values speed up the game, lower values slow it down.
/c game.speed = 1
Reveal Map Area
worldReveals a square chunk of the map around the player without needing to physically explore it.
/c game.player.force.chart(game.player.surface, {{game.player.position.x - 500, game.player.position.y - 500}, {game.player.position.x + 500, game.player.position.y + 500}})Set Enemy Evolution Factor
enemiesDirectly sets the biter/spitter evolution factor, controlling how advanced enemy units and nests are.
/c game.forces.enemy.evolution_factor = 0.5
Kill All Enemy Units
enemiesDestroys every enemy unit on the current surface. Checks validity so mass clears do not error mid-loop.
/c for _, e in pairs(game.player.surface.find_entities_filtered{force="enemy", type="unit"}) do if e.valid then e.destroy() end endKill Enemies Near Player
enemiesDestroys all enemy-force entities (units, nests, worms, etc.) within a radius of the player.
/c for _, e in pairs(game.player.surface.find_entities_filtered{force="enemy", position=game.player.position, radius=50}) do if e.valid then e.destroy() end endUse destroy() + e.valid to avoid “LuaEntity was invalid” on large radii.
Toggle Peaceful Mode
enemiesWhen enabled, enemies will not attack unless provoked (attacked first or their pollution cloud is entered aggressively).
/c game.player.surface.peaceful_mode = true
Teleport Player
playerInstantly moves the player character to specified X/Y coordinates on the current surface.
/c game.player.teleport({0, 0})Toggle Player Invincibility
playerMakes the player character immune to damage.
/c game.player.character.destructible = false
Setting to false grants invincibility; true restores normal damage.
Toggle Vehicle Invincibility
playerMakes the vehicle you are currently driving (tank, car, spidertron, etc.) immune to damage.
/c game.player.vehicle.destructible = false
You must be in the vehicle when you run this. false = indestructible; true = normal damage. Does not change prototype max HP.
Heal Current Vehicle
playerRestores the vehicle you are driving to full prototype hit points (useful after combat or before locking invincibility).
/c game.player.vehicle.health = game.player.vehicle.prototype.max_health
Errors if you are not in a vehicle. Does not raise max HP beyond the prototype value.
Set Player Movement Speed
playerMultiplies the player character's base movement speed.
/c game.player.character_running_speed_modifier = 1
Set Character Inventory Slots Bonus
playerIncreases the number of extra inventory slots the player has beyond the base amount.
/c game.player.character_inventory_slots_bonus = 100
Toggle Map Editor
worldEnter Factorio's map editor so you can paint terrain, place/remove entities, and edit surfaces — including while you are already in remote view looking at another planet or platform.
/editor
Built-in command (not /c). Also Ctrl+Shift+F11. Works from remote view: open remote view (map), look at the surface you want, run /editor, then use Tools → Tiles in the top-left editor GUI to brush/paint terrain (Numpad +/- brush size). Run /editor again to exit. Disables achievements for the save.
Edit Terrain from Remote View
worldSame as Toggle Map Editor, catalogued for the remote-view use case: paint water, land, cliffs, and other tiles on the surface you are viewing without walking your character there.
/editor
1) Enter remote view and select the planet/platform. 2) Type /editor (or Ctrl+Shift+F11). 3) Tools tab → Tiles (or Entities / Resources as needed). 4) Left-click paint, right-click erase; hold Shift to paint over out-of-map tiles. 5) /editor again to leave. Lua equivalent: /c game.player.toggle_map_editor()
Clear Pollution on Surface
worldRemoves all pollution cloud values from the current surface, resetting evolution pressure from pollution.
/c game.player.surface.clear_pollution()
Spawn Extra Ore Patches
worldCreates brand-new circular resource patches at random positions (not a regenerate / same-seed refill). Optionally runs on every planet/surface.
/c do local patches=12 local scatter=2000 local size=8 local amount=2000 local ore="iron-ore" local surfaces if true then surfaces=game.surfaces else surfaces={game.player.surface} end for _, surface in pairs(surfaces) do if not string.find(surface.name, "platform", 1, true) then for _=1,patches do local a=math.random()*2*math.pi local d=math.random()*scatter local cx=math.floor(math.cos(a)*d+0.5) local cy=math.floor(math.sin(a)*d+0.5) for x=-size,size do for y=-size,size do if x*x+y*y<=size*size then surface.create_entity{name=ore, position={cx+x, cy+y}, amount=amount, force="neutral", raise_built=false} end end end end end end endSpawns new patches — does not follow map-gen seed. Skips space platforms. Re-run with different ores for mixed fields. Invalid tiles (water, etc.) are skipped silently. Large counts can hitch. Prefer solid ores; infinite resources (oil/geysers) need different commands.
Spawn Ore Patch At Feet
worldDrops a circular resource patch centered on your current position (stand where you want the ore).
/c do local p=game.player.position local s=game.player.surface local size=25 local amount=2000 local ore="iron-ore" for x=-size,size do for y=-size,size do if x*x+y*y<=size*size then s.create_entity{name=ore, position={p.x+x, p.y+y}, amount=amount, force="neutral", raise_built=false} end end end endLarge radii can hitch briefly. To undo, use Remove Ore Near Player.
Spawn Ore On Another Planet
worldScatters new ore patches on a named planet/surface without traveling there (remote drop).
/c do local s=game.surfaces["vulcanus"] if not s then error("Unknown surface: vulcanus") end local patches=20 local scatter=1500 local size=12 local amount=2000 local ore="calcite" local ox=0 local oy=0 for _=1,patches do local a=math.random()*2*math.pi local d=math.random()*scatter local cx=math.floor(ox+math.cos(a)*d+0.5) local cy=math.floor(oy+math.sin(a)*d+0.5) for dx=-size,size do for dy=-size,size do if dx*dx+dy*dy<=size*size then s.create_entity{name=ore, position={cx+dx, cy+dy}, amount=amount, force="neutral", raise_built=false} end end end end endSurface must already exist (you have visited / unlocked it). Wrong-planet ores still place if the prototype exists. Re-run per ore type for mixed drops.
Remove Ore Near Player
worldDeletes a chosen resource type within a radius — useful to undo a spawned patch.
/c for _, e in pairs(game.player.surface.find_entities_filtered{name="iron-ore", position=game.player.position, radius=50}) do if e.valid then e.destroy() end endEnrich Existing Resources
worldMultiplies the amount on every existing resource entity on all planets (juices current patches).
/c do local mult=5 for _, s in pairs(game.surfaces) do for _, e in pairs(s.find_entities_filtered{type="resource"}) do if e.valid then e.amount = math.min(e.amount * mult, 1000000000) end end end endDoes not create new patch locations — only increases yield on what already exists.
Boost Resource Map Density
worldRaises autoplace frequency/size/richness on all surfaces so future chunk generation (and regen) is denser/richer.
/c do local f=2 local sz=1.5 local r=3 for _, s in pairs(game.surfaces) do local m=s.map_gen_settings for _, c in pairs(m.autoplace_controls or {}) do if c.frequency then c.frequency=c.frequency*f end if c.size then c.size=c.size*sz end if c.richness then c.richness=c.richness*r end end s.map_gen_settings=m end endAffects newly generated chunks immediately. Explored areas keep old layout until you regenerate resources separately.
Enable or Disable Pollution
worldTurns the pollution system on or off entirely for the current surface.
/c game.map_settings.pollution.enabled = false
Spawn Entity At Player
entitiesCreates a specified entity (building, resource, etc.) at the player's current position.
/c game.player.surface.create_entity{name="iron-chest", position=game.player.position, force="player"}Print Elapsed Game Time
infoDisplays the total in-game time elapsed since the map started, in ticks.
/time
Built-in command, not a Lua /c command.
List Connected Players
infoDisplays a list of all players currently connected to the game.
/players
Built-in command, not a Lua /c command.
Toggle Map Editor (Lua)
playerLua equivalent of /editor — switches into (or out of) map editor so you can paint terrain and edit the world, including from remote view.
/c game.player.toggle_map_editor()
Prefer the built-in /editor command. After entering, use Tools → Tiles to modify terrain. Disables achievements for the save.