Debug Commands

Oxygen Not Included features a Debug Menu capable of viewing and generating reports of data as well as exploiting and cheating (for those who wish to use it in this way). If debugging lacks a capability, then you need try the save file editor Duplicity.

One issue is the loss of game elements such as geysers due to point of interest buildings, and the debug commands can be used to "patch" a world seed that was unfortunate enough to lose game elements in this way. This is not necessarily cheating but rather allowing a player to continue as if they had a normal seed.

The Debug Menu is also currently the only stable means of patching new content into game worlds that have been generated prior to the content updates that introduce them, and which did not enable Sandbox mode.

* However, only loose materials can be spawned. Things like plants and critters cannot be directly created, at least not without Sandbox Mode enabled.

## Activating Debug Menu

Currently, the Debug Menu is ***not activated by default*** and must be enabled. Below is the steps necessary to allow access to the menu.

### Using The Debug File

1. Create a text file anywhere on your computer and save the file name as *debug\_enable (if you have file extensions enabled, save it as debug\_enable.txt)*. The file doesn't need any content, it's just the name that matters.
2. Find the installation folder/directory for Oxygen Not Included. (Steam Users can find their files by right-clicking and viewing the properties of Oxygen Not Included in their library, then navigating to "Local Files" and "Browse Local Files".)
	* For Windows and Linux users, move "debug\_enable.txt" inside the same folder where the executable is located ("OxygenNotIncluded.exe" on Windows, "OxygenNotIncluded" on Linux).
	* For Mac OS users, open the application bundle by right-clicking and then selecting "Open Package Contents". Place "debug\_enable.txt" inside the "Contents" folder.
3. Restart Oxygen Not Included and start a game. (New games are advised, but the menu works on old saves too.)

### Temporary Cheat Code

This method allows you to access debug mode temporarily without creating a file or restarting the game. Access will last until the game is closed.

1. Go to the main menu (Just loading the game brings you there, or you can quit to the main menu from a save)
2. Type the letters `KLEIPLAY` in order
3. You can check that it worked because it will append a '-D' to the build number shown on the bottom left of the screen.
4. Debug mode is activated until you close the game completely

## Debug Menu Effects

Enabling debug mode allows certain things to be done. On macOS `Ctrl+Fn` is taken by the OS so use `Cmd+Ctrl+Fn` instead.

### Dev Generator

Debug mode being enabled unlocks the Dev Generator, a building that produces a large amount of power with no inputs or duplicant work. This is frequently useful for testing systems in a test world without needing to set up a proper power source.

### Primary debugging mode (Backspace)

The primary debugging mode is turned on and off with Backspace (the first time it's turned on after loading a game it might take a few seconds to appear, depending upon the speed of your computer). This mode does the following:

* Turns off fog-of-war.
* Lets you zoom out as far as you want.
* Allows you to "paint" solids, liquids and gases. (Painting replaces existing matter with the new matter you intend to paint)
* Lets you copy/paste areas of a world, including buildings with their settings/contents and critters, but not including dupes.
* Lets you save areas of a world as a template file, then later load and paste the template.

### Debug Instant Build Mode (Ctrl+F4)

Toggling this mode on has several effects:

* When you place an order for something to be built it will appear instantly without using up any existing resources.
* All building and construction types become available, even if they haven't been researched yet.
* Any new dig orders will dig out the blocks instantly, though if the game is paused you'll have to unpause for it to take effect.
* For any buildings where you can queue up orders for items to be produced (Microbe Musher, Apothecary, etc), queuing up and order with "+1" will cause the request item to be instantly produced, even if the building is receiving no power.
* Duplicants can be assigned any Skill, even if they don't meet the requirements for the skill, and will retain that skill after Instant Build Mode is toggled off.
* If you select a Research subject that hasn't yet been fully researched it will become fully researched, along with any prerequisite research subject. These research subjects will stay fully researched after Instant Build Mode is toggled off.

### Debug Teleport (Alt+Q)

Teleports the selected dupe, critter, plant or building to the location of the mouse cursor.

### Debug Spawn Duplicant (Ctrl+F2)

Spawns a new randomly generated dupe at the location of the mouse cursor.

### Debug Ultra Test Mode (Ctrl+U)

Toggling this mode on makes the game run as fast as your computer's CPU can handle.

### Debug Invincible (ALT+F7)

Toggling this mode on will make your dupes invincible.