For this reason, I have developed a simple patchwad that adds an entirely new voting system to be initiated at the end of each level (how it is initiated is at your discretion, as I will explain below).
This mod adds three rounds of voting, giving players a large amount of control as to how they would like to proceed along the mapset online.
The first round simply asks the players if they would like to restart the map they are on to play it again.
[spoiler][/spoiler]
If there are not enough votes (less than half) or the result is a draw, it will default to proceeding to the next round, if reset map wins the vote however then it wont proceed to any other rounds of voting and will immediately reset the map.
The second round asks if you would like to simply proceed to the next map in the rotation (random map rotation should be off) as if to exit normally, or to choose between two random maps (which is the default).
[spoiler][/spoiler]
If random maps wins the vote (or there is a draw or not enough votes) then the third round of voting is initiated, presenting two random maps for players to choose from.
[spoiler][/spoiler]
If there is not enough votes or there is a draw, then the script will randomly choose between those two maps.
Voters are totally frozen during the voting.
Unfortunately, because Zandronum does not properly support dynamic strings yet, in order to make this work for your wad you MUST edit the library script (called MAPVOTER inside the wad) to include information about your mapset and recompile, and then save that wad with a specific prefix/suffix to distinguish it from other versions of the wad.
Fortunately, I made this super easy for you. All you have to do is edit a few lines at the very top of the script, no knowledge of ACS is required.
At the top of the script, you will see this, the comments provide instructions on what to do:
Code: Select all
//BELOW IS FOR WAD AUTHORS TO EDIT
#define nummaps 7 //Change this value to the number of maps in rotation
#define HUDID1 500 //If you are a mod author, change these values if they conflict with any hud message ids used in your mod
#define HUDID2 501
#define HUDID3 502
#define HUDID4 503
#define VOTESCRIPT1 501 //If you are a mod author, change these values if they conflict with any script numbers in your wad
#define VOTESCRIPT2 502
#define VOTESCRIPT3 503
#define VOTESCRIPT4 504
#define VOTESCRIPT5 505
#define VOTESCRIPT6 506
//Below is the map name array.
//the format is changemap [LUMPNAME] where the lumpname must obviously be IDENTICAL to the maplump names in your wad otherwise it will not work.
//Edit the array to include all of the maps in rotation
str maps[nummaps] = {"changemap MAP01", "changemap MAP02", "changemap MAP03", "changemap MAP04", "changemap MAP05", "changemap MAP06", "changemap MAP07"};
//Genre of each map (for mods that have multiple genres of gameplay, e.g. minigame wads)
str genre[nummaps] = {"Coop","Coop","Coop","Coop","Coop","Coop","Coop"};
//Description of each map
str description[nummaps] = {"Entryway","Underhalls","The Gauntlet","The Focus","The Waste Tunnels","The Crusher","Dead Simple"};
//IGNORE THE BELOW
Initiating the vote
The vote is initiated by executing VOTESCRIPT1 (by default this is script 501); when this is executed is down to your discretion. Typically this will be after a specified timer runs out, on pressing an "exit" switch or after some check to see if the game has ended.
This mod also includes a simple timer that will initiate the voting after a specified time period. Simply set the cvar "v_tlimit" in the server console to how long in minutes you want to wait until voting is initiated.
Download: http://static.[bad site]/wads/voterv4.wad
edit: oh and if you need any help getting this to work with your mod do not hesitate to ask!