This thread is a continuation of the post here:
http://openarena.ws/board/index.php?topic=3578.msg42679#msg42679I will use this thread to write down some ideas, but I'm not going to implement (neither the dev team I think) this feature in the near future.
The idea stems from the fact that it seems we are needing to add more and more voting abilities for some parameters that weren't implemented in stock ioquake3, such as capturelimit. Instead of hardcoding the new vote, we could also enhance the current callvote custom to accept variables, which we could substitute in the script, so that we could theoretically implement any possible vote that we could imagine for any parameter of the game, and even for more complex script that may rule a server.
Now I'm going to describe some problems that may arise from this implementation, and how to fix them:
1- Variables substitution would be very hard to implement for callvote, because first we would have to implement it in the engine for script parsing, only then we could extend it for callvote.
This step can be sped up a lot by porting the TremFusion code, which implements variables substitution for scripting, as well as many other features such as a random function and an alias function.
But we would still have to implement it for callvote, but I believe this would be a minor step after this is implemented for scripting.
2- In the console, how will the user know how to feed the callvote custom (how to show the parameters?)
We could either just use the already defined help variables in the votecustom.cfg, and if we are perfectionnist, we could also output the name of the callvote + the variables before the help.
Eg:
{
votecommand "addbots $nbbots"
displayname "Add some bots if there's not enough people on server"
command "seta bot_minplayers 2"
}
If the player types /callvote custom help addbots:
addbots $nbbots
Add some bots if there's not enough people on server
3- In the GUI: How to show such vote with parameters in the menu? How can we input the parameters?
Either this kind of vote could just be used in console (personnally I think that's enough), or we could just show some dialog box for inputting the values for the variables.
Eg:
Menu > Callvote > Custom > Addbots > Please enter a value for $nbbots
And if we want to set a description, we could add a description for the variables, such as:
$nbbots:"number of bots"
which would give in the menu:
"Please enter a value for number of bots:"
--------------------------
If you've got some other ideas or problems that this feature would spawn, or if you even think that this feature is utterly useless, please feedback!