Resource icon

[Open Assets] Rock the Vote

This content may be freely modified and/or maintained by anyone.

wolfs

Watch Symphogear
Administrator
Moderator
Sonic Team Junior
Kart Krew™️
Judge
Based on the equivalent SourceMod plugin (common in Team Fortress 2 community servers), this script gives players the ability to rock the vote, or RTV for short, allowing players to determine by majority whether or not to exit the current stage. Using it is quite straightforward: send a message with "RTV" (case-insensitive) right at the beginning. It'll announce your RTV to the server, count the current number of votes, and display how many are needed for the RTV to succeed. Of course, the script also has some failsafes in place to prevent griefing as well:
  • Spectators are not counted in the overall player count, and by extension, their RTVs do not count as well.
  • RTV is disabled once a player has completed a lap.
  • Each player can only RTV once. This resets when a new map is loaded.
  • RTV cannot be triggered at intermissions. The script clears RTVs on level load anyway, but this prevents janky, meaningless prints in the chat.
  • [1.0.4+] Splitscreen players are not counted in the overall player count, otherwise they could inflate it and make it impossible for RTV to succeed.
This script was designed for Kart, but should in theory function in vanilla SRB2 as well. If you intend to use it there, do so at your own risk. Please do not report issues regarding vanilla compatibility.

  • Splitscreen players can inflate the overall player count in versions 1.0.3 and prior, causing RTV to always fail in games with a high enough splitscreen player count. Due to Lua's poor support for splitscreen at the moment, this bug is unfixable without a new patch. The next patch for Kart will include a means of detecting these splitscreen players, which this script has already been tested against. As the script is already written to account for this, no updates will be necessary at that time, and splitscreen players will be fully supported.
v1:
  • Initial release.
Please get in contact with me either through Discord or a private message if you find any issues. I'll try to get them fixed as soon as possible.

Supporters / Co-Authors:
 

Attachments

  • kl_rtv_v1.lua
    3 KB · Views: 664
  • kl_rtv_v1.lua
    3 KB · Views: 612
  • kart0091.png
    kart0091.png
    209 KB · Views: 685
  • kart0091.png
    kart0091.png
    209 KB · Views: 863
  • kart0092.png
    kart0092.png
    140.9 KB · Views: 683
  • kart0092.png
    kart0092.png
    140.9 KB · Views: 868
  • kart0050.gif
    kart0050.gif
    1.8 MB · Views: 715
  • kart0050.gif
    kart0050.gif
    1.8 MB · Views: 915
Last edited by a moderator:
With the intentions of the code being for Kart, I decided to place it in Kart Misc. instead of SRB2 Misc. I also can't recall test to see if this works in multiplayer, but at least creating a Lan server by myself let it work, so I feel confident it'll work.
 

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

Back
Top