SCG Banner
icon
Bark
Border Collie
Oct 05th
SCG Service member
A Professional Flair
Represent <3 Flair
Pup power! Flair
Discussion: Gscramble - A quick and not so quick rundown posted in Team Fortress 2

To handle balancing / scrambling, we use a plugin called GScramble. It is very modular, however we've had many discussions and votes on it during the early days of SCG where we could never quite agree on anything. The code below is the entirety of the setup as it is right now (As of 3/30/2018).

It is important to note that we use a modified version, with adjustments made from a former SCG member, Dr.Krunklehorn. Our version's auto-balancer will balance the person who the lowest score on the team with more players.

This was done as previously, it would balance the first person to die on the team with more players, which would be quite frustrating to those who've spent the entire game helping a single team to victory. This adjustment is not reflected in the configuration, so the settings for the auto-balance may appear incorrect or non functional!

Here is the entire config for our copy of Gscramble, the balancer and scrambler sections.

// Enable/disable the plugin and all its hooks.
gs_enabled "1"

// **************************
//							*
//  Auto-balance settings	*
//							*
// **************************

// Enable/disable the autobalance feature of this plugin.
// Use only if you have the built-in balancer disabled.
gs_autobalance "1"

// Time in minutes after a client is balanced in which they cannot be balanced again.
gs_ab_balancetime "10"

// Controls who is immune from auto-balance
// 0 = no immunity
// 1 = admins
// 2 = engies with buildings
// 3 = both admins and engies with buildings
gs_ab_immunity "2"

// Max time the teams are allowed to be unbalanced before a balanced is forced on low-priority living players.
// 0 = disabled
gs_ab_max_unbalancetime "10"

// How many of the top players to protect on each team from autobalance.
gs_ab_protect "0"

// If one team has this many more players than the other, then consider the teams imbalanced.
gs_ab_unbalancelimit "2"

// Allow clients to tell the plugin what team they prefer.  When an autobalance starts, if the client prefers the team, it overrides any immunity check.
gs_ab_preference "1"

// Time, in seconds after an imbalance is detected in which an imbalance is flagged, and possible swapping can occur
gs_ab_actiondelay "0"

// If teams become imbalanced by this many players, auto-force a balance
gs_ab_forcetrigger "4"

// If less than this amount of time (in seconds) is left in a round, stop auto-balancing.
// "0" will disable this function
gs_ab_timelimit "0"

// Only balance human players and ignore bots.
gs_ab_humanonly "1"

// Force a balance between each round. (If you use a custom team balance plugin that doesn't do this already, or you have the default one disabled)
// does not require this plugin's autobalacne to be enabled
gs_force_balance "1"

// Time in seconds to protect a client from autobalance if they have recently captured a point, defended/touched intelligence, or destroyed a sentry.
// 0 = disabled
gs_teamwork_protect "60"


// **************************
//							*
//  Auto-scramble settings	*
//							*
// **************************


// Enables/disables the automatic scrambling.
gs_autoscramble "1"

// Auto-scramble only after a full round has completed.
gs_as_fullroundonly "0"

// If a teams wins with a frag ratio greater than or equal to this setting, trigger a scramble
// 0 = disables this check
gs_as_hfragratio "2.0"

// Starts a scramble vote instead of scrambling at the end of a round
gs_as_vote "0"

// If a team wins in less time, in seconds, than this, and has a frag ratio greater than specified: perform an auto scramble.
// 0 = disables this check
gs_as_wintimelimit "120.0"

// Lower kill ratio for teams that win in less than the wintime_limit.
gs_as_wintimeratio "1.5"

// If the average score difference for all players on each team is greater than this, then trigger a scramble.
// 0 = disables this check
gs_as_playerscore_avgdiff "10.0"

// If a team has this many more dominations than the other team, then trigger a scramble.
// 0 = disables this check
gs_as_domination_diff "5"

// If enabled, trigger a scramble if a team never captures the point in koth mode
gs_as_koth_pointcheck "1"

// If enabled, lock teams when a scramble is about to happen until it happens. This will block clients from changing to spectator
gs_as_lockteamsbefore "1"

// If enabled, lock teams the entire next round after a scramble. This will block clients from changing teams
gs_as_lockteamsafter "0"


// **************************
//							*
// global scramble settings *
//							*
// **************************

// Minimum people connected before scrambles are possible
gs_as_minplayers "8"

// If enabled, teams will scramble at the end of the 'waiting for players' period
gs_prescramble "0"

// If a scramble happens during setup, restore the setup timer to its starting value
gs_setup_reset "1"

// Sets if admins and people with uber and engie buildings are immune from being scrambled.
// medics + enginneers are not immune during scrambles at the beginning of the round
// 0 = no immunity
// 1 = just admins
// 2 = charged medics + engineers with buildings
// 3 = admins + charged medics and engineers with buildings.
gs_scramble_immune "2"

// If a scramble-now happens during setup time, fill up any medic's uber-charge.
gs_setup_fill_ubers "1"

// Player scramble sort mode.
// 1 = Random
// 2 = Player Score
// 3 = Player Score Per Minute.
// 4 = Player Kill-Death Ratios
// 5 = Swap the top players on each team, controlled by gs_top_swaps
// 6 = Use GameME rank
// 7 = Use GameMe Skill
// 8 = Use Global GameMe rank
// 9 = Use Global GameMe skill
// 10 = Use GameMe Session
// 11 = Use HlxCe Rank
// 12 = Use HlxCe Skill
// 13 = Sort by player classes
// 14 = Choose randomly one of the above sort modes.
// This controls how players get swapped during a scramble.
gs_sort_mode "1"

// Percentage of players to randomly choose during a random scramble
// min 0.10
// max 0.8
gs_random_selections "0.40"

// The number of players to swap during a top-swap scramble
gs_top_swaps "5"

// If set, it will scramble after a team wins X full rounds in a row
gs_winstreak "2"

// If set, it will scramble every X full rounds
gs_scramblerounds "0"

// If set, then it will block auto-scrambling from happening two rounds in a row. 
// Also stops scrambles from being started if one has occured already during a round.
gs_no_sequential_scramble "0"

// If set, then print scramble stats
gs_as_print_stats "1"

// If set, then grand dueling immunity during a scramble.
gs_as_dueling_immunity "1"


// **************************
//							*
//  admin flag settings	    *
//							*
// **************************
// ** if multiple flags specified, will work if client has just one of these flags


// Admin flags for scramble protection (if enabled)
gs_flags_scramble "ab"

// Admin flags for balance protection (if enabled)
gs_flags_balance "ab"

// Admin flags for team swap block protection (if enabled)
gs_flags_teamswap "bn"


// **************************
//							*
//  generic settings   		*
//							*
// **************************

// Disable most of the frequent chat messages the plugin displays
gs_silent "1"

// Integrate into the sourcemod admin menu
gs_admin_menu "1"

// Enable the mp_forceautoteam command and block people from using the 'jointeam' and 'spectate commands
gs_block_jointeam "0"

// Sets if admins set by 'gs_flags_teamswap' are immune from team swap blocking
gs_teamswitch_immune "1"

// Punish clients trying to restack teams during the team-switch block period by adding time to when they are able to team swap again
gs_punish_stackers "0"

// Time after being swapped by a balance or scramble where players aren't allowed to change teams
gs_changeblocktime "220"

// The plugin will check if people are reconnecting to the server to avoid being forced on a team.  Requires clientprefs
gs_check_reconnect "1"

// Allow clients to choose buddies so that the plugin will try to auto-balance them together, 
// and not scramble buddies who are on the same team
gs_use_buddy_system "0"

// If set, block client changes to spectator that result in a team imbalance
gs_prevent_spec_imbalance "1"

// Select spectators who have recently changed to specator during scrambles and force-balance.
// Setting to 0 disables.
gs_Select_spectators "0"

// **************************
//							*
//  voting settings   		*
//							*
// **************************

// How often, in seconds, to advertise the vote-scramble command
// 0 = Disabled
gs_vote_advertise "500"

// String clients type in chat to trigger a vote
// separate multiple triggers with COMMA
// max of 3 triggers
gs_vote_trigger "votescramble,scramblevote,sausage"

// If set, publicly started votes are disabled when an admin is preset.
gs_vote_adminblock "0"

// 0 will trigger scramble for round end.
// 1 will scramble teams after vote.
gs_menu_votebehavior "0"

// Percentage of votes for the menu vote scramble needed.
gs_menu_votesneeded "0.45"

// Enable/disable public voting
gs_public_votes "1"

// If this many seconds or less is left on the round timer, then block public voting.
gs_public_roundtime "0"

// How to handle the final public vote if there are less that X seconds left in the round, specified by the roundtime cvar.
// 0 = block the final vote.
// 1 = Allow the vote and force a scramble for the next round regardless of any other setting.
gs_public_roundtime_blockmode "0"

// Percentage of people needing to trigger a scramble in chat.  If using votemode 1, I suggest you set this lower than 50%
gs_public_triggers "0.60"

// For public chat votes
// 0 = if enough triggers, enable scramble for next round.
// 1 = if enough triggers, start menu vote to start a scramble
// 2 = scramble teams right after the last trigger.
gs_public_votemode "0"

// Time in seconds after the map has started and after a failed vote in which players can votescramble.
gs_vote_delay "60.0"

// Time in seconds after a successful scramble in which players can vote again.
gs_vote_delay2 "300"

// Minimum people connected before any voting will work.
gs_vote_minplayers "3"
Last edited : by Artemus

icon
Administrator
I have loved the stars too fondly to be fearful of the night🌕
Leukos Arsenikon Crux
Jun 12th
Founder

Note: The default for scramble percentage was 0.65, as of today, I have adjusted it to 0.45. This will hopefully fix problems with scrambling where it seems like the teams simply swapped players and didn't actually fix any unbalancing of player skills.


Report