desh wrote:
1)I want to be able to have a large number of maps available on the server so that if players want to vote to a particular map they can do this. However, I also want it so that when the server changes level after the timelimit has been hit, it will only select a map from a subset of all the maps available on the server. How can I do this? I would also like to apply this same thing to the default id maps, for example, when the server goes to change the level, it will only find a random level from dm1, dm2, dm3, dm4, dm5, dm6, and not select a level from any of the episodic maps. But, also have the episodic maps available to change level to upon player request and vote.
This can be done with the standard maps, but you have to modify settings.qc file and replace "TRUE" with "FALSE" to all of the maps in the function
user_allowed_maps you don't want the game to select. You must also place the level selection to random, because of the way the linear code selection works. At current, there is no way to allow custom maps and not have them be selected in the rotation. This is something I can easily address though and walk you through if you're interested.
desh wrote:
2)I want to be able to lock out certain game modes, but keep others available to vote. For example, I want the clients to be only able to vote between match, practice, and normal, but not be able to vote the game mode to rocket arena or head-hunters or anything else. Is there a way to do this?
Unfortunately this too is going to require you to modify the source and recompile. You'll need to open up the file
vote.qc and in the function
vote go through all of the various vote options and change the value of "cancel" to 1. Here is an example block of code specific to one vote option, in this case it's practice mode:
Code:
else if (self.impulse == IMP_VOTE_PRACTICE)
{
cancel = options & MODE_LOCKED;
e.frag_rate = 0.51; // XXX move to settings.
e.think1 = change_mode_to_practice;
e.noise1 = "change";
e.noise2 = " mode to practice";
if (cancel)
self_sprint (self, "mode is locked\n");
else if (gamemode == MODE_PRACTICE)
{
self_sprint (self, "already in practice mode\n");
cancel = 1;
}
}
If you wanted to turn off practice mode all the time, replace
Code:
cancel = options & MODE_LOCKED;
with
Code:
cancel = 1;
You can apply the same principle to any of the vote options.
Now I'm assuming that you're already familiar with how to compile the source code, but if you're not and need help please let me know.