Developer Console

The **Developer Console** is a UI window which provides a history of the most recent event logs and also allows the player to issue commands or toggle some setting variables.

It is disabled by default, but can be enabled on PC by pressing:

* `Ctrl + Alt + `` for US/UK keyboards
* `Ctrl + Alt + Ö` for German keyboard
* `Ctrl + Alt + Ñ` for Spanish keyboard
* `Ctrl + Alt + ò` for Italian keyboard
* `Ctrl + Alt + ù` for French keyboard

After enabling, pressing the relevant key, e.g., ```, will toggle the window.

Console platforms cannot access the console.

Each command/variable may have various flags dictating in what context it can be used:

* None: no restrictions.
* ExecuteOnServer: the command will be executed by the game host, regardless of who invokes it. This is important for networking/syncing issues and may affect the output of the command, as the caller will be the host and not whoever issued the command.
* SenderMustBeServer: the command will be executed only if issued by the host.
* Archive: this saves the value of the variable in `/Config/config.cfg` in the Risk of Rain 2 data folder, from where it can be loaded next time.
* Cheat: cheats must be enabled.
* Engine: sets the current value to the default value. Only relevant for some internal mechanism.

Some useful commands are:

* `help`: see a full list of commands.
	+ `help {command_name}`: print the description of the specified command.
* `find {substring}`: find all commands matching the substring.
* `clear`: clear the console output.
* `max_messages`: increase the max lines of console log in case some output exceeds it and is effectively cropped.

Mods can also add their own commands.

## Notes

* The `cheats` variable does not internally update its value and is therefore permanently stuck to disabled. DebugToolkit is a mod which overrides the query for the variable value, effectively unlocking all commands.
* Even though `set_scene` has no flags, it does internally check if cheats are enabled to proceed.
* `ai_update_interval` refers to the minimum duration before the Enemy AI chooses a new behavior.
* `ai_draw_path` can give an insight into the pathing taken by an entity controlled by AI. The "CharacterMaster selector" can either be "me" or "nearest", but the former is pointless as the player is not controlled by AI. While the next argument is supposed to enable or disable the path drawing, the command actually ignores its value and simply toggles the setting for the selected target. However, the argument still needs to be provided.
* The arguments of `debug_draw_scene_nodegraph` are not described clearly for those without intimate knowledge of the game's internal mechanics. `shouldDraw` takes the values {0, 1} and means whether the specified nodegraph type will be shown or hidden. The `graphType` takes the values {0/Ground, 1/Air}, and `hullClassification` takes the values {0/Human, 1/Golem, 2/BeetleQueen} and refers to the size of the entity the node graph can accommodate. Whatever value is chosen, it will show all nodes that have a value equal or greater than the one provided. For example, to draw all ground nodes in an Environment use the arguments `1 0 0` and to disable them `0 0 0`.
* `create_object_from_resources` can spawn an object from the "Prefabs" directory, e.g., `create_object_from_resources "Prefabs/CharacterBodies/MagmaWormBody"`. Do note that not all objects will behave properly, as in the previous example the  spawns without its accompanied AI object and will therefore not go after the player. Any object that has no visible world model or visual effect will be invisible.
* `dump_object_info` is a fairly useless command. It requires the Instance ID of the relevant object, which can be obtained only from fetching the relevant object with modding. The info it provides is also very minimal, compared to what one can query once the object has been fetched.
* `print_stats` prints stats of the current run, e.g., which survivor is chosen, how long they have been alive, how many kills they have, how much damage they have taken from each enemy, etc. The output is very long but mostly superfluous, since it lists every single character (survivor and monster alike) that can be chosen. Changing `max_messages` is necessary to see the full output and the player is advised to then `clear` the console to avoid any lag while it is open.
* `set_vstr` does not work. "vstr" stands for *variable string* and is supposed to set aliases for commands, but the code always ignores them.
* `gamemode` can take the following inputs: ClassicRun, WeeklyRun, EclipseRun, and InfiniteTowerRun. The value is set accordingly when the player enters the respective game mode lobby and can effectively be overriden after entering the lobby and before starting the run. There are some game-breaking sequences involved here. For example, if the player enters a normal run lobby and then sets the gamemode to WeeklyRun, the run will behave like a Prismatic Trials run, but since the Artifacts are only selected when entering the lobby, there will be none. Similarly, entering the Eclipse lobby and then setting the gamemode to InfiniteTowerRun, will result to a Simulacrum run with the Eclipse difficulty of the selected survivor, since the selected "difficulty" is locked in when entering the lobby.
* `exec` can be used to compile a list of settings in a .cfg file for quick execution, but can also be used for a set of commands that the player may wish to invoke during a run repeatedly.