Console Commands
The following pages describe the commands available from the game console. Some console commands are supported by the Unreal Engine itself and should therefore work in all Unreal Engine versions, ie all games based on the engine. Other console commands are applicable only to a specifc game.
This set of pages aims to replace UT2003 Console, UnrealEd Console, and UnrealEd 2 Console (I may leave the UnrealEd console pages alone). In additition to the previous pages there is also a Console class which may be of use.
Getting to the Console
- To pop up the console, press ~ (tilde) or use the quick console (which displays a single line) that is available through the Tab key.
- Console commands are not case sensitive.
ADDBOTS
,addbots
andAddBots
work alike. - The distinction between UnrealScript, C++ and other console commands is a purely technical matter and doesn't affect how the commands work.
- UnrealScript console commands are handled by either the playerpawn's exec functions or by the exec functions of items in the playerpawn's inventory.
- Please see UnrealEd Console and UnrealEd 2 Console for editor-related console commands.
- Console commands can be bound to keys by editing the user.ini file.
Common Console Commands
- /General Console Commands – These console commands are typically used as additional key binds when playing games.
- /Admin Console Commands – These console commands cover admin style commands e.g. changing maps, kicking players, etc.
- /Client Only Console Commands – These console commands only work on the machine the command was entered on.
- /Debugging Console Commands – Commands useful for deugging. See also the admin and cheat sections.
- /Cheat Console Commands – This page covers all of the "cheat" console commands supported by the core Unreal Engine (for development purposes only – I mean, you wouldn't want to cheat really would you?). Console commands useful for testing maps are included in this section.
- /Stats Console Commands – This page covers all of the commands used for displaying statistics about the current game (e.g. FPS).
Game Specific Console Commands
- UT Console – This page covers all console commands specific to Unreal Tournament.
- UT2003 Console – This page covers all console commands specific to Unreal Tournament 2003.
- Devastation Console Commands – This page covers all console commands specific to Devastation.
- [America's Army] – This page covers all console commands specific to America's Army.
Unreal Editor Console Commands
- UnrealEd Console – For console commands relating to the most recent version of the Unreal Editor, for UT2003.
- UnrealEd 2 Console – For console commands relating to the version of the Unreal Editor that ships with Unreal Tournament.
Adding New Console Commands
Having access to the existing console commands is all very well. However sometimes you want to add your own console commands to support a specific feature within your game.
Console commands are identified within Unreal Script by prefixing the function definition with the exec keyword. An example is below
exec function MyConsoleCommand() { ... }
That's pretty much all there is to it. However, the exec directive only seems to work correctly when used within certain types of class. So far I've tested subclasses of GameInfo and PlayerPawn.