WoW:Console: Difference between revisions
No edit summary |
No edit summary |
||
| (15 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
The console is fundamental to the entire engine. It determines how the [[WoW:GxApi|Graphics API]] is initialized, controls how [[WoW:CVar|configurations]] are set, and allows many features to be toggled or adjusted using [[WoW:Console#Commands| | The console is fundamental to the entire World of Warcraft engine. It determines how the [[WoW:GxApi|Graphics API]] is initialized, controls how [[WoW:CVar|configurations]] are set, and allows many features to be toggled or adjusted using [[WoW:Console#Commands|commands]] without having to quit the game. | ||
== Commands == | == Commands == | ||
A | A command is a whitespace-less string associated with various attributes: | ||
A | * A function: | ||
The function accepts the name of the command as a string, as well as an optional argument string. For example, running the following command: | |||
<pre> | <pre> | ||
commandname "with argument" | |||
</pre> | </pre> | ||
| Line 21: | Line 23: | ||
</pre> | </pre> | ||
=== | * A [[#Categories|category number]] | ||
Determines the placement of the command when displayed using [[WoW:help (Console command)|help command]]. | |||
* Help text | |||
This is left empty in most cases. It describes how to use the command, and is shown by the [[WoW:help (Console command)|help command]]. | |||
=== Categories === | |||
Every command or [[WoW:CVar|CVar]] belongs to a category number. | |||
== WTF Files == | |||
Configurations are persisted across game sessions using WTF (Warcraft Text File?) files. | |||
Each WTF is a text file, containing only [[#Commands|commands]] separated by a <code>\r\n</code>, or CRLF sequence. | |||
Differently named WTFs may interpret specific commands only, such as Config.wtf, and realmlist.wtf which reject every line that does not begin with the [[WoW:set (Console command)|set command]]. | |||
Config.wtf is loaded by the client immediately at startup, and saved during graceful shutdown. It contains every non-default [[WoW:CVar|CVar]] set by the client. | |||
== Usage == | |||
To enable the console, the client must be specially launched using the <code>-console</code> command-line argument. | |||
To use the console, simply press the tilde (~) key at the top-left of your keyboard to show the draggable console screen. | |||
== Screen == | |||
The screen is customizable using several CVars. | |||
Latest revision as of 03:04, 16 June 2025
The console is fundamental to the entire World of Warcraft engine. It determines how the Graphics API is initialized, controls how configurations are set, and allows many features to be toggled or adjusted using commands without having to quit the game.
Commands
A command is a whitespace-less string associated with various attributes:
- A function:
The function accepts the name of the command as a string, as well as an optional argument string. For example, running the following command:
commandname "with argument"
will dispatch a handler function:
int32 handler(const char* command, const char* argument) {
print(command); // "commandname"
print(argument); // "with argument"
return 1; // boolean, 1 means the command succeeded
}
Determines the placement of the command when displayed using help command.
- Help text
This is left empty in most cases. It describes how to use the command, and is shown by the help command.
Categories
Every command or CVar belongs to a category number.
WTF Files
Configurations are persisted across game sessions using WTF (Warcraft Text File?) files.
Each WTF is a text file, containing only commands separated by a \r\n, or CRLF sequence.
Differently named WTFs may interpret specific commands only, such as Config.wtf, and realmlist.wtf which reject every line that does not begin with the set command.
Config.wtf is loaded by the client immediately at startup, and saved during graceful shutdown. It contains every non-default CVar set by the client.
Usage
To enable the console, the client must be specially launched using the -console command-line argument.
To use the console, simply press the tilde (~) key at the top-left of your keyboard to show the draggable console screen.
Screen
The screen is customizable using several CVars.