Raised This Month: $202 Target: $400
 50% 

TF2 Advanced Vote Scramble 1.1 [Last update: Jan. 11 2009]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Brainstorm
Member
Join Date: Aug 2007
Plugin ID:
700
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    21 
    Plugin Description:
    TF2 Advanced Vote Scramble
    Old 01-03-2009 , 10:08   TF2 Advanced Vote Scramble 1.1 [Last update: Jan. 11 2009]
    Reply With Quote #1

    TF2 Advanced Vote Scramble 1.1


    Plugin description

    This plugin allows players and admins to initiate a team scramble, which will shuffle players between red and blue teams. This plugin differs from the existing "Vote Scramble" plugin in two major ways:
    1) It does not rely on the mp_scrambleteams command but uses a custom algorithm which does not influence the state of the map.
    2) It does not bother every user with a vote menu, but will rather function like RTV. A scramble will run when enough players have said !scramble in chat.


    Background

    It happens more than once that teams are unbalanced, which is boring for both teams. Players often request that the teams are balanced, but there may not always be an administrator available. This plugin attempts to solve this problem.


    How it works (players)

    A player can type a command, such as !scramble or !teamscramble. Once enough players have voted (a certain percentage), a scramble will run. Players will be shuffled and be respawned. The map will NOT reset and the game will continue at its previous state.


    How it works (admins)

    Admins can force a scramble by using the sm_scramblenow command (or by typing: !scramblenow). They can reset a scramble in progress by using sm_scramblereset (!scramblereset). There are a number of cvars to control the working of this plugin.


    Current shuffling algorithm

    There are currently two algorithms implemented:
    1) All players are randomly assigned a team. This is no longer the default algorithm.
    2) All players are randomly assigned a team, but also makes sure that a minimum amount of players is swapped. This prevents that the scramble pretty much creates the same (unbalanced) teams. To be more concrete: the plugin (by default) attempts to change at swap at least 35% of the players and at most 50%. The exact value is determined randomly. Default algorithm as of version 1.1


    Features

    * Game state remains unchanged.
    * Does not mess with the timelimit.
    * No voting menu required, but works like RTV instead.
    * Admins can force a scramble.
    * Can/has be translated.
    * Admin actions and the result of the scramble are logged.
    * Ensures that the teams actually change.


    Requirements

    * Sourcemod 1.1 or higher
    * Team Fortress 2


    Installation

    * Download the zip file and extract the files to their respective directories in your sourcemod folder.
    * Load the plugin
    * Recommended: Go to your tf/cfg/sourcemod/plugin.votescramble.cfg file and edit the variables to your liking.


    Upgrade from 1.0 to 1.1

    * Download the zip file and extract the files to their respective directories in your sourcemod folder (overwriting the old version of the plugin)
    * Optionally delete tf/cfg/sourcemod/plugin.votescramble.cfg so it will be re-created and include the new cvar sm_scramble_words.
    * Load the plugin
    * Set the value of sm_scramble_words if needed. Version 1.0 used !votescramble by default, to prevent conflicts with other plugins the new cvar is used.


    Convars and commands

    serverredirect.smx
    sm_scramble_delay - After a scramble has been initiated, this amount of seconds must pass before the scramble is executed. (default 5)
    sm_scramble_minplayers - Minimum amount of players to be playing before the scramble can be selected (default 3)
    sm_scramble_percent - Minimum percent of people who should have voted before scramble will take effect (default 0.65)
    sm_scramble_strategy - Scramble algorithm that is to be used. (default 2)
    sm_scramble_timeleft - Minimum time left on the map. If less is remaining, the vote cannot start. (default 0)
    sm_scramble_timepassed - Minimum time which should have passed before the vote can be activated. (default 300)
    sm_scramble_words - Comma seperated list of words that will allow players to vote for scrambling (such as: !scramble, scramble, !teamscramble).
    sm_scramblenow - Scramble the teams.
    sm_scramblereset - Reset the scramble vote. Aborts a scramble if it's in progress and resets all player votes.


    Remarks

    * This plugin can be configured to use the !scramble chat command. Please ensure that there are no other plugins defining 'sm_scramble'. Plugins that do may interfere when an admin says !scramble. You can solve this situation by changing the sm_scramble_words convar or unloading the other plugin.
    * Admin flag needed to execute the commands is ADMFLAG_KICK.


    Screenshots






    Changelog

    1.1 - January 11, 2009
    ? Fixed bug where config file would not be loaded on server startup.
    ? Players are no longer moved to spectator first.
    + Added convar to choose trigger words. Done to avoid conflicts with other plugins.
    + Added HUN translation (thanks to KhyrOO).
    + Added POL translation (thanks to Zuko).
    + Added event handling for changes in convar values.
    + Performance of scramble is logged (as in, amount of players swapped).
    + Added a new (better) algorithm for scrambling

    1.0 - initial release
    Attached Files
    File Type: zip votescramble_1_1.zip (21.1 KB, 2927 views)

    Last edited by Brainstorm; 01-11-2009 at 10:44.
    Brainstorm is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 01-03-2009 , 16:55   Re: TF2 Advanced Vote Scramble
    Reply With Quote #2

    I dont know if you are allowed to use chat commands that other plugins have like !votescramble 2 plugins have it I think. So this wont slay everyone as soon as its called and let the time keep going while half of red is dead and blue is being let out of the gates?
    __________________

    DontWannaName is offline
    Brainstorm
    Member
    Join Date: Aug 2007
    Old 01-03-2009 , 18:05   Re: TF2 Advanced Vote Scramble
    Reply With Quote #3

    No it'll respawn all players, as in a normal scramble. I can change the commands, that's not much of a problem. Might as wel make it a cvar with comma seperated trigger words.
    Brainstorm is offline
    KhyrOO
    Senior Member
    Join Date: May 2008
    Location: Budapest, Hungary
    Old 01-04-2009 , 02:35   Re: TF2 Advanced Vote Scramble
    Reply With Quote #4

    Hi, here is the HUN translation, Nice plugin!
    Attached Files
    File Type: txt votescramble.phrases.txt (3.0 KB, 260 views)
    __________________


    The ForCe will be WiTH U ALwaYs!
    KhyrOO is offline
    Send a message via MSN to KhyrOO
    Zuko
    SourceMod Donor
    Join Date: Sep 2006
    Location: Poland
    Old 01-05-2009 , 03:22   Re: TF2 Advanced Vote Scramble
    Reply With Quote #5

    Translations:
    EN, HU, PL

    I will propably use this plugin on my TF2 server.

    To polish Sourcemod users: Jeżeli uważacie że tłumaczenie jest niepoprawne dajcie mi znać prywatną wiadomością
    Attached Files
    File Type: txt votescramble.phrases.txt (4.3 KB, 243 views)
    __________________

    Last edited by Zuko; 01-05-2009 at 11:16.
    Zuko is offline
    Send a message via ICQ to Zuko
    Nalidor
    Member
    Join Date: Aug 2008
    Old 01-05-2009 , 06:52   Re: TF2 Advanced Vote Scramble
    Reply With Quote #6

    You don't need to move people to spec. You can have the same effect if you call TF2_RespawnPlayer() on all players
    Nalidor is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 01-08-2009 , 02:41   Re: TF2 Advanced Vote Scramble
    Reply With Quote #7

    Nice. Thats one drawback wozers votescramble had, was it relied on the mp_votescramble command, which doesnt work with some admin plugins(will actually crash the server).

    May try this out. Nice work.
    retsam is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 01-08-2009 , 03:11   Re: TF2 Advanced Vote Scramble
    Reply With Quote #8

    This so far has only switched about 2 people every time. Kind of a waste to me?
    __________________

    DontWannaName is offline
    Brainstorm
    Member
    Join Date: Aug 2007
    Old 01-11-2009 , 09:10   Re: TF2 Advanced Vote Scramble 1.1 [Last update: Jan. 11 2009]
    Reply With Quote #9

    Yeah that is possible. The algorithm in 1.0 does not really guarantee any changes, so it's possible that only few players are swapped. But no longer, because here is version 1.1

    Changes:
    FIX: Fixed bug where config file would not be loaded on server startup.
    FIX: Players are no longer moved to spectator first.
    NEW: Added convar to choose trigger words. Done to avoid conflicts with other plugins.
    NEW: Added HUN translation (thanks to KhyrOO).
    NEW: Added POL translation (thanks to Zuko).
    NEW: Added event handling for changes in convar values.
    NEW: Performance of scramble is logged (as in, amount of players swapped).
    NEW: Added a new (better) algorithm for scrambling


    I've edited the topic start to include upgrade instructions. basically you need to upload the new version and optionally set the sm_scramble_words convar to your liking. Also, the scramble will now guarantee that a minimum amount of players will be swapped to the other team.
    Brainstorm is offline
    Zuko
    SourceMod Donor
    Join Date: Sep 2006
    Location: Poland
    Old 01-11-2009 , 11:59   Re: TF2 Advanced Vote Scramble 1.1 [Last update: Jan. 11 2009]
    Reply With Quote #10

    Brainstorm, in polish translation missing polish characters. (in zip file)

    fixed version


    Attached Files
    File Type: txt votescramble.phrases.txt (2.0 KB, 234 views)
    __________________
    Zuko is offline
    Send a message via ICQ to Zuko
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 15:44.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode