From 8c10cc0532d972aab819ac1e69f0ea09f2035532 Mon Sep 17 00:00:00 2001 From: "Jakub W." Date: Sun, 25 Aug 2024 01:41:17 +0200 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 94f2715..8f7cda6 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ This plugin is designed to ensure fair and balanced gameplay by intelligently ma ## Installation -1. **Download the Plugin**: Download from releases tab directly: https://github.com/Mesharsky/Advanced-TeamBalance/releases -2. **Upload plugin to your counterstrikesharp folder**: Place the plugin folder inside counterstrikesharp folder. Standard installation. +1. **Download the Plugin**: Download from releases tab directly: [Advanced-TeamBalance Releases](https://github.com/Mesharsky/Advanced-TeamBalance/releases) +2. **Upload plugin to your CounterStrikeSharp folder**: Place the plugin folder inside the CounterStrikeSharp folder. Standard installation. 3. **Configure the Plugin**: Edit the `TeamBalance.toml` file to adjust the settings according to your server's needs (see below for details). 4. **Restart Your Server**: Restart the server to load the plugin with your customized settings. ## Configuration -The plugin comes with a configuration file, `TeamBalance.toml`, that allows you to customize its behavior. Below is a detailed explanation of each setting. (Configuration file is inside Module Directory) +The plugin comes with a configuration file, `TeamBalance.toml`, that allows you to customize its behavior. Below is a detailed explanation of each setting. (Configuration file is inside the Module Directory) ```toml # Plugin Author - Mesharsky @@ -62,34 +62,43 @@ max_team_size_difference = 1 # Default: 2 min_rounds_between_moves = 2 ``` -### Key Settings Explained +## Key Settings Explained + - **`minimum_players`**: The minimum number of players required before the plugin activates. This ensures that balancing doesn't occur when there are too few players to make meaningful adjustments. + - **`score_balance_ratio`**: Controls the ratio of scores between teams that will trigger a rebalance. For example, a ratio of 1.6 means that if one team’s score is 60% higher than the other’s, a balance will be triggered. + - **`use_performance_score`**: When enabled, the plugin uses a custom `PerformanceScore` metric (based on KDA, damage, and score) to determine player value during balancing. This typically results in more effective balancing than using the in-game score alone. + - **`max_team_size_difference`**: Ensures that the team sizes differ by no more than this value after balancing, helping to prevent one team from having a significant player advantage. -### How It Works +## How It Works 1. **Player Stats Collection**: At the start of each round, the plugin collects stats for each player (Kills, Deaths, Damage, Score) and stores them in a cache. + 2. **Balance Check**: The plugin checks whether teams need to be rebalanced based on player count and score ratios. + 3. **Team Balancing**: - If balancing is required, players are evaluated based on their `PerformanceScore` (or in-game score if `use_performance_score` is disabled). - The plugin attempts to distribute players between teams to minimize the score difference while respecting the `max_team_size_difference`. - Only players who need to be moved are affected; those already on the correct team are left in place. + 4. **Feedback**: If a balance is made, players are notified via in-game chat, ensuring transparency. -### Example Scenarios +## Example Scenarios -#### Scenario 1: Uneven Team Sizes +### Scenario 1: Uneven Team Sizes - **Input**: 10 players on the Terrorist team, 1 player on the Counter-Terrorist team. - **Result**: The plugin will move players from the Terrorist team to the Counter-Terrorist team until the difference in team sizes is within the allowed range (defined by `max_team_size_difference`). -#### Scenario 2: High Score Disparity +### Scenario 2: High Score Disparity - **Input**: Terrorist team has a score that is 70% higher than the Counter-Terrorist team. - **Result**: The plugin will trigger a rebalance, moving top-performing players from the Terrorist team to the Counter-Terrorist team to even out the scores. -### Development +## Development + This plugin was developed by Mesharsky. Contributions, issues, and suggestions are welcome! Feel free to open a pull request or issue on GitHub. -### License +## License + This project is licensed under the MIT License - see the LICENSE file for details.