MapVote v8: a Kart-style voting screen for netgames!

[Reusable] MapVote v8: a Kart-style voting screen for netgames! 8

This thread contains content that may be reused, modified, or ported by anyone.

Krabs

he/him
Contest Winner🏆
Similar to Kart, this script lets you vote for maps in netgames - it even handles things like ties between maps with the same amount of votes, and it allows for server owners to customize the list of gametypes. Custom maps are supported, and BattleMod is supported. This supports every vanilla gametype (even coop, for some reason) as well as every BattleMod gametype. Press jump or ringsling to select a map, and press spin to cancel.

IMPORTANT: The intermission timer setting (console command: inttime) must be a high enough number to contain the whole voting process. I recommend inttime 300.

IMPORTANT: Due to a bug in srb2 related to joins during intermissions, some players may be unable to vote or may see inaccurate voting options. This can be solved by using my other script, Intermission Lock.


attachment.php

attachment.php

attachment.php


Console commands:
vote_time - the duration of the voting period
score_time - the duration of the scoreboard period
gametypelist - set the list of gametypes using their ID numbers (ex: gametypelist 2 3 4 5 6 7)
mapwhitelist - set the list of allowed maps, if you would rather not just use every map. (ex: mapwhitelist f0 f1 f2)
mapblacklist - set the list of disallowed maps, if you would rather not just use every map. (ex: mapblacklist m5)
weightedrandom - enabling this will change the voting result to be somewhat random, with higher probability for maps with more votes. Use it to make unpopular maps win once in a while.
oldcmode - Loops through OLDC battlemod maps, skipping the vote screen entirely.

By default, the enabled gametypes are all vanilla gametypes except coop. To use your own list, use the gametypelist command.

Optional battlemod & Eggrobo Tag support: Add battlemod first before adding this script. At the moment, there is no support for other custom gametypes. ERT must be added after battlemod, until I find a more elegant solution.

Thanks to JJK for adding the "weightedrandom" feature!
 

Attachments

  • VL_MapVote-v1.lua
    18.8 KB · Views: 140
  • srb20447.gif
    srb20447.gif
    108.2 KB · Views: 2,668
  • srb20128.jpg
    srb20128.jpg
    93.1 KB · Views: 2,680
  • srb20129.jpg
    srb20129.jpg
    99.8 KB · Views: 2,670
  • VL_MapVote-v2.lua
    19.2 KB · Views: 116
  • VL_MapVote-v3.lua
    19.7 KB · Views: 127
  • VL_MapVote-v3.1.lua
    19.7 KB · Views: 148
  • L_MapVote-v4.lua
    19.8 KB · Views: 133
  • L_MapVote-v5.lua
    19.8 KB · Views: 126
  • L_MapVote-v6.lua
    22.2 KB · Views: 89
  • L_Mapvote-v7.1.lua
    23.2 KB · Views: 220
  • L_Mapvote-v8.lua
    25.3 KB · Views: 177
Last edited:

Krabs

he/him
Contest Winner🏆
looks nice

---------- Post added at 05:39 PM ---------- Previous post was at 05:15 PM ----------

this doesnt works

You must set "inttime 300" in the console, or the voting period will be cut off.

If there's another problem, please describe it.
 

Krabs

he/him
Contest Winner🏆
Just a fair warning: I have (only once) experienced a desynch issue where one player could not vote and the options to vote for were not the same as the server's. I'm working on a code cleanup for v2 as well as additional features, but for now v1 seems to work most of the time.
 

Krabs

he/him
Contest Winner🏆
Cleaned up the code, rewrote some stuff. It's basically identical, but v2 is out.
 

Krabs

he/him
Contest Winner🏆
v3 is out. Fixed a bug where maps were not properly being randomized, and added in a new debug command that can be used to view which maps are left in the "pool" of randomized maps.
 

Krabs

he/him
Contest Winner🏆
v4 is out. Now supports new battle gametypes, and there's a new "gametypelist" command to change the gamemode list.
 

Krabs

he/him
Contest Winner🏆
v6 is out - now you can whitelist or blacklist maps using the console commands mapwhitelist and mapblacklist
 

Krabs

he/him
Contest Winner🏆
v7 is out, adding the weightedrandom feature (thanks to JJK)

activate it to make the voting outcome more random, giving higher random chance to the maps with more votes but still having the possibility for any of the 3 maps to be chosen.
 

Krabs

he/him
Contest Winner🏆
v8 is out, (sort of) adding ERT support, OLDC mode, and some other tweaks I've probably forgotten about.
 

GabSK25

Ikouze! Hageshiku moeru batoru!!
Here it is not working properly. Players vote for a map, but the add-on chooses another one that no one voted for.
 
Similar to Kart, this script lets you vote for maps in netgames - it even handles things like ties between maps with the same amount of votes, and it allows for server owners to customize the list of gametypes. Custom maps are supported, and BattleMod is supported. This supports every vanilla gametype (even coop, for some reason) as well as every BattleMod gametype. Press jump or ringsling to select a map, and press spin to cancel.

IMPORTANT: The intermission timer setting (console command: inttime) must be a high enough number to contain the whole voting process. I recommend inttime 300.

IMPORTANT: Due to a bug in srb2 related to joins during intermissions, some players may be unable to vote or may see inaccurate voting options. This can be solved by using my other script, Intermission Lock.


attachment.php

attachment.php

attachment.php


Console commands:
vote_time - the duration of the voting period
score_time - the duration of the scoreboard period
gametypelist - set the list of gametypes using their ID numbers (ex: gametypelist 2 3 4 5 6 7)
mapwhitelist - set the list of allowed maps, if you would rather not just use every map. (ex: mapwhitelist f0 f1 f2)
mapblacklist - set the list of disallowed maps, if you would rather not just use every map. (ex: mapblacklist m5)
weightedrandom - enabling this will change the voting result to be somewhat random, with higher probability for maps with more votes. Use it to make unpopular maps win once in a while.
oldcmode - Loops through OLDC battlemod maps, skipping the vote screen entirely.

By default, the enabled gametypes are all vanilla gametypes except coop. To use your own list, use the gametypelist command.

Optional battlemod & Eggrobo Tag support: Add battlemod first before adding this script. At the moment, there is no support for other custom gametypes. ERT must be added after battlemod, until I find a more elegant solution.

Thanks to JJK for adding the "weightedrandom" feature!
bfd.jpg
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top