-
Notifications
You must be signed in to change notification settings - Fork 23
Vote Random
The vote random plugin offers a vote to force shuffle the teams either for a set duration or for the next round.
There are four team balancing modes available.
-
Pure random.
-
Hive recorded score per minute played. Anyone with no past score on record or with a past score of 0 is randomised.
-
Past KDR based. Same as the score based, except it uses each player's Hive recorded kill to death ratio to balance the teams. Anyone with a past KDR of 0 is randomised. Assists count for 10 percent of a kill.
-
Using the game's built in skill ranking. This ranking is tracked in some servers and is a fairly reliable data source for balancing. However, the game sometimes has issues getting the ranking data and may leave everyone with a 0 skill rank. This is a problem with the game, not Shine. This mode is not available in NS2: Combat.
If you wish to make a player immune to being forced onto a team, give them access to sh_randomimmune. Note that when the afkkick
plugin is also enabled, all shuffling modes will move players that have been AFK for over a minute into the ready room before shuffling the remaining players.
The team balancing process has 4 phases:
- Find all players viable for balancing, and collect their team preferences if they have any.
- Assign players to teams to have equal amounts of players on both.
- Optimise the teams by simulating player swaps until the teams cannot be improved further.
- If team preferences are tracked, team-specific skills are not being used, and commanders are either swappable or not present, check the final teams to determine if the weighted majority of players have the team they want. If not, swap all marines to aliens and vice-versa.
For Hive skill based shuffling, team and commander skills can be used to provide more information to the team optimiser to balance the teams.
Team skills are used when UseTeamSkill
is enabled under BalanceModeConfig
, and are applied during the simulated swaps based on the target team a player is being swapped to.
Commander skills are used when UseCommanderSkill
is enabled and are applied to players that are a commander at the time a shuffle occurs (using the team-specific value if UseTeamSkill
is enabled). Note that if commanders are considered swappable, their commander skill will only be used when they have not been swapped. Additionally, the use of commander skill values relies on players continuing to be the commander after the shuffle vote. If a player stops being commander, the team balance will likely be disrupted.
When TeamPreferences.PlayWithFriendsWeighting
is not NONE
, players can group up with their friends and the optimiser will attempt to keep them on the same team.
To group with other players, click their name on the scoreboard and choose "Join friend group". You can also add more players to the group in the same way, up to the server's configured maximum. To leave a friend group, click your own name and choose "Leave friend group".
To prevent certain players from adding others to their group, deny access to the sh_add_to_friendgroup
command. Clients may also individually opt to either need to confirm an invite to join a group, or block all invites entirely in the client configuration menu. Additionally, clients may decide whether their groups are open to all, or require an invite.
The default config file should look like this:
{
"ApplyToBots": false,
"AutoShuffleAtRoundStart": true,
"BalanceMode": "HIVE",
"BalanceModeConfig": {
"HIVE": {
"BlendAlienCommanderAndFieldSkills": false,
"UseCommanderSkill": true,
"UseTeamSkill": true
}
},
"BlockAfterRoundTimeInMinutes": 2,
"BlockBotsAfterShuffle": true,
"BlockUntilSecondsIntoMap": 0,
"DisplayStandardDeviations": false,
"EndOfRoundShuffleDelayInSeconds": 30,
"FallbackMode": "KDR",
"HighlightTeamSwaps": false,
"IgnoreCommanders": true,
"IgnoreSpectators": true,
"LogLevel": "INFO",
"NotifyOnVote": true,
"ReconnectLogTimeInSeconds": 0,
"RemoveAFKPlayersFromTeams": true,
"StatsRecording": {
"MinMinutesOnTeam": 5,
"RookieBoundary": 7500,
"RookieStat": "Score"
},
"TeamPreferences": {
"CostWeighting": "MEDIUM",
"FriendGroupInviteCooldownInSeconds": 15,
"FriendGroupInviteDurationInSeconds": 15,
"FriendGroupRestoreTimeoutSeconds": 300,
"MaxFriendGroupSize": 4,
"MaxHistoryRounds": 5,
"MinRoundLengthToRecordInSeconds": 300,
"PlayWithFriendsWeighting": "MEDIUM"
},
"UseLocalFileStats": false,
"VoteConstraints": {
"InGame": {
"FractionNeededToPass": 0.75,
"MinAverageDiffToAllowShuffle": 100,
"MinPlayerFractionToConstrainSkillDiff": 0.9,
"MinPlayers": 10,
"MinStandardDeviationDiffToAllowShuffle": 0,
"StartOfRoundGraceTimeInSeconds": 0
},
"PreGame": {
"FractionNeededToPass": 0.6,
"MinAverageDiffToAllowShuffle": 75,
"MinPlayerFractionToConstrainSkillDiff": 0.9,
"MinPlayers": 10,
"MinStandardDeviationDiffToAllowShuffle": 0
}
},
"VoteCooldownInMinutes": 1,
"VotePassActions": {
"InGame": {
"DurationInMinutes": 15,
"EnforcementDurationType": "TIME",
"EnforcementPolicy": [
{
"MaxPlayers": 0,
"MinPlayers": 0,
"Type": "ASSIGN_PLAYERS"
},
],
"ShufflePolicy": "INSTANT"
},
"PreGame": {
"DurationInMinutes": 15,
"EnforcementDurationType": "TIME",
"EnforcementPolicy": [
{
"MaxPlayers": 0,
"MinPlayers": 0,
"Type": "ASSIGN_PLAYERS"
},
{
"MaxPlayers": 0,
"MinPlayers": 0,
"Type": "BLOCK_TEAMS"
}
],
"ShufflePolicy": "INSTANT"
}
},
"VoteSettings": {
"AFKTimeInSeconds": 60,
"ConsiderAFKPlayersInVotes": true,
"ConsiderSpectatorsDuringActiveRound": true,
"ConsiderSpectatorsInVotes": true
},
"VoteTimeoutInSeconds": 60,
"__Version": "2.12"
}
The file should be called “VoteRandom.json” and should be placed in the directory defined as your plugin config directory (default is config://shine/plugins).
Option | Description |
---|---|
ApplyToBots | Sets whether to consider bots when shuffling teams. When disabled, all bots (except commander bots) will be removed from the server on a successful shuffle. |
AutoShuffleAtRoundStart | Forces teams to be shuffled at the start of each round and changes the vote to instead disable automatic shuffling for the next round if it passes. |
BalanceModeConfig | Configures per-mode configuration options. Currently only the HIVE mode has extra configuration options, which are:
|
BalanceMode | Sets the method the plugin should use to balance the teams. Available modes are:
|
BlockAfterRoundTimeInMinutes | If set to a value greater than 0, it will block votes for shuffling teams after this many minutes into a round. |
BlockBotsAfterShuffle | Sets whether to block bots from being added after a shuffle has occurred until a round has completed (if ApplyToBots is false ). |
BlockUntilSecondsIntoMap | If set to a value greater than 0, it will block votes for shuffling teams until this many seconds have passed after a map change. |
DisplayStandardDeviations | If set to true and the sorting mode is Hive skill, then the standard deviation of Hive skill values for Marines and Aliens will be displayed on the scoreboard. |
EndOfRoundShuffleDelayInSeconds | Sets how long to wait after the end of a round before applying a queued shuffle (from an END_OF_PERIOD shuffle during a round, or an ongoing time-based enforcement of teams). |
FallbackMode | If you are using Hive skill rank sorting, this method will be used to sort those with a 0 skill rank (can be any mode except HIVE ). |
HighlightTeamSwaps | If set to true, players that switch teams will have a pulsing background on the scoreboard for 10 seconds after the team change. |
IgnoreCommanders | Sets whether to ignore commanders when sorting. |
IgnoreSpectators | Sets whether to ignore spectators when sorting. |
NotifyOnVote | Sets whether all players should be notified through the chat when a player votes to shuffle the teams. |
ReconnectLogTimeInSeconds | If set to a value greater than 0, it will log players who reconnect within this number of seconds after a shuffle vote passes. |
RemoveAFKPlayersFromTeams | Sets whether to remove AFK players from teams when shuffling (and move them to the ready room). |
TeamPreferences | Controls how to track players that get to play their preferred team. This is used to attempt to give every player a fair chance at playing the team they want to by remembering who got to play on the team they wanted after a round.
|
VoteConstraints | Controls when a shuffle vote should be permitted and what is required to pass. The behaviour may be configured for votes that pass before a game has started (PreGame ) and for votes that pass during a game (InGame ). The InGame rules can be delayed at the start of a round by using the StartOfRoundGraceTimeInSeconds option (e.g. to allow a lower fraction of votes for shuffle votes right at the start of a round).Configurable options per game state are:
Note that voting will also be permitted if the difference in the number of players on each team exceeds 1, regardless of skill values. |
VoteCooldownInMinutes | Determines the number of minutes to wait after a vote before another can be started. |
VotePassActions | Controls how a shuffle should be applied after a successful vote. The behaviour may be configured for votes that pass before a game has started (PreGame ) and for votes that pass during a game (InGame ).
|
VoteSettings | Allows for controlling whether AFK players and spectators are considered in votes. Set ConsiderAFKPlayersInVotes to false to prevent AFK players from counting towards the total votes. AFKTimeInSeconds controls how long a player should be AFK before they are no longer counted. Set ConsiderSpectatorsInVotes to false to prevent spectators from counting towards the total votes, and ConsiderSpectatorsDuringActiveRound to false (with ConsiderSpectatorsInVotes set to true ) to prevent spectators from voting during an active round. |
VoteTimeoutInSeconds | After this many seconds with no votes, the vote count is reset to 0 if it never passed. |
If you are running a server that is not valid for Hive stats submitting, you can enable a local stats storage which will record kills, deaths, score and playtime of players on your server. This allows the KDR and score per minute modes to function without using the Hive stats system at all.
To populate the values, it will start from the values in the Hive system, if available. Otherwise all values start at 0.
Option | Description |
---|---|
UseLocalFileStats | Enables or disables the use of local file-based stats. |
StatsRecording -> MinMinutesOnTeam | Sets the minimum time a player must be on a team to have a win or loss recorded at the end of the round. |
StatsRecording -> RookieStat | Sets which stat should be used to determine a player's rookie status. Available stats are: Score , Kills , Deaths , Assists , PlayTime , Wins and Losses . |
StatsRecording -> RookieBoundary | Sets the value at which players are no longer considered a rookie. For example, with the default config, a player with greater or equal to 7500 total recorded score will no longer be considered a rookie. |
Command | Chat Command | Arguments | Description |
---|---|---|---|
sh_voterandom | !random or !voterandom or !randomvote or !shuffle or !voteshuffle or !shufflevote | N/A | Votes to shuffle teams. |
sh_enablerandom or sh_forceshuffle | !enablerandom or !enableshuffle or !forceshuffle | <true/false> | Immediately shuffles (or disables team enforcing) without a vote. |
sh_teamstats | N/A | N/A | Displays anonymous team skills, average skill and standard deviation in the console. Only works if Hive skill is the shuffling mode. |