Last Updated 06-05-2000
Contents
Introduction
Installation

The THUNDERVOTE.CFG
- "MIN" Conditions
- "NUF" Conditions
The STANDARD.CFG
Mod-Specific Configurations

- TeamFortress
- Rocket Arena and CTF
- Support for Other Mods
ThunderVote Map Entities
- Map Candidate
- MOTD Stuff
Userinfo Keys
- Server Options (set using serverinfo/localinfo command)
- Client Options (set using setinfo command)
Version Info
- Changes to ThunderVote 2.0
- Changes to ThunderVote 1.0
- Changes to FortVote 1.1

Introduction

ThunderVote is a QuakeWorld server-side patch that makes map voting possible for any mod. It was first developed for TeamFortress but support for other mods can be made available. It uses the "sv_gamedir" command (included in QW since version 1.64) to have the server switch gamedir directories back and forth (thus allowing it to run the ThunderVote qwprogs.dat in between maps) but leaving sv_gamedir constant, so the client won’t be told to change gamedir every time.


Installation

  1. Download the latest version of the ThunderVote mod (http://www.planetfortress.com/tvote/files/files.htm)
  2. Unzip the files in a new quake subdirectory called /thundervote (it can be called whatever you like, as long as you change all references to the default "thundervote" gamedir in the .cfg files)
  3. Move the files from the thundervote/themod directory to the server’s default gamedir directory (if it’s a TeamFortress server, put them inside /fortress)
  4. If you want to have the server run ThunderVote when it starts, add this command to the server.cfg: "exec thundervote.cfg"
  5. Set your own list of maps by editing the voting map’s entities (check the "ThunderVote Map Entities" section for details). The map will go inside thundervote/maps.
  6. Define default settings for all maps in the standard.cfg and vote settings in the thundervote.cfg.
  7. Make sure you enable settings on the mod you’re using to have it run ThunderVote again -- with TeamFortress, you can do so by including a "exec thundervote.cfg" line in qwmcycle/map1.cfg and setting qwmcycle/map2.cfg to do a "serverinfo n 0". See "TF-Specific Configuration" section and TF docs for more info.

The THUNDERVOTE.CFG

This is the script file that has the voting configuration commands. It usually looks like this:

gamedir thundervote
sv_gamedir fortress
// assuming it’s a TeamFortress game
localinfo min_votes 10
localinfo nuf_votes 20
localinfo min_approval 0.5
localinfo nuf_approval 24
localinfo min_time 1
localinfo nuf_time 3
localinfo no_since 5

...
map vote40

Timelimit and fraglimit now have no meaning in ThunderVote. Voting rules are determined by 6 keys: min_votes, nuf_votes, min_approval, nuf_approval, min_time, nuf_time.

"Min" conditions

  • min_votes: voting evaluation will not occur unless there is this minimum amount of votes. If it is assigned a value > 1, it assumes you are defining number of votes. If you assign a number between 0 and 1, it assumes you're defining a percentage of number of voters in relation to the number of players currently connected (i.e., a value of 0.1 = 10% voters, 0.67 = 67% voters, 12 = 12 voters). If unassigned or assigned a value of 0, evaluation can occur with any number of votes.
  • min_approval: voting evaluation will not occur unless the map with most votes has at least this minimum amount of votes. If assigned a value > 1, it assumes you are defining number of votes. If you assign a number between 0 and 1, it assumes you're defining a percentage of number of votes for a certain map in relation to the total of votes. If unnasigned or assigned a value of 0, evaluation can occur whatever the approval.
  • min_time: voting evaluation will only happen after a certain amount of time has passed since the first player arrived in the server (timer is reset if there are no players in the server). Value corresponds to # of minutes. If unassigned or assigned a value of 0, evaluation can occur anytime.

All defined minimum conditions must be satisfied before voting evaluation can occur, unless a "nuf" condition is satisfied, in which case, "min" conditions will be ignored -- for instance, if you define a "min_votes 7" and a "nuf_votes 0.9", if there are not at least 7 votes but at least 90% of players have voted, evaluation will occur (provided there are no draws).

"Nuf" conditions

  • nuf_votes: voting evaluation will occur if there are a certain number of votes. If assigned a value > 1, it assumes you are defining number of votes. If you assign a number between 0 and 1, it assumes you're defining a percentage of number of voters in relation to the number of players currently connected -- NOTE: using a percentage for nuf_votes can lead to undesirable premature results if a server starts and the first player that joins in votes immediately (resulting in 100% voters and therefore satisfying the condition).
  • nuf_approval: voting evaluation will occur if the map with most votes has at least this amount of votes. If you assign a value > 1, it assumes you are defining number of votes. If you assign a number between 0 and 1, it assumes you're defining a percentage of number of votes for a certain map in relation to the total of votes -- NOTE: using a percentage for nuf_approval can lead to undesirable premature results if a server starts and the first player that joins in votes immediately (resulting in 100% approval and therefore satisfying the condition).
  • nuf_time: voting evaluation will happen after this certain amount of time has passed since the first player arrived in the server (timer is reset if there are no players in the server). Value corresponds to # of minutes. If unassigned or assigned a value of 0, evaluation can occur anytime. If there is a draw, anarchy mode is enabled.

Evaluation occurs if at least one "nuf" condition is satisfied and there are no draws.


The STANDARD.CFG

This script file is executed before any map is chosen. It MUST have this line:

gamedir fortress // assuming it’s a TeamFortress game

You should set other standard variables in it, like:

timelimit 60 // whatever value you use for your maps
fraglimit 100
// whatever value you use for your maps
etc.

For map specific configurations, you can set localinfo map_cfgs to 1 so that, after standard.cfg is executed, ThunderVote will attempt to run a script file inside a /QWMCYCLE directory with a name that corresponds to the name of the chosen map (Ex.: if chosen map is 2fort5, it tries to exec a qwmcycle/2fort5.cfg, if map is called "whatever", it runs a qwmcycle/whatever.cfg, etc.), much like TF does when localinfo exec_map_cfgs is set to 1 (BTW, if that is enabled on your TeamFortress server, you don’t have to use ThunderVote’s "map_cfgs" feature).


Mod-Specific Configuration

TeamFortress

TF must be told to always run thundervote.cfg after it runs a map (so voting restarts after a map is played on). To do so, the map1.cfg file in the FORTRESS/QWMCYCLE directory should have this command:

exec thundervote.cfg

and map2.cfg should be like this:

serverinfo n 0

Check out TF’s QWSERVER.TXT file for more details on map cycling.

Rocket Arena and CTF

You must use special versions of these mods available in the Files section. Currently there are special versions of Clan Arena 1.3, Final Arena 1.2, Threewave CTF 4.1, Expert 1.31, ThunderWalker 5.0. They offer a simple added feature that allows them to be used with ThunderVote: the "exec_cfg" serverinfo key. Use it in the STANDARD.CFG to specify what script the mod should exec instead of changing levels, like this:

localinfo exec_cfg thundervote.cfg

Support for Other Mods

If you do find out how to configure any other mod so they can work with ThunderVote or if you’re a mod author willing to make any changes to your mod so that servers can use it with ThunderVote, contact me through e-mail: neurobasher@planetfortress.com.


ThunderVote Map Entities

There are 2 new kinds of entities for ThunderVote maps, they are:

Map Candidate

classname map_candidate
map [filename] defines the name of the map file ("2fort5", "rock2", etc.)
map_name [string] a more descriptive name for the map ("Two Forts 5", "The Rock II", etc.)
alias [string] the name of the alias the users will use to vote for the map. Usually the same value of "map" since people usually remember maps by their map file names.
impulse_value [value] an impulse value the alias will use (just give it a unique number, it’s best to assign impulse values that are not used in TeamFortress, like something in the 200+ range)
realteam [string] the team the user will be assigned to when he votes for this map. It has to be a string with no more than 4 letters, preferably unique ("2FT5", "ROCK", etc.)

MOTD Stuff

classname motd_stuff
netname [string]
target [string]
targetname [string]
message [string]
noise1 [string]
noise2 [string]
noise3 [string]
noise4 [string]
8 strings you can use for motd messages. They will appear sequentially in this order: netname string, target string, targetname string, message string, noise1 string, noise2 string, noise3 string, noise4 string, staying on the screen for a defined period of time. You can use this to give people instructions, display list of maps, news, make an animation, whatever.
delay [value] defines how much time in seconds each motd string will stay on screen.

When defining entities for a map so that it can be used with ThunderVote, remember to convert every info_player_teamspawn entities to info_player_deathmatch and put at least 32 of them to minimize the chances of a telefrag (telefrags won’t actually occur, players will just get stuck on each other, something rather annoying).

Check out vote40tv.ent for an example of ThunderVote entities on a TeamFortress map.


Userinfo Keys

Server Options (set using serverinfo/localinfo command)

min_approval [value]
min_votes [value]
min_time [value]
nuf_approval [value]
nuf_votes [value]
nuf_time [value]
Defines voting rules. Check the THUNDERVOTE.CFG section for details.
maps_cfg [filename] if set to a value other than 0, will make the server attempt to exec a qwmcycle/<mapname>.cfg before it changes to the <mapname> map and after it runs the standard.cfg. Note that TeamFortress servers already exec a qwmcycle/<mapname>.cfg (that is, if you set "exec_map_cfgs 1"), so this is intended for use with other mods that don’t offer this feature.
no_since [value] forbids a map from appearing on the map candidate list if at least N different maps weren't chosen since last time it was chosen. This allows for some map rotation while maintaining voting capabilities (NOTE: no_rep option has been removed).
vote_wait [seconds] before changing votes, players are forced to wait 10 seconds (default). If you don’t like that, you can define the amount of time in seconds they should wait by setting vote_wait to a value other than 0.
std_cfg [filename]
tv_cfg [filename]
defines alternate filenames for the "standard.cfg" and "thundervote.cfg" respectively. Intended for use with multiple servers that must have different configurations but share the same directories and files. Defaults filenames are used if you set these values to "0".
snd_vote [filename]
snd_nope [filename]
snd_timer [filename]
snd_timeover [filename]
snd_anarchy [filename]
defines alternate filenames for the voting sound, voting error sound, timer sound, timeover sound and anarchy mode sound respectively. Default values are "doors/baseuse.wav", "doors/basetry.wav", "doors/runetry.wav", "doors/meduse.wav", "items/damage.wav". Set them preferably before the map is run so these sounds can be precached allowing users to automatically download them. Setting any of these values to "0" will make them use the default values.
no_id [0/1] disables "auto-id" feature for all players if this key is set to a value other than 0.
motd1 [string]
motd2 [string]
displays these 2 strings in the first motd screen (much like TeamFortress does).
no_anarchy [0/1] disables anarchy mode
no_maphelp [0/1] disables automatic dumping of map list when players connect (just in case there are too many maps in the list and people start complaining about overflows).

Client Options (set using setinfo command)

no_motd [0/1] if set to a value other than 0, no motd screens will be displayed.
no_alias [0/1] if you don’t want to have the server make aliases for you, you can still vote using impulses. Set this key to a value other than 0 before connecting and the maphelp command (impulse 131) will display a list of mapnames and their impulse values instead of alias names.
no_id [0/1] disables "auto-id" feature if this key is set to a value other than 0.

Version Info

Changes to ThunderVote 2.2

  • "sv_gravity" isn't set anymore so that it can be changed for the vote map in the server config files
  • Clients execute "vote.cfg" on entering the vote map and "votedone.cfg" before the mapchange to the voted map. This allows having special settings only for the votemap
  • "mins", "maxs" and "size" of "info_decoration" entities are only set when not present in the maps entities thus allowing to actually change them by the map entities
  • The sound "misc/null.wav" doesn't get precached anymore (when specified as one of the voting sounds via the localinfo keys) as that messes up qwsv

Changes to ThunderVote 2.1

  • info_decoration entity added, a multi-function decorative item

Changes to ThunderVote 2.0

  • Advanced voting rules (min/max voting time limit, min/max number/percentage of votes, min/max number/percentage of vote approval)
  • ANARCHY Mode
  • New server options: no_maphelp, no_anarchy, snd_anarchy, no_since
  • "no_since N" server option forbids a map from appearing on the map candidate list if at least N different maps weren't chosen since last time it was chosen. This allows for some map rotation while maintaining voting capabilities (no_rep option removed)
  • Brazilian-portuguese version available due to some requests (contact me if you're interested in having versions for other languages)
  • Many other small bug fixes & enhancements

Changes to ThunderVote 1.0

  • Gradual alias binding reduces the chance of a player getting overflowed after connecting
  • Added many serverinfo and setinfo settings (see Userinfo Keys section for list and descriptions)
  • Translated all messages to English (FortVote was first made for a Brazilian server)
  • Full documentation in HTML and text versions
  • Can use fraglimit 0 and timelimit 0 (although setting both to 0 is not recommended)
  • Added the "lightning from above" thing when player votes
  • More flexible for use with mods other than TeamFortress

Changes to FortVote 1.1

Dunno, didn’t keep track of that. :)


URL: http://www.planetfortress.com/tvote/
email: neurobasher@planetfortress.com

Any id stuff mentioned here belongs to id Software, TeamFortress belongs to TFS
Send comments and suggestions to Neurobasher.