openarena

Since OpenArena 0.8.5, it is possible to extend voting by setting up custom votes. This OpenArena-specific feature is not supported by old mods designed for Q3A.

Custom votes allow players to execute specific commands defined by server administrators, in addition to those usually offered by the game.
Players are able to see available custom votes using command console or ESC menu.
About flexibility of this system, players can just choose from a list without specifying further values (would be a security issue); on the other hand, a single custom vote can execute a series of commands.

Usage

Server setup (administrators)

{
votecommand	"lms_custom"
displayname	"Change to Last Man Standing on dm4ish?"
command		"g_gametype 10 ; g_instantgib 0; map dm4ish"
}
{
votecommand	"ffa_custom"
displayname	"Change to instantgib FFA on dm6ish?"
command		"g_gametype 0 ; g_instantgib 2 ; map dm6ish" // Rail+gauntlet
}
{
votecommand	"kick_all_bots"
displayname	"Kick all bots?"
command		"kick allbots" // Callvote kick allbots is disabled in OA (risky)
}
{
votecommand	"domination_500" // Domination needs higher Capturelimit
displayname	"Change to Domination and Capturelimit 500?" 
command		"capturelimit 500 ; g_gametype 12 ; map restart"
}
{
votecommand	"capturelimit_8"
displayname	"Change Capturelimit to 8?"
command		"capturelimit 8 ; map restart"
}

Explaination:
- { and } mark the beginning and the end of each custom vote entry.
- "votecommand" is the name of the vote clients will ask for (/callvote custom <votecommand>). It may not contain spaces!
- "displayname" is the description displayed while the vote is going on.
- "command" is the string that will be executed if the vote passes. The string can include more commands separated by ";".
- What follows "//" in the same line is considered a "comment" and not parsed.

If you later wish to disable custom votes, you should modify "g_votenames" to do not include "custom" (e.g. /reset g_votenames sets it back to its default value, which is everything except custom).[2]

Tip: you may use Message of the day to inform players about availability of custom votes in your server.

Client usage (players)

After admins defined their custom votes and enabled them, players can invoke custom votes using either ESC menu or Command console.


Some usage ideas

{
votecommand "gravity"
displayname "Enable/Disable low gravity?"
command "toggle g_gravitymodifier 0.6 1" // This has immediate effect
}
{
votecommand "Allrockets"
displayname "Enable/Disable all rockets?"
command "toggle g_rockets ; map_restart" // By default, TOGGLE cycles 0 and 1
}
{
votecommand "Instantgib"
displayname "Instantgib off/on/on+gauntlet?"
command "toggle g_instantgib 0 1 2 ; map_restart"
}

Notes

  1. In case you are using Microsoft Windows with the option to hide known file extensions, pay attention to do not erroneusly create a file named like votecustom.cfg.txt which would be misleading shown as votecustom.cfg in the OS. Of course, you may set OA variable to fit that double extension filename.
  2. Simply modifying g_votenames to point to a non-existent or empty custom vote file is NOT recommendend instead: clients may still see the old list (which options would not work) from a cache.
  3. The Q3A exploit for which callvote kick all and callvote kick allbots have been disabled in OA: 1) Give yourself the name "All". 2) Act like an idiot. 3) Someone calls "callvote kick all". 4) Leave the game. 5) Vote passes. 6) Everyone gets kicked. Repeat the same exploit for "allbots": although less serious, it is still an exploit.

See also