Factorio Console Commands & Cheats

Factorio is the kind of game that offers a ton of options by default without having to rely on mods and cheats. But, if you’ve got everything that’s necessary on your fingertips, why not take advantage of it? 

Just by knowing the right Factorio Console Commands, a bunch of new opportunities and options will unfold before you. 

With that said, we’d highly recommend keeping a backup of the game – just to be safe. After all, commands can, and they will break your game at some point. So, careful with that. 

How to Enable the Console on Factorio

The console is actually enabled by default. So, all you need to do is open it, insert the command of your choice, and that’s about it. 

This can be done by using the tilde “~” button. And if that doesn’t work, try using “`” instead. The symbol differs from keyboard to keyboard, depending on language and layout. But, in the end, it’s almost always found below the “ESC” button and right next to “1”. 

Other than that, the slash “/” button should also work. And if nothing works out for you, then try going to the options menu and checking out the controls. Maybe you accidentally changed the hotkey. 

Factorio Console Commands and Cheats

Let’s start with some of the most popular commands and cheats that are in demand. Things like god mode, speed improvements, and more. 

/cheat <all>: Researches all technologies while also enabling cheat mode

/c game.player.character=nil: Enables god mode (Basically makes you invincible)

/c game.player.teleport({0, 0}): Teleports you to the specified location

/c game.player.force.manual_mining_speed_modifier=1000: Makes you mine faster

/c game.player.force.manual_crafting_speed_modifier=1000: Makes you craft faster

/c game.player.cheat_mode = true or /c game.player.cheat_mode = false: Enables or disables infinite resources

/c game.player.force.research_all_technologies(): Immediately researches and unlocks all technologies

/c game.player.force.laboratory_speed_modifier=1000: Enables faster research

/c game.player.force.reset(): Resets your force

/c game.player.game_view_settings.show_rail_block_visualisation = true/false: Enables or disables rail block visualization (Staying on at all times)

/c game.player.surface.always_day=true/false: Make it so that it’s always daytime

/c game.speed=[Value]: Changes the game speed

/c game.player.surface.clear_pollution(): Instantly removes all pollution

/c for _, surface in pairs(game.surfaces) do

  surface.clear_pollution()

end

game.map_settings.pollution.enabled = false: Completely disables pollution

/c game.player.force.friendly_fire = false: Disables friendly fire (Only for your force)

/c for name, recipe in pairs(game.player.force.recipes) do recipe.enabled = true end: Enables all recipes

/c local reach = [Value]: Allows you to set the interaction distance (Useful for very long interactions). The default value is 10

/c game.local_player.insert{name=”ITEM”, count=X}: Gives you the specified item (Count=X sets the quantity)

/c surface = game.player.surface

for _, ore in pairs(surface.find_entities_filtered({type=”resource”})) do

    ore.amount = 10000

end: Refills all resources in the map

Multiplayer/Server Commands

Anything that’s related to multiplayer. Most of these commands are especially useful for server admins who are new to this sort of thing. 

<message>: Leaves a message on the chat

/admin: Opens the admin GUI

/admins: Displays a list of the current admins

/ban [Player] [Optional Reason]: Bans the specified player. Do keep in mind that leaving a reason is usually optional

/unban [Player]: Lifts the ban from the specified player

/banlist get: Shows a list of banned people

/demote [Player]: Takes away Admin permissions (Demotes) from the specified player

/ignore [Player]: Hides any text messages from the specified player

/unignore [Player]: Reverses the effects of /ignore

/mute [Player]: Mutes the specified player (Admin only)

/unmute [Player]: Reverses the effects of /mute

/mutes: Lists all players that have been muted

/open [Player]: Opens another player’s inventory (Admin only)

/promote [Player]: Makes the specified player an admin 

/purge [Player]: Clears all the messages from the specified player

/swap-players [Player]: Swaps your character with the specified player’s character

/whitelist get: Displays a list of all whitelisted players

/whitelist add [Player]: Adds the specified player to the whitelist

/whitelist remove [Player]: Removes the specified player from the whitelist

/whitelist clear: Clers the whitelist

AI and World-Related Commands

Anything that has to do with AI and the world. 

/c game.forces[“enemy”].kill_all_units(): Kills all biters (Not spawners)

/c local surface=game.player.surface

for key, entity in pairs(surface.find_entities_filtered({force=”enemy”})) do

entity.destroy()

end: Kills all biters, worms, and bases. Pretty much everything that is considered an enemy

/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

entity.destroy()

 end

game.player.print(cnt): Only kills nearby enemies. You can change the radius to your preference. 250, which is the default, is about two zoomed-out screens at 1080P

/c game.player.surface.peaceful_mode = true/false: Enables or disables peaceful mode – meaning that biters won’t attack you unless provoked

/c local radius=150

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}}): Reveals the map around you. The radius can be adjusted to your liking

/c local surface = game.player.surface

local force = game.player.force

for chunk in surface.get_chunks() do

  force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)

end: Has the opposite effect of revealing a map

/c game.player.force.chart_all(): Reveals all of the generated map to you and your team

Wrapping Up

That’s all for now. If you feel like we forgot to mention an important/useful command, then let us know about it in the comments. 

That being said, there a few more commands to play with than the ones that we’ve already listed. But, we decided to only mention the ones that most people find useful in order to keep the article short and sweet. 

Once more, we highly recommend keeping a backup of the game before starting to mess around with commands – just to be safe. 

Leave a Comment