-
Notifications
You must be signed in to change notification settings - Fork 6
Built In Commands
This document describes the master branch, so commands may have been changed, added, or removed since the most recent release.
Creates a new command that calls one other commands. If no command is specified, then the alias is deleted.
name - The name of the new command.
command - A command to run, including command name and arguments. The group command may be used to execute multiple at once.
Executes a command such as creature and object at the specified position. This is ignored for most commands.
pos - The position to target. See Command Positions for more information.
command - A command to run, including command name and arguments. The group command may be used to execute multiple at once.
Gets or sets a config value for a BepInPlugin.
plugin_GUID - The GUID of the plugin to target.
section - The section of the plugin's config file to target.
key - The name of the config value to get or set.
new_value - The new value to set in the config file, or nothing to display the value.
Triggers one or more commands when a key event occurs.
keycode - The name of the key to bind to. This may be a key name or a value from the KeyCode enum.
event - The point in the key press that the commands should execute.
-
hold_down- Trigger each frame or update when the key is held down. -
hold_up- Trigger each frame or update when the key is not held down. -
down- Trigger the frame or update when the key is first pressed down. -
up- Trigger the frame or update when the key is first released.
timing - When in the game loop the commands should execute.
-
frame- Commands will execute between game frames. This works well withupanddownevents. -
update- Commands will execute every fixed-timestep update. This works well with all events, and should always be used withhold_downandhold_upevents when physics is involved.
command - A command to run, including command name and arguments. The group command may be used to execute multiple at once.
Clears the console.
Changes where in-game commands such as object and creature carry out their effects by default.
pos - The position to target. See Command Positions for more information.
Destroys all selected objects. Only available while in-game.
selector - Selects which objects to destroy. See Using Selectors for more information.
respawn - Whether or not creatures destroyed this way should respawn next cycle.
-
respawn- Creatures should respawn. -
no_respawn- Creatures should not respawn.
Plays the specified dream for the current save file. Only available while in a story game.
ID - The ID of the dream to play.
Writes the given lines to the Dev Console with the default text color.
line* - A line of text to be written to the console.
Switches to the main menu.
mode - Whether to use the normal fade transition or cut straight to the main menu.
-
request- Fade to the main menu. -
force- Cut to the main menu immediately. This may be less stable than usingrequest.
Changes the font of the console or lists all available fonts.
font_name - The name of the font to switch to, or nothing to list all fonts.
Changes the amount of food in one or all players' stomachs. Only available while in-game.
add_amount - The amount of food to add or subtract. Negative values may trigger graphical bugs when done at the same time as eating.
player - The player index to target, starting at 0. Omitting this targets all players.
Make the game over message appear, allowing the game to be restarted. This is particularly useful when an invulnerable player is destroyed.
Sets the game to run at the specified speed or outputs the current speed to console if no multiplier is provided.
speed_multiplier - A multiplier for the game speed. A value of 0 pauses the game and 1 sets it to the normal speed.
Executes multiple commands at once.
Surround commands in parenthesis to include arguments, like group "game_speed 0.5" "echo Slow enabled".
command* - A command to execute.
Outputs or changes the current health of selected creatures.
selector - Selects which creatures to inspect or modify. See Using Selectors for more information.
value - The new health value, typically between 0 and 1. Omitting this displays current health instead.
Outputs a short summary of each registered command to the console. This is split into pages so that no commands are hidden.
page - The page number to seek to.
Execute a static method from any loaded assembly.
method - A full path to a method made up of a namespace, type name, and method name, separated by periods. For example, DevConsole.GameConsole.WriteLine will write the following argument to the console.
arg* - An argument to pass to the method. This will be converted from a string to the corresponding parameter type to the best of the mod's ability. If all overloads fail to convert the arguments then nothing will be executed.
Prevents all slugcats from death or harm. This can lead to softlocks if the player is destroyed, such as by falling into a pit.
to - The type of harm players should be immune to.
-
death- Death is prevented. -
everything- Most forms of harm, including death, stun, drowning, and damage knockback, are prevented. -
nothing- Invulnerability is disabled.
Gets or sets the player's current karma level. This starts at 0 and ends at the karma cap. Other values are allowed but will likely cause errors. Only available while in-game.
value - The value to set the karma to, "reinforce" to toggle karma reinforcement, or nothing to print the current karma.
Gets or sets the player's maximum karma level. This normally starts at 4 and ends at 9. Other values are allowed but will likely cause errors. Only available while in-game.
value - The value to set the karma cap to or nothing to print the current karma cap.
Kills the selected creatures. Only available while in-game.
selector - Selects which objects to kill. See Using Selectors for more information.
Adds a velocity to the selected objects. Only available while in-game.
vel_x - The horizontal velocity to impart in pixels per update.
vel_y - The vertical velocity to impart in pixels per update.
selector - Selects which objects to accelerate. See Using Selectors for more information.
Toggles the player's ability to swim through air and phase through terrain.
Stuns and accelerates the selected objects towards the targeted position. Only available while in-game.
strength - The magnitude of acceleration in pixels per update.
selector - Selects which objects to accelerate. See Using Selectors for more information.
Stuns and accelerates the selected objects away from the targeted position. Only available while in-game.
strength - The magnitude of acceleration in pixels per update.
selector - Selects which objects to accelerate. See Using Selectors for more information.
Gets or manipulates the rain timer based on the given subcommand. Only available while in-game.
subcommand - The name of the subcommand to execute.
-
get- Retrieves the current rain timer and time until rain. -
set- Sets the current rain timer to the value ofarg. -
reset- Sets the current rain timer to 0. -
pause- Pauses or unpauses progression of the rain timer.
arg - An argument to pass to the subcommand.
Destroys all creatures in the currently loaded region. Only available while in-game.
respawn - Whether or not creatures destroyed this way should respawn next cycle.
-
respawn- Creatures should respawn. -
no_respawn- Creatures should not respawn.
Runs a command the given number of times.
count - The number of times to run the command.
command - A command to execute repeatedly. The group command may be used to execute multiple at once.
Destroys and respawns a player.
player - The player index to respawn, starting at 0.
Sets Watcher's ripple level.
subcommand - The name of the value to change. Omitting this prints all values.
-
current- The current ripple level. -
max- The highest ripple level. -
min- The lowest ripple level.
level - Set the ripple level to the given value. Omitting this prints the ripple level instead.
Toggles the display of Unity debug logs and errors to the Dev Console. Errors are dark red, assertions are orange, warnings are yellow, logs are white, and exceptions are red.
pause_on_error - If included, then the console will be opened and the game paused when an error occurs. Log messages of LogType Error, Assert, or Exception are classified as errors.
Executes one or more commands and suppresses Dev Console output for their duration. This is particularly useful for binds or aliases that would otherwise produce too much clutter in the console.
command - A command to execute silently. The group command may be used to execute multiple at once.
Spawns a creature or object by type.
type - The type of vanilla or MSC object to spawn. For modded objects, see spawn_raw
ID - The entity ID of the new object, formatted like ID.spawner.number or ID.spawner.number.seed. In most cases spawner will be -1 and seed will be omitted, like ID.-1.1234.
arg* - An argument that describes the spawned object. Many objects have different arguments, so check autocomplete for usage.
Some objects have IDs that do not match their common names, or are sub-categories of an object:
LTTM Neuron - SLOracleSwarmer
5P Neuron - SSOracleSwarmer
Explosive Spear - Spear explosive
Electric Spear - Spear electric
Grenade - ScavengerBomb
Batnip - FlyLure
Cherrybomb - FirecrackerPlant
Blue Fruit - DangleFruit
In-game IDs for objects can be found on the Rain World Wiki under "Code name" on each object page.
Spawns a creature or object by abstract class. This is more versatile than spawn, but is more complex and more likely to cause errors.
class - The subclass of AbstractPhysicalObject to instantiate, or "scan" to search loaded assemblies for these classes.
ID - The entity ID of the new object, formatted like ID.spawner.number or ID.spawner.number.seed. In most cases spawner will be -1 and seed will be omitted, like ID.-1.1234.
arg* - An argument passed to the constructor. These will be in the same order as the constructor's parameters, but some arguments (e.g. those with types World, PhysicalObject, or EntityID) will be automatically filled.
Stuns all selected creatures.
duration - The length of the stun in ticks, or 1/40th of a second.
selector - Selects which objects to stun. See Using Selectors for more information.
Toggles the neuron glow for all players in a story game session. Only available while in-game.
Toggles the mark of communication for all players in a story game session. Only available while in-game.
Throws an exception. This is useless unless you're testing exception handling in the Dev Console.
message - A message to pass to the exception's constructor.
Teleports the selected objects to the targeted position. Only available while in-game.
selector - Selects which objects to teleport. See Using Selectors for more information.
Removes one or more previously bound commands. If no commands are specified then all commands bound to the given key will be removed.
keycode - See bind's keycode parameter.
event - See bind's event parameter. Omitting this will cause binds to be removed regardless of event type.
timing - See bind's timing parameter. Omitting this will cause binds to be removed regardless of timing.
command - The command to unbind from the key. Omitting this will cause binds to be removed regardless of command.
Removes all keybinds.
Locks or unlocks a multiplayer token, which can correspond to either a set of levels or a sandbox creature.
subcommand - The name of the subcommand to execute.
-
list- Write a list of all unlock IDs to the console. -
give- Unlock the token with the given ID. -
take- Lock the token with the given ID.
ID - The ID of the token to unlock. This may be from MultiplayerUnlocks.SandboxUnlockID or MultiplayerUnlocks.LevelUnlockID.