openarena

See also: Manual/Console Commands

The "Command console" is a powerful command-line user interface that allows you to set many options, including those that are not visible in the menus. The console from Quake 3 has been improved by ioquake3, with a better "autocomplete" feature.

The console

To "pull down" (show) the console press Shift+Esc. You might find other places that say press: ~, ', `, ½, ^, §, \ or æ but Shift+Esc works on most keyboards. Note: it has been reported that "Microsoft eHome" keyboard drivers could cause problems in pulling down the console.

For example:
Model change: /seta model "sergei/red"

Model head change: /seta headmodel "skelebot/red"

Key function: /bind <key> <here what you want to do>
(e.g. /bind g say "Hello" (when you press 'g', you'll send a message "Hello"))

What you can do?
Say sg: /say "Hello"

You can use up and down arrows to see previously used commands. You can use PageUp/PageDown keys to scroll view (to see previous messages). If you scrolled back the console, it will not scoll automatically when new messages are added (not even if you close and open it again): you have to scroll it to the bottom (to the last line), and it will return to act normally (showing the last messages as they are added). You can use Ctrl+Home and Ctrl+End keys to reach the top and the bottom of the log immediately.

You can use the "tab" key to autocomplete some commands. For example, if you write /map and press tab, you will see there is also a command called map_restart; if you write \map_r and press tab, the command will be completed to \map_restart; if you write \map a and press tab, you will see the list of all the maps where the name begins with "a".

Writing a variable name without setting its value will return the present value, and often also its "default" value. Warning: you should check default values after starting a match... if you check them from main menu, before having entered a match, previous value stored in your config file may be erroneusly indicated as "default" one, and some variables could even be referred as not existent.

Note: make the command begin with / or \, or it will be considered a simple text message, like with the command "/say" (having no effect, but shown to other players). When using the specific dedicated server executable (oa_ded), instead, you do not need the slash before the command.

Command names usually are case-insensitive (e.g.: both \map_restart and \MAP_RESTART will work), but some of them may be case sensitive.

You can press Insert (Ins) keyboard key to switch between text insert and overtype modes.
You can paste text from your Operating System clipboard into OA command console (e.g. Shift+Ins). Very useful to paste a server address:port to be used with /connect <ip:port> command.

Console log

You can scroll console log with PageUp/PageDown keys, but sometimes it is useful to check its output in a text editor.

Set variables

To set a variable, you can usually simply write \<variable> <value> in console. It works if the variable (also known as "cvar") was first declared in C source code, and usually it is the case, but sometimes you may need to use particular commands to set a variable:

After you "created" a variable with a "set" or similar command, then you can update it also without using the "set" command. A new variable created with "set" command probably will not be stored after you exit the game, while it would be stored permanently if you created it using the "seta" command.
Maybe some variables may not be stored into the q3config.cfg file, even if you used the "seta" command... remember that you can store and automatically load additional variables and commands creating a text configuration file named autoexec.cfg in your baseoa folder. Everything in the "autoexec.cfg" file will be executed everytime you launch OpenArena. It is possible to delete a variable from your .cfg file, simply editing it with an external text editor program.

Note: in the source code, some variables may be flagged as "archive" (so they will be saved in your config by default), while others not (so they will return to their default values the next time you will launch OpenArena).

It is possible to use the \unset <variable> command to delete (that is a different thing than setting to empty "") a user created variable (does not work with pre-defined variables, e.g. "name"). If the variable did already exists in your q3config.cfg file -e.g. you previously created it with "seta"-, you need to use /writeconfig q3config.cfg before closing the game to delete it from the file. Or you may delete it with a text editor.

It is possible to use the \reset <variable> command to set a variable to its default value again. Works with variables that have a default value defined (note: if you create a user-defined variable, it does not have a "default" value -if you immediately try "reset <variable>", it has no effect-, but if you save it using "seta <variable> <value>", then close and open OpenArena again, then the previously used value of that variable will be considered as its default: if you then try "reset <variable>", it will restore that value.).

Note: sometimes it is possible that you may find some variables, specific from some mods you have used, also stoered in the q3config.cfg file in your baseoa folder (while they are usually stored in the configuration file in the mod's folder). Don't be surprised if they have not effect under baseoa.

You can set variables also form OS' command line, when launching OpenArena: for example, under Microsoft Windows, you can use its "command prompt", batch file or link, to start a mod directly (openarena.exe +set fs_game missionpack will launch The Mission Pack mod).

You may notice some variables may result as cheat-protected or read-only when you try to modify them, or you may not be able to edit them for other reasons. In some of these cases, you may be able to change them only after loading a map in development (cheats enabled) mode (/devmap <mapname>), or by using the OS command-line (while launching OpenArena); there are even some that can be changed while playing a demo... and some simply show infos so there is no reason to try to change them. Some variables may be locked by videoflags locks. There may even be a few "hard-coded" locks in the engine that would show a variable as freely editable, while instead the value shown is ignored and a predefined one is used instead (it is the case of cl_yawspeed on official 0.8.5 and 0.8.8 binaries).

It exists the \cvar_restart command that flushes all of your custom variables.... and many pre-defined ones, bringing them to their default values, except those which are flagged as "cvar_norestart" in the source code). WARNING: this one is a "dangerous" command, similar to deleting your q3config.cfg file. Don't try it unless you backed up your configuration: it does not ask any confirmation, and it will delete your statistics, player settings, unlocked single player deathmatch tiers... Please notice that it does not affect all of your mods, since each mod has got its own q3config.cfg file.

Remote control

See also: Manual/Multiplayer and Servers

You can set a password to remotely connect and change your server options when you are not physically working on the server machine.

To do this, first set a "rcon password" on your server. Just use \rconpassword <"your_password"> command (obviously, select the password you wish). If you don't set a password, you will not be able to remote control your server thorugh rcon.

Then open a standard OpenArena client and simply connect to your server as any player. Use \rconpassword <"your_password"> to enter the same password you set on the server before. Then use \rcon <command> <parameters> to execute a command on the server.
For example, \rcon fraglimit shows server's current "fraglimit" value, and \rcon fraglimit 20 sets that value to 20.

You don't even need to connect to the server as a client to be able to send remote commands to it. This is very useful if your server is full (all player slots busy) and you can't connect to it. In this case, just start an OpenArena client and, without entering a server, use \rconaddress <your_server_address> (or \rconaddress <address>:<port>) to set the IP of your server and \rconpassword <your_password> to set the same password as your server, then use \rcon <command> <parameters> to send commands to your server.

Warning: do not use "\sets" command to set rconpassword, or everyone will see it in the \serverstatus!
Furthermore, in case you set up automatic downloading with http redirection ("fast downloading"), be sure that no configuration files containing your "rconpassword" are available through http![1]

Tip: some additional tools may help you controlling your server, such as the "!admin system".[2]

Some commands

Here there are some commands and variables:

Key binding

Key binding means to associate a certain command/action to a specific keyboard or mouse button. Setup --> Controls menu (divided into look, move, shoot, misc sections) allows to configure game actions (up to two keys for a certain command), but you can use the console to create more bindings, to execute commands and set variables.

set cinemaon "set cg_thirdperson 1; set cg_draw2d 0; set cinemamode vstr cinemaoff"
set cinemaoff "set cg_thirdperson 0; set cg_draw2d 1; set cinemamode vstr cinemaon"
set cinemamode vstr cinemaon
bind f12 vstr cinemamode
A such script can be written directly in the console, or can be placed in a configuration file (such as autoexec.cfg or one you have to manually exec).[3]
The script may also include some "commands", other than cvars. As an example, here's a script which would rotate between three weapons (rocket, lightning, rail) at each pression of the "f" key (e.g. you may like something like that for Elimination mode):
set cycle5 "weapon 5; set cycleweap vstr cycle6" // Switch to rocket, prepare for next
set cycle6 "weapon 6; set cycleweap vstr cycle7" // Switch to lightning, prepare for next
set cycle7 "weapon 7; set cycleweap vstr cycle5" // Switch to rail, prepare for restart cycle
set cycleweap vstr cycle5 // Set start of the cycle to the first step
bind f vstr cycleweap // Link "f" key to the script

Notes:

  • Key bindings are saved to your q3config.cfg file: it's not like user-created cvars that may be stored or not depending from whether you used "seta" or "set" command to create them.
  • Unlike "unset <variable>", "unbind <key>" does not need to later use "/writeconfig <q3config.cfg>" to delete the binding from your q3config.cfg file.
  • Knowing which was the game's default binding of a certain key requires a bit of effort.
    You may temporarily rename your q3config.cfg file from your "homepath/baseoa" folder and launch the game, so it would create it again with a clean configuration; then you may check the desired they binding, then change the name of the "clean" configuration file in order to keep it for future reference (or just delete it) and restore the name of your "good" q3config.cfg. Please pay attention in the process.
    Alternatively, you may open "default.cfg" file with a text editor and check there: default.cfg is located inside "pak0.pk3" in "your_OA_installation(basepath)/baseoa" folder. PK3 files can be opened with a compressed files (zip) viewer. Theoretically, later patches may update default.cfg and you may find a newer version of it in a pk3 file later than pak0. However, this has not happened with OA 0.8.5 and 0.8.8 patches.
  • There is no equivalent to "reset <variablename>" to automatically restore a single key binding to its default.
  • Executing "/exec default" would restore all key bindings to their default values, also deleting your bindings of keys which had no function by default.
  • A funny example of what can be done with scripts involving bind is a Jukebox script to make a key cycle between different background musics.
  • Commands starting with "+" are usually meant to be used bound to keys, as in providing their effect as long as you hold the key (e.g. bind UPARROW "+forward"). Some might still work from console, as typing /+forward is like holding the key to move and typing /-forward is like releasing it, but probably it's not so useful... and just a thing as simple as a /vid_restart is enough to disable the trick.

Special game options

There are various CVARs that control some additional game options, other than the main gametypes and basic game options, for example "instantgib" or "all rockets" modes. Please read Special game options for more info.

Console look options

With ConsoleType 2 (for the following settings, values between 0.0 and 1.0):
  • cl_consoleColorAlpha (transparency; default = 0.8)
  • cl_consoleColorRed (default = 1)
  • cl_consoleColorGreen (default = 0)
  • cl_consoleColorBlue (default = 0)

Notes

  1. While the game can only download .pk3 files, people may still access other files using a web browser! A simple approach may be to set your web server to use a different folder as file repository (or using an external web hosting service), containing .pk3 files only... in this case, just pay attention to copy there all the additional pk3 files which are required to play on your game server. If you prefer to use the same folder for game server and http/ftp server, then set http/ftp file permissions very accurately!
  2. About the "!admin system", you may also want to check that your admin.dat and admin.log (or whatever you renamed them) aren't publicly accessible via http.
  3. Remember that if you set a variable with "seta", it will be stored to your q3config.cfg file; you can choose to do not store it to q3config.cfg file by using "set" instead -and if it has already been stored there once, you can delete it using "unset <variable>" and then "writeconfig <q3config.cfg>"-... but the key binding will be stored there in any case, so you may wish to manually "unbind" -or bind to something else- that key if you don't need the script anymore.

See also

External links