CommandMode: Difference between revisions

From The Battle for Wesnoth Wiki
Ivanovic (talk | contribs)
Make sites formating correct again. Please could someone have a look at the italic parts?
 
Ardonik (talk | contribs)
Bullets -> dl + dt + dd; had a look at the italic parts
Line 5: Line 5:


Several vi-like commands are available in command mode. They are defined in ''playturn.cpp'' in the ''turn_info::do_command()'' function:
Several vi-like commands are available in command mode. They are defined in ''playturn.cpp'' in the ''turn_info::do_command()'' function:
* ''':q|| or ||:q!''' quit the scenario (without prompting)
;<nowiki>:q or :q!</nowiki>
* ''':w''' save the game (without prompting)
:quit the scenario (without prompting)
* ''':wq''' save the game and quit the scenario (without prompting)
;<nowiki>:w</nowiki>
* ''':refresh''' redraw the screen
:save the game (without prompting)
* ''':droid side''' toggle player on side between human and AI players
;<nowiki>:wq</nowiki>
* ''':kick''' kick a user in multiplayer. They will be able to rejoin the game. Generally a friendly way to remove someone who is having connection or other difficulties.
:save the game and quit the scenario (without prompting)
* ''':ban''' kick and ban a user in multiplayer, and the IP address used by that username
;<nowiki>:refresh</nowiki>
* ''':control ''side'' ''player//''' change the controller for ''side'' to ''player''
:redraw the screen
* ''':clear''' clear chat messages
;<nowiki>:droid</nowiki> ''side''
* ''':debug''' switch debug mode on
:toggle player on side between human and AI players
* ''':debug off''' switch debug mode off
;<nowiki>:kick</nowiki> ''username''
* ''':theme''' bring up theme selection menu
:kick a user in multiplayer. They will be able to rejoin the game. Generally a friendly way to remove someone who is having connection or other difficulties.
;<nowiki>:ban</nowiki> ''username''
:kick and ban a user in multiplayer, and the IP address used by that username
;<nowiki>:control</nowiki> ''side'' ''player''
:change the controller for ''side'' to ''player''
;<nowiki>:clear</nowiki>
:clear chat messages
;<nowiki>:debug</nowiki>
:switch debug mode on (does not work in multiplayer)
;<nowiki>:debug</nowiki> off
:switch debug mode off
;<nowiki>:theme</nowiki>
:bring up theme selection menu


[[DebugMode]] enables additional commands in command mode:
[[DebugMode]] enables additional commands in command mode:
* ''':n''' skip to next scenario by triggering a win event
 
* ''':gold ''amount//''' add ''amount'' gold to the current player's side
;<nowiki>:n</nowiki>
* ''':create ''unit_type''''' create a unit of type specified at last selected hex
:skip to next scenario by triggering a win event
* ''':unit ''attribute//=//value''''' when a unit is selected, this will set the unit's ''attribute'' to ''value''. See [[SingleUnitWML]] for possible values.
;<nowiki>:gold</nowiki> ''amount''
:add ''amount'' gold to the current player's side
;<nowiki>:create</nowiki> ''unit_type''
:create a unit of type specified at last selected hex
;<nowiki>:unit</nowiki> ''attribute=value''
:when a unit is selected, this will set the unit's ''attribute'' to ''value''.  
 
See [[SingleUnitWML]] for possible values.


== See Also ==
== See Also ==

Revision as of 15:56, 14 August 2005

Command Mode

You can access command mode by typing ' : ' in a single player or multiplayer scenario. More accurately, you need to type shift - semicolon( ; ). However this isn't possible on all keyboards; if your keyboard doesn't have ':' above ';' you can change the hotkey in the Preferences, or you could edit game.cfg by hand.'

Several vi-like commands are available in command mode. They are defined in playturn.cpp in the turn_info::do_command() function:

:q or :q!
quit the scenario (without prompting)
:w
save the game (without prompting)
:wq
save the game and quit the scenario (without prompting)
:refresh
redraw the screen
:droid side
toggle player on side between human and AI players
:kick username
kick a user in multiplayer. They will be able to rejoin the game. Generally a friendly way to remove someone who is having connection or other difficulties.
:ban username
kick and ban a user in multiplayer, and the IP address used by that username
:control side player
change the controller for side to player
:clear
clear chat messages
:debug
switch debug mode on (does not work in multiplayer)
:debug off
switch debug mode off
:theme
bring up theme selection menu

DebugMode enables additional commands in command mode:

:n
skip to next scenario by triggering a win event
:gold amount
add amount gold to the current player's side
:create unit_type
create a unit of type specified at last selected hex
:unit attribute=value
when a unit is selected, this will set the unit's attribute to value.

See SingleUnitWML for possible values.

See Also

This page was last edited on 14 August 2005, at 15:56.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.