Skip to main content

Factorio console commands guide: world editor, game speed, god mode, and more

Taking automation to a whole new level

Using Factorio's in-game console, players can do just about anything they could ever want to do in this marvellously addictive factory management game. From modifying the world around them to controlling the spread of biters, from instant teleporting to increasing your inventory size, from adjusting the game speed to enabling instant crafting of items, our Factorio console commands guide will show you exactly how to use all the most useful and powerful cheats in the game.

Watch on YouTube

Factorio console commands

There's a simply colossal number of ways in which you can change your Factorio game using the in-game console. But we're both busy people, so I'm just going to lay out the most useful and frequently used cheats for you below.

How to use the Factorio console

To access Factorio's console, all you have to do is hit the "/" key while in-world. If this doesn't work, you can check (or assign) which key to press by opening the menu and navigating to Settings->Controls->Basic Interaction->Toggle chat (and Lua console).

For a list of basic commands, simply type "/help" into the console, and you'll be given a list of possible commands that you can type in. However, if you're after cheats, what you're really after is the "/command" command (which you can abbreviate to just "/c").

Please note: using the "/c" command will disable all achievements for your Factorio world, so make sure this is what you want to do before committing.

You can find the key that opens the Factorio console in the Settings menu.

Now let's take a closer look at the most useful console commands in Factorio.

Player console commands

These Factorio cheats directly affect the player, allowing you to quickly move around and expand your manual capabilities.

Teleport player

  • Function: teleports the player to the specified coordinates.
  • Syntax/Example:

    /c game.player.teleport([x],[y])

Mine faster

  • Function: increases (or decreases) your manual mining speed.
    0 = 100%, 1 = 200%, 2 = 300%, etc.
  • Syntax/Example:

    /c game.player.force.manual_mining_speed_modifier=100

Craft faster

  • Function: increases (or decreases) your manual crafting speed.
    0 = 100%, 1 = 200%, 2 = 300%, etc.
  • Syntax/Example:

    /c game.player.force.manual_crafting_speed_modifier=100

Increase player reach

  • Function: increases the maximum reach distance of the player (how near you have to be in order to interact with or place an object). Default is 10.
  • Syntax/Example:

    /c local reach = 500
    game.player.force.character_build_distance_bonus = reach
    game.player.force.character_reach_distance_bonus = reach

Inventory console commands

Become a master of the inventory with these Factorio inventory-focused console commands.

Enable Cheat Mode

  • Function: enables or disables Cheat Mode. Cheat Mode allows free and instant crafting of any item.
    Replace "true" with "false" to disable.
  • Syntax/Example:

    /c game.player.cheat_mode=true

Add item to inventory

  • Function: Adds the specified item to your inventory.
    You can find a list of item IDs here.
  • Syntax/Example:

    /c game.player.insert{name="infinity-chest", count=100}

Increase inventory size

  • Function: increases your inventory size by adding the specified number of inventory slots.
  • Syntax/Example:

    /c game.player.force.character_inventory_slots_bonus=80

Enemy console commands

Control the spread of Biters in your Factorio world using these commands.

Enable Peaceful Mode

  • Function: enables or disables Peaceful Mode. While Peaceful Mode is enabled, Biters won't attack you until provoked.
    Replace "true" with "false" to disable.
  • Syntax/Example:

    /c game.player.surface.peaceful_mode=true

Disable Biter Evolution

  • Function: disables Biter Evolution by both time (first command) and pollution (second command).
  • Syntax/Example:

    /c game.map_settings.enemy_evolution.time_factor=0
    /c game.map_settings.enemy_evolution.pollution_factor=0

Disable Biter Expansion

  • Function: enables or disables Biter Expansion.
    Replace "false" with "true" to enable.
  • Syntax/Example:

    /c game.map_settings.enemy_expansion.enabled=false

Kill all enemies

  • Function: kills all enemies in the explored world.
  • Syntax/Example:

    /c game.forces["enemy"].kill_all_units()

Kill nearby enemies

  • Function: kills all enemy units (biters and nest structures) within the specified radius from the player.
  • Syntax/Example:

    /c local surface=game.player.surface
    local pp = game.player.position
    local cnt = 0
    for key, entity in pairs(surface.find_entities_filtered({force="enemy", radius=250, position=pp })) do
    cnt = cnt+1

Set Biter evolution factor

  • Function: sets the Biter evolution factor.
    Minimum is 0, maximum is 1.
  • Syntax/Example:

    /c game.forces["enemy"].evolution_factor=0

World console commands

From altering the time of day and speed of time to changing the very terrain around you, these powerful commands will allow you to sculpt your perfect Factorio experience.

Enable the map editor

  • Function: toggles the map editor overlay, allowing you to alter the terrain.
  • Syntax/Example:


Reveal the map around the player

  • Function: explores chunks in a radius around the player, much like a Radar does.
  • Syntax/Example:

    /c local radius=1000
    game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})

Eternal daytime

  • Function: locks the time of day to always daytime.
    Replace "true" with "false" to disable.
  • Syntax/Example:

    /c game.player.surface.always_day=true

Change game speed

  • Function: Alters the speed at which the game engine runs.
    1 = 100%, 2 = 200%, 3 = 300%, etc.
  • Syntax/Example:

    /c game.speed=2

Remove pollution

  • Function: removes all existing pollution in the world.
  • Syntax/Example:

    /c game.player.surface.clear_pollution()

Turn off pollution

  • Function: enables or disables pollution.
    Replace "false" with "true" to enable.
  • Syntax/Example:

    /c game.map_settings.pollution.enabled=false

Research console commands

Unlock all technologies or just making researching a lot quicker and easier with these commands.

Research all technologies

  • Function: research all technologies.
  • Syntax/Example:

    /c game.player.force.research_all_technologies()

Unlock all recipes

  • Function: enables all recipes.
  • Syntax/Example:

    /c for name, recipe in pairs( do recipe.enabled = true end

Research specific technology

  • Function: researches the specified technology.
  • Syntax/Example:

    /c game.player.force.technologies['steel-processing'].researched=true

Increase research speed

  • Function: increases your research speed.
    1 = 100%, 2 = 200%, 3 = 300%, etc.
  • Syntax/Example:

    /c game.player.force.laboratory_speed_modifier=2

And with that, we've illustrated all the most useful Factorio console commands that we've found. Hopefully you found the above list useful. It might also be worth checking below for any other Factorio guides that take your fancy.

Read this next