Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nickj609 authored Jun 10, 2024
1 parent d7a9f59 commit 3968e03
Showing 1 changed file with 42 additions and 39 deletions.
81 changes: 42 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ This plugin is compatible with any RTV plugin using a maplist.txt file.

![Screenshot 2024-03-21 161846](https://github.com/nickj609/GameModeManager/assets/32173425/1e291efb-fe7f-4f0d-bb2c-e21d042bd153)

## Server Commands
## Commands
<details>
<summary>Server Commands</summary>

- `css_rtv <true|false>` - Enables or disables RTV. (_Comming Soon_)

- `css_mapgroup <mg_name>` - Sets the map group and updates the map list and menus.

## Admin Commands
The below commands require the ***@css/changemap*** role.
</details>

<details>
<summary>Admin Commands</summary>

### Maps
- `!map <map name> <id>` - Changes the map to the map specified.

> _The map ID is *optional* and only required for maps that aren't explicitly set for a given map group._
Expand All @@ -51,24 +57,23 @@ The below commands require the ***@css/changemap*** role.

> _It only shows maps for the current game mode/map group._
### Game Modes
- `!mode <mode name> (css_mode)` - Changes the game mode to the mode specified.

> _For example, for **mg_surf** you would do **!mode surf**._
- `!modes (css_modes)` - Displays an admin menu for changing the game mode.

## Game Settings
- `!setting <enable|disable> <setting name> (css_setting)` - Enables or disables a custom game setting.

> _For example, for **enable_movement_unlock.cfg** you would do **!setting movement_unlock**._
- `!settings (css_settings)` - Displays an admin menu for enabling or disabling custom game settings.

## Player Commands
The below commands require the ***@css/cvar*** role.
</details>

## Vote settings
<details>
<summary>Player Commands</summary>

- `!changemode` - Creates a vote to change the game mode (all modes).

![Screenshot 2024-06-08 212539](https://github.com/nickj609/GameModeManager/assets/32173425/f5e3d915-4c01-45d5-95a2-a40b693e17bb)
Expand All @@ -92,6 +97,8 @@ The below commands require the ***@css/cvar*** role.
![Screenshot 2024-06-08 212858](https://github.com/nickj609/GameModeManager/assets/32173425/1ba2a65a-8867-420c-9576-5549fa5e5469)

![Screenshot 2024-06-08 212923](https://github.com/nickj609/GameModeManager/assets/32173425/eb6a198a-a2cf-477b-ba02-ca6469bd38fc)

</details>

## Installation
1. Install Metamod:Source and Counter Strike Sharp.
Expand All @@ -100,8 +107,9 @@ The below commands require the ***@css/cvar*** role.

If you are not using the JSON configuration file for specifying game modes, include the "displayname" property within your `gamemodes_server.txt` or custom map group file for each map group.

<details>
<summary>Example</summary>

### Example
```
"mg_dm"
{
Expand All @@ -123,6 +131,8 @@ The below commands require the ***@css/cvar*** role.
}
}
```

</details>

5. If needed, update each game mode configuration file (i.e. comp.cfg) to include `css_mapgroup <map group>`.
6. After the first run, update the configuration file `GameModeManager.json` as detailed below.
Expand Down Expand Up @@ -176,7 +186,9 @@ The below commands require the ***@css/cvar*** role.
> - All configuration files must be within `/csgo/cfg/`.
> - Your mapgroup file must use `css_mapgroup` to cycle the current map group.
### Default Values
<details>
<summary><b>Click to see Default Values</b></summary>

```
// This configuration was automatically generated by CounterStrikeSharp for plugin 'GameModeManager', at 2024/06/08 09:52:11
{
Expand Down Expand Up @@ -230,43 +242,20 @@ The below commands require the ***@css/cvar*** role.
"ConfigVersion": 2
}
```
</details>

### Languages
This plugin will display all in-game menus and messaging based on the player's preferred language. Below is an example language configuration file you can customize to your liking. The [CS2-CustomVotes](https://github.com/imi-tat0r/CS2-CustomVotes) plugin also has additional language files you can configure.

/lang/en.json
```
{
"plugin.prefix": "[{GREEN}Server{DEFAULT}]",
"changemap.message": "{LIGHTRED}{0}{DEFAULT} has changed the map to {LIGHTRED}{1}{DEFAULT}.",
"changemode.message": "Admin {LIGHTRED}{0}{DEFAULT} has changed the game mode to {LIGHTRED}{1}{DEFAULT}.",
"enable.changesetting.message": "Admin {LIGHTRED}{0}{DEFAULT} has {LIGHTRED}Enabled{DEFAULT} setting {LIGHTRED}{1}{DEFAULT}.",
"disable.changesetting.message": "Admin {LIGHTRED}{0}{DEFAULT} has {LIGHTRED}Disabled{DEFAULT} setting {LIGHTRED}{1}{DEFAULT}.",
"menu.yes": "Yes",
"menu.no": "No",
"menu.enable": "Enable",
"menu.disable": "Disable",
"mode.show.menu-response": "Say {GREEN}!{0}{DEFAULT} to create a vote.",
"mode.vote.menu-title": "Change game mode to {GOLD}{0}{DEFAULT}?",
"modes.menu-title": "Game Mode List",
"modes.vote.menu-title": "Change game mode?",
"map.vote.menu-title": "Change map to {0}?",
"maps.menu-title": "Map List",
"maps.show.menu-response": "Say {GREEN}!{0}{DEFAULT} to create a vote.",
"setting.vote.menu-title": "Change setting {GOLD}{0}{DEFAULT}?",
"setting.show.menu-response": "Say {GREEN}!{0}{DEFAULT} to create a vote.",
"settings.menu-actions": "Setting Actions",
"settings.menu-title": "Setting List"
}
```

## Logging
>[!WARNING]
> Due to the need to parse map groups and settings, you may have difficulties initially configuring the plugin, especially if your gamemodes_server.txt is not configured properly. All logs associated with this plugin can be found in the below location.
>
> `csgo/addons/counterstrikesharp/logs`
### Example
<details>
<summary><b>Example Log</b></summary>

```
2024-06-08 22:59:32.805 +00:00 [INFO] plugin:GameModeManager Loading map groups...
2024-06-08 22:59:32.821 +00:00 [INFO] plugin:GameModeManager Creating game modes...
Expand All @@ -280,12 +269,26 @@ This plugin will display all in-game menus and messaging based on the player's p
2024-06-08 24:15:47.044 +00:00 [INFO] plugin:GameModeManager Game has ended. Picking random map from current map group...
2024-06-08 24:17:76.044 +00:00 [INFO] plugin:GameModeManager Deregistering custom votes...
```

</details>

<details>
<summary><b>Common Error Messages</b></summary>

### Common Error Messages
| Error/Warning Message | Description |
| -------------------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------ |
| `Cannot Find` | Unable to locate the file specified from `GameModeManager.json` config. |
| `Incomplete VDF data` | Your `gamemodes_server.txt` file is not formatted properly in [VDF Format](https://developer.valvesoftware.com/wiki/VDF).|
| `Your config file is too old` | Please backup and remove it from `addons/counterstrikesharp/configs/plugins/GameModeManager` to recreate it. |
| `The mapgroup property doesn't exist` | The "mapgroup" property cannot be found in your `gamemodes_server.txt` file. |
| `Mapgroup found, but the 'maps' property is missing or incomplete` | The "maps" property cannot be found in your `gamemodes_server.txt` file for one of your map groups. |

</details>

## FAQ (Frequently Asked Questions)

<details>
<summary>How do I add custom settings?</summary>
<br>
To add custom settings, create two configuration files with the enable_ and disable_ prefix (i.e. enable_autobhop.cfg, disable_autobhop.cfg). Then, put those files in the `/csgo/cfg/settings/` folder. This is the default settings folder. You can change this folder in the configuration settings.
</details>

0 comments on commit 3968e03

Please sign in to comment.