Command Prompt

The command prompt, aka developer console, is a developer feature available on PC that is used for debugging, cheating or simple modding. It is also the system that logs a lot of game events to a text file, allowing for debugging even after the game was already closed.

Using the command prompt might cause achievements to be disabled.

By default the command prompt can be accessed via the F1 key on your keyboard.

## How-To

To open the command prompt you have to press F1.

After entering a command or cheat confirm by pressing Enter. The command/cheat will be executed.

All commands are one word but might accept or require additional parameters which can be supplied by leaving a simple space character between the command (or previous parameters) and the parameter. Use quotation marks to allow spaces within a string parameter.

Examples
```
volume

```

```
volume 0.5

```

```
volume 0.5 0 1 0.8

```

## Controls

By default the console can be opened by pressing F1. The console key can be remapped either by changing the [controls]/console\_key value in the settings.ini to the desired key id. (To find the key id simply use the command 'getkeyid')

Enter commands using the keyboard and confirm by pressing the enter key (also known as return key). You can use the arrow keys to move the cursor within the command input line. You cannot select certain parts of the input line text, but you can select everything by pressing Ctrl+A.

## Advanced Features

### Set/Get variables

If a variable is correctly hooked it can be set or read directly from the command prompt.

To hook a variable it is important to spell it exactly as it is stored in the game. Then just execute it as a command. The value of the variable will be returned, or if a parameter is supplied the variable will be set to the parameter's value. For example:

```
enemies_follow_through_levels

```

```
enemies_follow_through_levels 0

```

This feature alone is usually not very useful because, especially global, variables will be managed by the game and setting their value is usually not enough to achieve the desired result. If it makes sense to modify certain values there is usually a special command available. Some commands will also return the value of a variable but not actually hook it, therefore setting the variable by supplying a parameter to the command will not work.

However, this feature combined with instance hooking is very powerful.

### Instance hook

The developer console allows the user to access variables in game objects or run simply commands directly on game objects. This can be done either on an instance-level (only one instance of a game object is affected) or on an object-level (where all active instances of a certain object time will be affected).

Usually a dot character is used to hook an instance/object. For example:

```
player.x

```

Instance hooks will also use advanced evaluation. In the example above player is not actually a valid instance id and also no valid object id. Usually instance and object ids are simple integer values (big values like 125555 = instance id, small values like 42 = object id). The player keyword will be evaluated to return the id of the first player instance.

### Advanced evaluation

The developer console supports a lot of commands but also text-parsing where nested, mathematical statements will be calculated and simple, possibly nested, secondary commands will be evaluated. These statements can usually be used as parameters in other commands. This allows statements such as:

Advanced Evaluation Examples
```
5+5

```

```
5+12*(5+2)

```

```
player.x+50

```

```
player.x player.x+50

```

```
global.weapon[0,0]

```
The global accessor indicates a global variable. You can imagine global to be an persistent instance. The global.weapon array holds basic information about all weapons in the game. Where x is the weapon id and y is the type of information. y can be 0-30. 0 being the name of the weapon. The first weapon in the game is the revolver, therefore [0,0] returns "Revolver" (unless your game is running in a different language)

## Common Commands

Some commands have alternative inputs that result in the same command. In the following table one command equals one line. No commands are entered over multiple lines. Commands are always supposed to be one-liners.

For a list of commands that are primarily used for cheating see the cheat command list.

```
commands

```

```
volume [master] [music] [sfx] [ambient]

```

## Scripting

With Update 1.1 Colt Canyon received scripting support. This means developer console commands can be written in a text file which can then be executed through the console with the "run" command. Automatic script execution is also supported allowing for surprisingly powerful modding support.

To find out more details on modding please read the scripting guideline.

## Trivia

Adding a question mark (?) in front of a command will debug the input. Adding a question mark after a command will print additional information about the command.

Some variables or commands are blocked and cannot be used in public builds.