Skip to content

Commit

Permalink
Merge pull request #858 from splewis/development
Browse files Browse the repository at this point in the history
Release 0.10 merge
  • Loading branch information
nickdnk authored Sep 3, 2022
2 parents 951ff14 + c51adc9 commit 4fe6789
Show file tree
Hide file tree
Showing 57 changed files with 4,545 additions and 3,147 deletions.
3 changes: 3 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ changelog:
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Bug Fixes 🐞
labels:
- "bug"
- title: Other Changes
labels:
- "*"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
artifacts: "artifacts/${{ needs.build.outputs.filename }}.zip,artifacts/${{ needs.build.outputs.filename }}.tar.gz"
prerelease: true
draft: true
commit: "${{ github.sha }}"
tag: "v${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}"
name: "Nightly ${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- "master"
- "development"
- "adjust_docs"
jobs:
build:
name: Deploy docs
Expand Down
2 changes: 0 additions & 2 deletions cfg/get5/live.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,4 @@ sv_holiday_mode 0
sv_talk_enemy_dead 0
sv_talk_enemy_living 0
sv_voiceenable 1
tv_delay 105
tv_delaymapchange 1
tv_relayvoice 0
4 changes: 0 additions & 4 deletions cfg/get5/warmup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ mp_solid_teammates 0
mp_spectators_max 20
mp_startmoney 16000
mp_timelimit 0
mp_warmuptime_all_players_connected 0
sv_alltalk 1
sv_auto_full_alltalk_during_warmup_half_end 1
sv_coaching_enabled 1
Expand All @@ -27,8 +26,5 @@ sv_hibernate_when_empty 0
sv_infinite_ammo 0
sv_showimpacts 0
sv_voiceenable 1
tv_delay 105
tv_delaymapchange 1
tv_relayvoice 0

sv_cheats 0
1 change: 1 addition & 0 deletions configs/get5/example_match.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@
"cvars"
{
"hostname" "Match server #1"
"sm_practicemode_can_be_started" "0" // Disallow enabling practice mode when a match is loaded.
}
}
3 changes: 2 additions & 1 deletion configs/get5/example_match.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
},

"cvars": {
"hostname": "Match server #1"
"hostname": "Match server #1",
"sm_practicemode_can_be_started": "0"
}
}
1 change: 1 addition & 0 deletions configs/get5/scrim_template.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"get5_demo_name_format" "scrim_{TIME}_{MAPNAME}" // Set to "" to disable recording
"get5_kick_when_no_match_loaded" "0"
"get5_print_damage" "1" // Enabling will print damage on round-end.
"sm_practicemode_can_be_started" "0" // Disallow enabling practice mode when a match is loaded.
}
}
23 changes: 16 additions & 7 deletions documentation/docs/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ the entire [match configuration](../match_schema) and the match series score for

The backup system must be [enabled](../configuration/#get5_backup_system_enabled) for this to work.

## How does it work?
### How does it work?

Every time a round starts, CS:GO automatically writes a round backup file into the root of the `csgo` directory based on
the value of `mp_backup_round_file`. The default value for this is `backup`. Get5 reads this file and copies it into its
own file called `get5_backup_match%s_map%d_round%d.cfg`, where the arguments are `matchid`, `mapnumber` and `roundnumber`,
respectively. A special backup called `get5_backup_match%s_map%d_prelive.cfg` is created for the knife round.
own file called `get5_backup_match%s_map%d_round%d.cfg`, where the arguments are `matchid`, `mapnumber`
and `roundnumber`, respectively. A special backup called `get5_backup_match%s_map%d_prelive.cfg` is created and should
be used if you want to restore to the beginning of the map, before the knife round.

## Example
### Example

When in a match, you can call [`get5_listbackups`](../commands/#get5_listbackups) to view all backups for the current
match. Note that all rounds and map numbers start at 0.

They print in the format `filename date team1 team2 map team1_score team2_score`.
They print in the format `filepath date time team1 team2 map team1_score team2_score`.

```
> get5_listbackups
Expand All @@ -37,8 +38,16 @@ get5_backup_match1844_map0_round17.cfg 2022-07-26 19:03:39 "Team A" "Team B" de_
```

To load at the beginning of round 13 of the first map of match ID 1844, all players should be connected to the server,
and you can type:
and you use the [`get5_loadbackup`](../commands/#get5_loadbackup) command:

`get5_loadbackup get5_backup_match1844_map0_round12.cfg`.
`get5_loadbackup get5_backup_match1844_map0_round12.cfg`.

The game should restore in a paused state and both teams must [`!unpause`](../commands/#unpause) to continue.

### Pauses in backups

When restoring from a backup, the [consumed pauses](pausing.md) are reset to the state they were in at the beginning
of the round you restore to, but only if the game state is not currently live. This means that using
the [`!stop`](../commands/#stop) command or the [`get5_loadbackup`](../commands/#get5_loadbackup) command **for the same
match and map** would retain the currently used pauses. If restarting the server or loading the backup from scratch, the
pauses from the backup file will be used.
61 changes: 61 additions & 0 deletions documentation/docs/coaching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# :material-headset: Coaching

Get5 ships with mechanics to manage coaches, but the behavior differs _slightly_ from the built-in coaching
system found in the game, which avoids a
few ["minor" bugs](https://en.wikipedia.org/wiki/Counter-Strike_coaching_bug_scandal).

### Server requirements {: #requirements }

1. [`sv_coaching_enabled`](https://totalcsgo.com/command/svcoachingenabled) must be set to 1.
2. [`coaches_per_team`](../match_schema/#schema) in your match configuration
or [scrim](../getting_started/#scrims) template must be larger than 0.
3. The [`-maxplayers_override`](https://developer.valvesoftware.com/wiki/Maxplayers)
launch parameter must be defined on your server to allow for the number of connected clients you expect, including
all players, spectators and coaches.

### Becoming a coach {: #howto }

Due to internal conflicts with how [backups](backup.md) and auto-assignment to teams works in Get5, the default
[`coach`](https://counterstrike.fandom.com/wiki/Coaching) console command is disabled. You can become a coach in one of
three ways:

1. Use the [`!coach`](../commands/#coach) chat command during warmup.
2. Be defined as a coach in the [match configuration](../match_schema/#schema) or
via [`get5_addcoach`](../commands/#get5_addcoach).
3. Join a game where the team is already full (determined by [`players_per_team`](../match_schema/#schema)) and where a
coach slot is available.

!!! warning "Coaching is permanent after warmup"

Once a game begins (goes past the warmup-phase), you cannot enter or leave the coach slot unless you are removed
from coaching using [`get5_removeplayer`](../commands/#get5_removeplayer).

If the current number of coaches exceeds or equals [`coaches_per_team`](../match_schema/#schema), including if it is
zero, additional players will be kicked from the match. However, if a connecting player is defined
in [`players`](../match_schema/#schema), the team is full and a coach slot is open, they will be moved to coaching for
the series and can only stop coaching if the game is still in warmup.

This behavior allows you to define as many coaches and players in the match configuration as you want: As long as the
number of players and coaches on the server don't exceed [`players_per_team`](../match_schema/#schema)
and [`coaches_per_team`](../match_schema/#schema), respectively, Get5 will fill the
game's slots with the appropriate number of players and coaches and kick the rest. Being in
the [`coaches`](../match_schema/#schema) section takes precedence over [`players`](../match_schema/#schema).

!!! note "Decreasing the number of players"

If a match configuration with [`players_per_team`](../match_schema/#schema) or
[`coaches_per_team`](../match_schema/#schema) set to a number *lower* than the number of players **already connected
to the server**, the entire team's players or coaches (whichever is exceeded) will be kicked and must reconnect.

### Coaching in scrims {: #scrims }

When in [scrim mode](../getting_started/#scrims), you cannot set the [`coaches`](../match_schema/#schema) key, and
players are never _locked_ to the coaching slot. This means that to become a coach in a scrim, you must always
call [`!coach`](../commands/#coach) or join a team that already has [`players_per_team`](../match_schema/#schema)
players (i.e. is full).

!!! danger "`players_per_team` matters!"

Do not set [`players_per_team`](../match_schema/#schema) in your scrim template to a value larger than the number of
players you expect. If you do this, a coach - or any player defined in your scrim template - (re)connecting after
warmup will be put on the team and won't be able to become a coach.
61 changes: 38 additions & 23 deletions documentation/docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Please note that these can be typed by *all players* in chat.

####`!coach`

: Moves a client to coach for their team. Requires that
the [`sv_coaching_enabled`](https://totalcsgo.com/command/svcoachingenabled) variable is set to `1`.
: Requests to become a [coach](coaching.md) for your team. If already coaching, this will move you back as a player
if possible. Can only be used during warmup.

####`!stay`

Expand All @@ -51,13 +51,13 @@ the [get5_stop_command_enabled](../configuration/#get5_stop_command_enabled) is

: Force-readies your team, marking all players on your team as ready.

####`!ringer`
####`!ringer <target>` {: #ringer }

: Adds/removes a ringer to/from the home scrim team.
: Alias for [`get5_ringer`](#get5_ringer).

####`!scrim`

: Shortcut for [`get5_scrim`](#get5_scrim).
: Alias for [`get5_scrim`](#get5_scrim).

####`!get5`

Expand All @@ -74,8 +74,9 @@ Please note that these are meant to be used by *admins* in console.
: Loads a [match configuration](../match_schema) file (JSON or KeyValue) relative from the `csgo` directory.

####`get5_loadbackup <filename>` {: #get5_loadbackup }
: Loads a match backup file (JSON or KeyValue) relative from the `csgo`
directory. Only works if the [backup system is enabled](../configuration/#get5_backup_system_enabled).
: Loads a match backup, relative from the `csgo`
directory. Only works if the [backup system is enabled](../configuration/#get5_backup_system_enabled). If you define
[`get5_backup_path`](../configuration/#get5_backup_path), you must include the path in the filename.

####`get5_last_backup_file`
: Prints the name of the last match backup file Get5 wrote in the current series, this is automatically updated each
Expand All @@ -93,16 +94,18 @@ You should put the `url` argument inside quotation marks (`""`).

Loading remote matches requires the [SteamWorks](../installation/#steamworks) extension.

####`get5_endmatch`
: Force ends the current match. No winner is set (draw).
####`get5_endmatch [team1|team2]` {: #get5_endmatch }
: Force-ends the current match. The team argument will force the winner of the series and the current map to be set
to that team. Omitting the team argument sets no winner (tie).

####`get5_creatematch`
: Creates a BO1 match with the current players on the server on the current map.
####`get5_creatematch [map name] [matchid]` {: #get5_creatematch }
: Creates a BO1 match with the current players on the server. `map name` defaults to the current map and `matchid`
defaults to `manual`. You should **not** provide a match ID if you use the [MySQL extension](../stats_system/#mysql).

####`get5_scrim [opposing team name] [map name] [matchid]` {: #get5_scrim }
: Creates a [scrim](../getting_started/#scrims) on the current map. For example, if you're
playing *fnatic* on `de_dust2` you might run `get5_scrim fnatic de_dust2`. The other team name defaults to "away"
and the map defaults to the current map. `matchid` defaults to an empty string.
: Creates a [scrim](../getting_started/#scrims) on the current map. The opposing team name defaults to `Away`
and the map defaults to the current map. `matchid` defaults to `scrim`. You should **not** provide a match ID if
you use the [MySQL extension](../stats_system/#mysql).

####`get5_addplayer <auth> <team1|team2|spec> [name]` {: #get5_addplayer }
: Adds a Steam ID to a team (can be any format for the Steam ID). The name parameter optionally locks the player's
Expand All @@ -112,8 +115,10 @@ name.
: Adds a Steam ID to a team as a coach. The name parameter optionally locks the player's
name.

####`get5_removeplayer <auth>`
: Removes a steam ID from all teams (can be any format for the Steam ID).
####`get5_removeplayer <auth>` {: #get5_removeplayer}
: Removes a steam ID from all teams (can be any format for the Steam ID). This also removes the player as
a [coach](coaching.md). If [`get5_check_auths`](../configuration/#get5_check_auths) is set, the player will be removed
from the server immediately.

####`get5_addkickedplayer <team1|team2|spec> [name]` {: #get5_addkickedplayer }
: Adds the last kicked Steam ID to a team. The name parameter optionally locks the player's name.
Expand All @@ -124,9 +129,6 @@ name.
####`get5_forceready`
: Marks all teams as ready. `get5_forcestart` does the same thing.

####`get5_dumpstats`
: Dumps current match stats to a file.

####`get5_status`
: Replies with JSON formatted match state (available to all clients).

Expand Down Expand Up @@ -220,15 +222,28 @@ name.
```

####`get5_listbackups [matchid]` {: #get5_listbackups }
: Lists backup files for the current match or a given match ID if provided.
: Lists backup files for the current match or a given match ID if provided. If you define
[`get5_backup_path`](../configuration/#get5_backup_path), it will only list backups found under that prefix.

####`get5_ringer <target>` {: #get5_ringer }
: Adds/removes a ringer to/from the home scrim team. `target` is the name of the player, their user ID or their Steam
ID. Similar to [`!ringer`](../commands/#ringer) in chat.

!!! example "User ID vs client index"

####`get5_ringer <player>`
: Adds/removes a ringer to/from the home scrim team. `player` is the name of the player. Similar
to [`!ringer`](../commands/#ringer)
To view user IDs, type `users` in console. In this example, `3` is the user ID and `1` is the client index:
```
> users
1:3:"Quinn"
```

####`get5_debuginfo [file]` {: #get5_debuginfo }
: Dumps debug info to a file (`addons/sourcemod/logs/get5_debuginfo.txt` if no file parameter is provided).

####`get5_dumpstats [file]` {: #get5_dumpstats }
: Dumps [player stats](../stats_system/#keyvalue) to a file (`addons/sourcemod/get5_matchstats.cfg` if no file
parameter is provided).

####`get5_test`
: Runs get5 tests. **This should not be used on a live match server since it will reload a match config to test**.

Expand Down
Loading

0 comments on commit 4fe6789

Please sign in to comment.