Skip to content

Pregame

Person8880 edited this page Jul 4, 2022 · 14 revisions

Overview

The pregame plugin provides a way to customise the pre-game time. It offers four modes:

  • TIME - The old mode where you set a fixed pre-game length using the PreGameTimeInSeconds option. Once that time is up, the game starts. This does not require any commanders to start the game.
  • ONE_COMMANDER_COUNTDOWN - In this mode, the game will wait until one team has a commander. Once they do, either the other team gets a commander and the game starts, or the PreGameTimeInSeconds duration passes with only one commander and the game starts. Unlike MAX_WAIT_TIME, this mode starts the PreGameTimeInSeconds timer only after one team has a commander.
  • MAX_WAIT_TIME - In this mode, once either both teams get a commander, or the PreGameTimeInSeconds duration has expired and one team has a commander, the game starts. Note that unlike ONE_COMMANDER_COUNTDOWN, this mode starts the PreGameTimeInSeconds timer immediately from the start of the map/end of the last round.
  • MIN_PLAYER_COUNT - In this mode, the game is only allowed to start when the number of human players on playing teams equals or exceeds MinPlayers and there are two commanders.

Config

The default config looks something like this:

{
    "AbortIfNoCom": false,
    "AbortIfTeamsEmpty": [ 1, 2 ],
    "AllowAttackPreGame": true,
    "AutoAddCommanderBots": true,
    "CountdownTimeInSeconds": 15,
    "LogLevel": "INFO",
    "MaxPlayers": 0,
    "MinPlayers": 0,
    "Mode": "ONE_COMMANDER_COUNTDOWN",
    "PreGameTimeInSeconds": 45,
    "ShowCountdown": true,
    "StartDelayInSeconds": 30,
    "__Version": "1.10"
}

The file should be called "PreGame.json" and should be placed in the directory defined as your plugin config directory (default is config://shine/plugins).

Option Description
AbortIfNoCom If you are using the ONE_COMMANDER_COUNTDOWN or MAX_WAIT_TIME mode, then the countdown to start will be aborted if a commander leaves the chair and this is set to true.
AbortIfTeamsEmpty Sets which team numbers to abort the round start for if they are empty. This is mainly intended for gamemode mods which do not need both teams to start a round.
AllowAttackPreGame If set to false, then attacking is denied for the entire pre-game.
AutoAddCommanderBots Determines whether to add commander bots when starting a round for teams that do not have a commander.
CountdownTimeInSeconds Time to wait when both teams have a commander before starting the game.
MaxPlayers When not using the MIN_PLAYER_COUNT mode, this sets an upper limit on the number of players that can be present on playing teams before reverting to the vanilla starting rules (and thus requiring two commanders to start the game). A value of 0 disables this check.
MinPlayers When using the MIN_PLAYER_COUNT mode, this determines how many human players must be present before the game is allowed to start.
Mode Defines the mode of operation. Should be one of the modes listed above.
PreGameTimeInSeconds See the above descriptions of the modes.
ShowCountdown Determines whether to display a countdown on player's screens for when the round will start.
StartDelayInSeconds If set to a time (in seconds) greater than 0, it will force the game to wait this long after a map change until a game can start.