cmdlist |
list all commands |
|
exec |
|
|
echo |
string |
echo string to the console |
alias |
|
|
wait |
|
|
set |
cvar_name value |
set cvar_name to value |
copy |
cvar1 cvar2 |
copy cvar1 to cvar2 |
cvarlist |
list all cvars |
|
bind |
key command |
bind a key to a command |
unbind |
key |
remove commands from key |
unbindall |
remove commands from all keys |
|
bindlist |
show commands bound to each key |
|
path |
show current search path & links |
|
link |
from to |
|
dir |
search_pattern |
show files in current path which match search pattern (default pattern is “*”) |
z_stats |
show stats for Z malloc system |
|
error |
message |
shut down with message |
Server Commands |
||
heartbeat |
|
|
kick |
userid |
kick a user off the server |
status |
|
|
serverinfo |
show status of server |
|
dumpuser |
userid |
show all a users info strings |
map |
mapname |
load a map without any savegame archiving, for devs only |
gamemap |
mapname |
Saves current map and loads new one. If the
initial character of the map string is '*', the next map is in a
new unit, so the current savegame directory is cleared of map
files. Example: |
setmaster |
list_of_hosts |
may be specified as name or ip, and port number may be appended |
serverrecord |
demoname |
start recording |
serverstop |
stop recording |
|
save |
directory |
In quake2, this command saves a game. In UFOAI it does nothing. |
load |
directory |
load saved game |
killserver |
shutdown the server, close network sockets |
|
sv |
causes execution of ge->ServerCommand() |
|
Console Commands |
||
toggleconsole |
turn console on/off |
|
togglechat |
turn chat on/off |
|
messagesay |
send message |
|
messagesayteam |
send message to the team |
|
messagemenu |
|
|
clear |
clear the console window |
|
condump |
filename |
dump the console window to filename |
Sound Commands |
||
play |
list of wav files |
play one or more wav files, consecutively |
stopsound |
stop the sound |
|
soundlist |
|
|
soundinfo |
show information about the sound interface |
|
ov_play |
filename |
play specified ogg file |
ov_start |
start playing ogg file indicated by cvar “music” |
|
ov_stop |
stop playing ogg music/file |
|
modifykhz |
|
|
Video Commands |
||
vid_restart |
restarts the video system |
|
imagelist |
print a list of images (textures) currently loaded, eg: ]imagelist ------------------ S 8 8 RGB: ***particl W 8 8 RGB: ***r_notextur P 128 128 RGB: pics/conchars P 32 32 RGB: pics/sfx/shadow P 128 128 RGB: pics/f_small P 256 256 RGB: pics/f_big The letters in the first column represent the image type: it_skin “M”, it_sprite “S”, it_wall “W”, it_pic “P”. The numbers are width and height. |
|
screenshot |
Take a screenshot. Will be placed in $GAMEDIR/scrnshot |
|
modellist |
Show information about loaded models (images of type it_skin) |
|
gl_strings |
show OpenGL info |
|
viewpos |
display cl.refdef.vieworg and cl.refdef.viewangles[YAW] |
|
timerefresh |
gives an estimate of the refresh rate by timing a 360 degree rotation with 128 frames |
|
loading |
????? |
|
sizeup |
add 10 to cvar viewsize |
|
sizedown |
subtract 10 from cvar viewsize |
|
sky |
basename <rotate> <x y z> |
Set a sky. Optionally, set a rotate speed and axis of rotation. This command calls the re.SetSky function |
+turnleft |
These commands are equivalent to the corresponding keypresses. The + command means keydown, and – means keyup. For instance, the +turnleft command will start the camera spinning and the -turnleft will stop the camera spinning. These commands are implemented as stubs which call the KeyDown function, for example: void IN_TurnLeftDown(void) {KeyDown(&in_turnleft);} |
|
-turnleft |
||
+turnright |
||
-turnright |
||
+shiftleft |
||
-shiftleft |
||
+shiftright |
||
-shiftright |
||
+shiftup |
||
-shiftup |
||
+shiftdown |
||
-shiftdown |
||
+zoomin |
||
-zoomin |
||
+zoomout |
||
-zoomout |
||
impulse |
integer |
assigns value to global int in_impulse, but I don't know what in_impulse does |
+select |
select is typically the left mouse button. If mouseSpace==MS_WORLD then selects an actor, else executes a menu click (MN_Click). Note that mx and my are global variables for the mouse position. |
|
-select |
||
action |
if mouse is in the MS_WORLD, then execute the CL_ActorActionMouse function |
|
turn |
turn actor to face towards the mouse pointer |
|
standcrouch |
obvious |
|
firerp |
Fire weapon, left or right (l/r), primary or secondary modes (p/s) |
|
firers |
||
firelp |
||
firels |
||
reloadleft |
reload weapon |
|
reloadright |
||
nextround |
End turn. |
|
levelup |
change view levels, ie roofs/floors. |
|
leveldown |
||
zoominquant |
Quantized zoom in and out |
|
zoomoutquant |
||
cameramode |
first person hack, only in my version /*a.h.*/ |
|
mn_push |
menu_name |
push menu onto the menu stack, if the menu is already on the stack then move it to the top |
mn_pop |
??? |
|
mn_modify |
??? |
|
givename |
gender country [num] |
prints an actor name on the console |
gennames |
BAD COMMAND NAME! This function resets the team's inventory, disconnects from the game, generates a new set of characters |
|
genequip |
reset all the soldiers' equipment |
|
team_mark |
used with the team menu to mark currently selected team members |
|
team_hire |
num |
add/remove actor num from team |
team_select |
num |
All implemented by the CL_SelectCmd function. These commands are used in the xxx screen. Basically, this command generates three commands depending on which version it is (team, equip, or hud) for instance, hud_select 7 would issue the commands: huddeselect7, hudselect7, and then changes the cl_selected cvar to 7. |
equip_select |
num |
|
hud_select |
num |
|
team_changename |
sets the mn_name cvar to the name of the selected actor |
|
saveteam |
filename |
save team to $GAMEDIR/save/filename.mpt |
loadteam |
filename |
load team from $GAMEDIR/save/filename.mpt |
msgmenu |
??? related to the messagemenu command |
|
game_new |
Obviously this matches the button on the first menu. It resets the characters. Sets the following variables: cvar mn_main=”singleplayer”, cvar mn_active=”map”, name=”campaign”. Sets curCampaign to the campaign with name, then sets the team, credits, equipment, market and missions pointers. |
|
game_continue |
continue an existing game or load the last saved game |
|
game_exit |
issues the disconnect command, curCampaign=NULL |
|
game_save |
filename comment |
comment is optional |
game_load |
filename |
load game |
game_comments |
set cvars mn_slot1, mn_slot2, ... , mn_slot7 with the comments from saved games named slot1.sav, slot2.sav, etc |
|
game_go |
go on the selected mission |
|
game_abort |
Let the aliens win. Executes this command: “sv win 7”. The aliens are team 7 |
|
game_results |
Do end of mission stuff: add credits, remove dead actors, change equipment, add recruits, deselect the mission, etc. |
|
buy_type |
Used only in the Equip menu. Changes between primary and secondary equipment lists. |
|
buy_select |
num |
Select item num in the equipment buy/sell menu |
mn_buy |
num |
Buy one of item #num |
mn_sell |
num |
Sell one of item #num |
cmd |
AFAIK, these functions are unused in UFOAI TD1. Most are harmless, but snd_restart might be a problem. |
|
pause |
||
pingservers |
||
snd_restart |
||
userinfo |
show some information about you, the user |
|
changing |
this function pops the console up, disables sound and screen when changing maps. It isn't strictly required. |
|
disconnect |
disconnect from the quake2 server. Only works in a mission. |
|
quit |
Clean shutdown. |
|
connect |
Connect to the quake2 server |
|
reconnect |
reconnect to the quake2 server |
|
rcon |
command |
remote console command |
setenv |
variable variable=value |
In the first form, shows the value of the given environment variable (stdlib getenv). In the second form, adds the variable to the environment. |
precache |
num |
sent by the server to the client before allowing the client onto a map. Instructs the client to start caching models and skins. |
download |
filename |
Client command. Request that the server send filename. |
seq_start |
filename |
start a non-interactive sequence (quake movie) |
seq_end |
end the non-interactive sequence (quake movie) |
|
wave |
These commands are defined, but not connected to any functions. This does two things: it allows command completion to work, and the unknown commands are automatically forwarded to the server. As far as I can tell, the UFOAI TD1 server doesn't implement any of these commands. |
|
inven |
||
kill |
||
use |
||
drop |
||
say |
||
say_team |
||
info |
||
prog |
||
give |
||
god |
||
notarget |
||
noclip |
||
invuse |
||
invprev |
||
invnext |
||
invdrop |
||
weapnext |
||
weapprev |
The previous commands were all created within the Qcommon_Init function, and its subroutines such as Cmd_Init, Key_Init, CL_Init and so on. Those console commands were created explicitly using the Cmd_AddCommand function, for example:
common.c:1803 Cmd_AddCommand ("z_stats", Z_Stats_f); common.c:1804 Cmd_AddCommand ("error", Com_Error_f);
But the subsequent commands are different. These command are created by the UFOAI scripting system.based on definitions in the base/ufos directory. For instance, this piece of script from base/ufos/
confunc buyselect0 { buy_clear *txt_item0 color "1 1 1 1" } confunc buyselect1 { buy_clear *txt_item1 color "1 1 1 1" } confunc buyselect2 { buy_clear *txt_item2 color "1 1 1 1" } ... deletia ... confunc buyselect27 { buy_clear *txt_item27 color "1 1 1 1" }
defines the buyselect[0-27] commands. This is pretty convoluted. The confunc keyword defines this function as a console function, as opposed to the function keyword which defines a function which is only accessible through the scripting system. The actual creation of the command is done in the MN_ParseNodeBody function, by this chunk of code:
if ( node->type == MN_CONFUNC || node->type == MN_FUNC ) { menuAction_t **action; // add new actions to end of list action = &node->click; for ( ; *action; action = &(*action)->next ); *action = &menuActions[numActions++]; memset( *action, 0, sizeof(menuAction_t) ); if ( node->type == MN_CONFUNC ) Cmd_AddCommand( node->name, MN_Command ); return MN_ParseAction( *action, text, token ); }
That last call to MN_ParseAction is important, because that is where the scripting system reads in what the function does (its action).Note that all such scripted functions are handled by the same handler_function, MN_Command. When one of these scripted commands is executed, MN_Command searches through the list of menu nodes until it finds the node with the same node name. Then it looks at the rest of the menu node data to find out what it should do. There are a limited number of things that MN_Command can do: nothing, execute a command, call another function, or set a property. Let's have another look at that first script confunc definition:
confunc buyselect0 { buy_clear *txt_item0 color "1 1 1 1" }
In this case, the name of the node is buyselect0. The fields within braces describe an action. buy_clear is a previously defined script function, so the buyselect0 console function calls the buy_clear script function. The *txt_item0 token specifies a node named txt_item0 and color is the node property. “1 1 1 1” is the value of the property. So this function changes the color property of txt_item0
listdel[0-18] |
|
|
listadd[0-18] |
|
|
listdisable[0-18] |
|
|
teamselect[0-18] |
|
|
teamdeselect[0-18] |
|
|
mn_name_changed |
|
|
equipdeselect[0-7] |
|
|
equipselect[0-7] |
|
|
equipdisable[0-7] |
|
|
mn_slot[0-7]_changed |
|
|
disfloor[0-7] |
|
|
deselfloor[0-7] |
|
|
selfloor[0-7] |
|
|
hudselect[0-7] |
|
|
huddeselect[0-7] |
|
|
huddisable[0-7] |
|
|
startround |
|
|
endround |
|
|
tomov |
|
|
towpl |
|
|
towpr |
|
|
towsl |
|
|
towsr |
|
|
towrl |
|
|
towrr |
|
|
tostand |
|
|
tocrouch |
|
|
buyselect[0-27] |
menu command |
changes color of txtitem[0-27] to “1 1 1 1” (white) |
buy_reset |
|
|
buy_primary |
|
|
buy_secondary |
|