WoW:Console: Difference between revisions

No edit summary
No edit summary
 
(8 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|Commands]] without having to quit the game.
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 Command is a whitespace-less string that can be associated with a function. The Command may or may not have a help message, and it may have a [[#Categories|Category number]] that controls its placement when displayed by the [[WoW:help (Console command)|help command]].
A command is a whitespace-less string associated with various attributes:


A Command is a function associated with a string that contains no whitespace. The function accepts the name of the command as a string, as well as an optional argument string. For example, running the following command:
* 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>
RUN commandname "with argument"
commandname "with argument"
</pre>
</pre>


Line 20: Line 22:
}
}
</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 ===
=== Categories ===


Every [[#Commands|Command]] or [[WoW:CVar|CVar]] belongs to a category number.
Every command or [[WoW:CVar|CVar]] belongs to a category number.


== WTF Files ==
== WTF Files ==


Configurations are persisted across game sessions using .WTF (Warcraft Text File?) 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.
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, which rejects every line that does not begin with the [[WoW:set (Console command)|set command]]).
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.
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 ==
== Usage ==