mapvote
Content
Description of the plugin Plugin files and purpose Configuration Commands Changelog Bugs Thanks Description: This plugin have an more advanced handling of how maps are choosen during votes and allows grouping of maps as well as player count condition for the map and "weight" which increase or decrease odds of selection. The weight can also be modified using external sources ex. use the result of "map rate" as a factor is currently included and supported by mapvote_reweight. Example one might only want mapchooser with sound and some output then only install this modified mapchooser. All the other plugins are however dependent on mapvote. Plugins: requires sourcemod 1.1 mapvote - this will create votes based on more arguments and pass it mapchooser, sourcemod or the included version mapchooser - the one included in the package will add some vote output and possibility for sound, note that NO sound is included rockthevote - only diffrence is that it depends on mapvote and will use mapvote selection algorithm instead of mapchooser => nominations is ignored, if you want nominations keep original rtv mapvote_reweight - is an optional addition to mapvote and will use the result from plugin "map rate" and scale the odds for a map to be selected by multipling weight with the maps average rating but you can write one of your own and use another source or algorithm. How to edit the mapfile (Def. $basedir/addons/sourcemod/configs/mapvote.ini ): Here you can create groups of maps and tell how many maps to take from each group and parameters that is used when considering maps. The structure looks like "Groupname" { // Here you can add group parameters (add slots otherwise this group will not be used, all other parameters are optional)} You can have one map in several groups and you are guaranteed that it will not come up more than once in the vote menu. See the included mapvote.ini for an example configuration. Group parameters: "slots" - number of maps to select from this group "default weight" - if no weight is given for a map inside the group this value will be used inside instead (default is 100 if not specified). Used from this point forward. Can be used for lazy people or higher accuracy (like percentage isn't enough) :P Map parameters: "min" - min number of players "max" - max number of players "weight" - this is used to increase or decrease the chance of selection Commands: console cmds mapvote - takes parameters and just forward to the command sm_mapvote_print <prevmaps | maps> - used to make sure it read the files and works correctly admin cmds sm_mapvote_vote <now | round | map> - starts a vote that will take affect according to the argument sm_mapvote_reloadmaps- force a reload of maps, can be used in conjunction of changing mapfile cvar by third parties since mapvote will reload maps automaticaly on mapchange if and only if the file have been modified since last read. Changelog 1.2.1 - 1/1/2009 - another attempt to fix sounds (API is buggy) :( - menu - splitted (better than a new category?) - default sound added and enabled by default 1.2.0 - 29/12/2008 - permissions - updated mapchooser for SM 1.1 - basic admin menu support1.1.1 - 24/10/2008 - previous map being removed in wrong order - 1.04 support (change in translation file to import) 1.1.0 - 30/8/2008 - updated 1.1 snapshot of mapchooser - fixed multiple votes - fixed rtv right before mapchange causing problems next round - small changes 1.0.7 - 21/8/2008 - removed a warning (want longer name but this will work) - added config file for mapvote for all except one variabel - added randomorder cvar for votes - added possibility to disable votes - use the same memory fix as I posted in the forum, made a max instead of min causing index out of bound - some small changes in mapchooser and how it handles when votes can be started - will set failstate if mapchooser is set to create end of map vote - fixed a typo in sound for mapchooser where max was set to 1.1 instead of 1.0 1.0.6 - 20/8/2008 - probably fixed TF2 winning_panel starting a vote - if cvar for file has changed it will reload maps on the next round, if you want to reload instantly then you need to force with command 1.0.5 - 19/8/2008 - maybe fixed index out of bound - sound in mapchooser is disabled by default 1.0.4 - 18/8/2008 - fixed no vote if nextmap is set - mapchooser will not set "Pending vote" when it is disabled 1.0.3 - 10/8/2008 - added reweight in print IF mapvote_reweight is loaded 1.0.2 - 11/8/2008 - fixed display 1.0.1 - 10/8/2008 - mapvote_reweight - fix float and int usage making a more accurate reweight Thanks to: - Sourcemod team - Thermopyle for debugging - people on IRC - Sound files are under creative common sampling plus 1.0 from this site - votestart.wav - is made by Robinhood76 |
Re: mapvote
I dont really understand what this does.
1 Is it replacing the mapchooser, also is a rewrite of that? 2 If thats true, does it provide the basic function of mapchooser too? 3 For example can i setup an end-of-map vote with this? 4 What options do we have, to let it choose wich maplist is used? I dont have a test server anymore, and its too much risk to test this on a well running pub, before we know what this really does, and if its bug free. |
Re: mapvote
1. It contains almost all of the mapchooser code since i couldnt just attach a new algorithm to it. The answere to question one is, yes it does.
2. I belive and hope it does since it is built on top of the code. 3. Since it is built on mapchooser that is kind of the point that it have end-of-map vote in the same manner however using another algorithm. 4. Look at votemap.ini, i left the description on how to use it there :P Basic ide is to allow grouping of maps, lets say you want 4 maps in the vote to be selected from the standard maps and 2 maps from third-party (custom maps). Or optional if you have a 64 player server you might want diffrent maps to show up when there is less than 30 people and when more than 30 people. This is however untested at the current stage, will take a look at it later but cannot test it due to lack of server. Code:
"standard maps" |
Re: mapvote
Sounds very good :)
Now the only remaining question is, if we can implement the teamswap code our version of mapchooser provides. Look it at here in the new plugins section, maybe you can copy the corresponding swap algorithm to your plugin, to provide an extend+swap option too? After that i see no point, why i would not change to this plugin :) |
Re: mapvote
That would be easy enough since it is the same code structure, could create a Cvar for it but would better if one could keep it seperated kind of like switchteam at half time does and then it could be a seperate plugin (like a cvar for switchteam). One reason not to switch is that this is marked Alpha since it hasen't been tested. Mostly added it as a reference if I have more questions and to get feedback (bugs and requests like yours). My intended test server had a too old CPU for source and hence the lack of testing.
Maybe will add more features once python or if structures gets added but also when the new mapchooser comes out and play :) |
Re: mapvote
This is the answer to my prayers. Just need to get it working.
should be 3 standard and 2 custom but get: 4 standard and 3 custom Installed: sm_votemap_print nextvote tc_hydro ctf_well cp_granary ctf_turbine_v3 cp_grand_canyon_v1 cp_warpath2_1b ctf_blitz ======================================== 01:10:24 sm_mapvote_print maps 01:10:24 ======================================== -= New Group =- -Slots: 3- cp_dustbowl 0 -1 cp_gravelpit 0 -1 cp_well 0 -1 ctf_2fort 0 -1 cp_granary 0 -1 tc_hydro 0 -1 ctf_turbine_v3 0 -1 ctf_well 0 -1 -= New Group =- -Slots: 2- cp_jailbreak_b2 0 -1 cp_warpath2_1b 0 -1 cp_wolf 0 -1 cp_labor 0 -1 cp_desertfortress 0 -1 cp_grand_canyon_v1 0 -1 cp_science 0 -1 cp_shock 0 -1 cp_studio_rc3 0 -1 cp_u_turn_b4 0 -1 ctf_blitz 0 -1 ctf_mach2 0 -1 |
Re: mapvote
Quote:
So I want to allow only 1 slot for group 2, but it picks 2 maps. if i set 0 slots , it wont allow and doesn't pick any. Can you fix this? |
Re: mapvote
arm5ky did you get my message, and did you try the patch (latest version)? Just want to make sure it still is there, the bug that is. If it still is there then i will try to fix it tomorrow but please confirm you used the latest version, alpha 1.2. Really ashamed i didnt notice it after merging my code files but I thought I fixed it (see changelog), even though I havent optimized it yet. I got lazy and cloned the array instead of making a more sophisticated fix :P
LocutusH did you get my message about what you want since that should be a separate plugin rather then merged into this one. |
Re: mapvote
Zerak,
Much appreciated:up: Thats done the trick. slot numbers are correct now. For ref, this is on our live TF2 server as per my sig below. Couple more questions: 1) I noted in the source, you comment out showing who has voted and for what. I really want that functionality, do i just dl your source uncomment and recompile? 2) Formating of the .ini. Our first attempt at adding min and max {} was not formatted properly and thus server would not boot. Took them out and it booted. Have been able to add them but formatting must be perfect and didnt seem to work anyway. But min/max would be great to get working, if I start adding criteria, can you run through any probs i get? |
Re: mapvote
1. I did? Where ?
If you refer to: Code:
// Why am I commented out? Because BAIL hasn't decided yet if 2. Give me an example, i thought it was kind of forgiving but sure you have to know what you are doing (look at the general and example in votemap.ini) example: Code:
"de_nightfever" Also I should mention that it calculates the vote at the begining of the map and not right before vote time. The reason for this is sourcemod does this and it is easier to do a quick check/debug but i will look into this later, or now if you need it. Please add your criterias and suggestions and I find it odd that it crashes for you during mapvote.ini parsing. |
All times are GMT -4. The time now is 09:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.