[SwiftlyS2] Volume.API

## Plugin Name

Volume.API

### Author

aga

### GitHub Repository

[https://github.com/a2Labs-cc/Volume.API\](GitHub - a2Labs-cc/Volume.API · GitHub)

### Description

Volume.API is a shared SwiftlyS2 volume system for CS2 sound plugins. It replaces multiple per-plugin `!volume` / `!vol` commands with a single, centralized volume command and exposes `IPlayerVolumeAPI` to other plugins through the `Volume.Player.v1` shared interface.

Players can set one global volume for all registered sound features or override a specific plugin. For example, QuakeSounds registers itself as the `QuakeSounds` feature with the display name `Quake Sounds`, so players can adjust just QuakeSounds without affecting other plugins. All volume values are persisted per Steam ID through the Cookies plugin.

Key features:

- Centralized `!volume` / `!vol` command with an in-game slider menu.

- Global volume plus per-feature overrides.

- Effective volume resolution: feature override → global volume → default `1.0`.

- Shared `Volume.Contract` assembly for easy integration from other plugins.

- Dual release packages: server plugin + developer contract archive.

### (Optional) Screenshots / Demos

Add images, gifs, or demo links here

### Installation

1. Install [SwiftlyS2](Release Release v1.4.11 · swiftly-solution/swiftlys2 · GitHub) on your CS2 server.

2. Install the [Cookies](Release v1.0.13 · SwiftlyS2-Plugins/Cookies · GitHub) plugin and configure its database connection. **Cookies is required** for volume settings to survive disconnect, map change, or server restart.

3. Download the latest `Volume.API-v{VERSION}.zip` from the [releases page](Release Volume.API | v1.0.0 · a2Labs-cc/Volume.API · GitHub).

4. Extract the `Volume.API` folder into your server’s plugin directory:

```text

…/game/csgo/addons/swiftlys2/plugins/Volume.API/

```

5. Make sure `resources/exports/Volume.Contract.dll` stays inside the `Volume.API` folder. SwiftlyS2 loads the shared contract from that path so consumer plugins can use it.

6. Install any sound plugin that consumes `Volume.Player.v1` (for example, [QuakeSounds](GitHub - a2Labs-cc/SW2-QuakeSounds: SwiftlyS2-QuakeSounds · GitHub)).

7. Restart the server or reload plugins.

8. In-game, type `!volume` or `!vol` to open the volume menu, or use `!volume <0-10>` and `!volume <0-10>` directly.

> :warning: **Cookies is required for persistence.** Without it, volume changes exist only in memory until disconnect or server restart.