MVP Anthem lets players pick a custom MVP anthem and volume, then plays it to everyone when that player gets round MVP.
It supports:
- Persistent per-player settings using Cookies.
- MP3 playback through Audio API.
- Sound event playback (
SoundEvent) for event-name sounds. - Per-MVP permissions by SteamID64 or permission flag.
- Random MVP mode per player.
- Localized menu/chat/html messages.
This plugin depends on these shared interfaces:
Cookies.Player.v1/Cookies.Player.V1(Cookies plugin)audio(Audio plugin)
Install both plugins before MVP Anthem.
- Cookies: https://github.com/SwiftlyS2-Plugins/Cookies
- Audio: https://github.com/SwiftlyS2-Plugins/Audio
- Build or download release.
- Copy
plugins/anddata/into your SwiftlyS2 root:game/csgo/addons/swiftlys2/plugins/game/csgo/addons/swiftlys2/data/
- Make sure Cookies and Audio are installed and loaded.
- Start/restart server.
Release/build already includes default MVP sounds:
flawless.mp3florinsalam.mp3
If you copy both plugins and data folders from the release archive, these sounds work immediately.
Commands come from Main.Settings.MVPCommands.
Default:
mvp-> opens the MVP menu.
You can add multiple aliases in config.
The plugin reads from Main.
| Setting | Default | Description |
|---|---|---|
MVPCommands |
["mvp"] |
Command aliases that open menu. |
RemovePlayerInGameMvp |
true |
Clears CS2 native MVP card count for MVP player. |
GiveRandomMVPOnFirstConnect |
true |
On first connect only, assign a random accessible MVP. |
DefaultVolume |
0.2 |
Default volume stored for first connect (0.0..1.0). |
MVPMaxDuration |
10 |
Max total seconds for repeating center HTML MVP message. |
SoundEventFiles |
[] |
Config field kept for compatibility/manual organization. |
ShakePlayerScreen |
true |
Config field currently not used by runtime logic. |
GiveRandomMVPOnFirstJoin is an alias property of GiveRandomMVPOnFirstConnect.
| Setting | Default | Description |
|---|---|---|
FreezePlayer |
true |
Freeze player while menu is open. |
EnableSounds |
true |
Enable menu navigation sounds. |
GradientTitleColor |
true |
Apply gradient menu title with Swiftly helper. |
VolumeOptions |
[0,10,20,40,60,80,100] |
Volume choices shown in volume submenu. |
Structure:
- Category key -> dictionary of MVP items.
- MVP item key -> template object.
Template fields:
| Field | Description |
|---|---|
DisplayName |
Translation key for visible MVP name. |
Sound |
Either .mp3 filename/path or a sound event name. |
EnablePreview |
Shows preview button in MVP actions menu. |
ShowHtml |
Shows center HTML message on round MVP. |
ShowChat |
Shows chat message on round MVP. |
Permissions |
Access list (SteamID64 or permission flags). |
Sound behavior is automatic:
- If it ends with
.mp3-> Audio API playback (IAudioApi). - Otherwise ->
SoundEventemission by name.
- Recommended path: place files in
data/MVP_Anthem/. - In config, use relative name like
"flawless.mp3". - Relative paths resolve from plugin data directory.
- Supports absolute paths too.
Example:
Use a game sound event name:
"mvp_ak": {
"DisplayName": "mvp_ak.name",
"Sound": "Weapon_AK47.Single",
"EnablePreview": true,
"ShowHtml": true,
"ShowChat": true,
"Permissions": []
}Config keys map directly to translation keys.
- Category dictionary key:
- Config:
"category.public_mvp" - Translation:
"category.public_mvp": "Public MVP's"
- Config:
DisplayName:- Config:
"DisplayName": "mvp_1.name" - Translation:
"mvp_1.name": "Flawless"
- Config:
- Round messages use MVP item key:
- For item key
mvp_1, plugin reads:mvp_1.chatmvp_1.html
- For item key
Menu text also comes from translation keys like:
mvp.main_menu<title>mvp.main_menu.select_mvp<option>mvp.preview<option>volume.selected
Permissions in each MVP template uses OR logic:
- Empty list -> everyone can use that MVP.
- Numeric string (SteamID64) -> exact
player.SteamIDmatch grants access. - Non-numeric string -> permission flag checked by
Core.Permission.PlayerHasPermission.
Menu behavior:
- Players only see MVPs they can access.
- Categories with no accessible MVPs are hidden.
When a player gets round MVP:
- Plugin resolves selected MVP.
- If player has random mode enabled, a random accessible MVP is chosen for that round.
- Sound is played to all valid players, including MVP player.
- Each listener hears with their own saved volume.
- Chat and HTML messages are sent if enabled on that MVP.
- HTML uses
SendCenterHTML(..., MVPMaxDuration)directly.
Per-player persisted values:
- Selected MVP key
- Selected sound path
- Volume
HadFirstConnectHasRandomMvp
On first connect:
- volume initializes from
DefaultVolume - random MVP can be assigned if
GiveRandomMVPOnFirstConnectis true
Build generates:
build/
plugins/
MVP_Anthem/
MVP_Anthem.dll
resources/...
data/
MVP_Anthem/
flawless.mp3
florinsalam.mp3
GitHub workflow (.github/workflows/release.yml) creates:
MVP_Anthem.vx.x.x.zip
Archive content:
plugins/...data/...
So server owners can extract both folders directly into addons/swiftlys2/.