Skip to content

A sourcemod plugin and extension that allows players to individually modify the voice volume of other players.

License

Notifications You must be signed in to change notification settings

SouthernCrossGaming/voicemanager

Repository files navigation

Voice Manager

A sourcemod plugin and extension that allows players to individually modify the voice volume of other players.

How To Use

A player can type the command /vm into chat to display a menu that allows them to set volume overrides for players in the server. Overrides can be set for invidual players or globally for all players (individual overrides will take precedence).

277191737-b882ee1c-3e8d-4ca4-94db-0448c03f876a

When a volume adjustment is made, all voice communications from that player will be adjusted accordingly.

There are currently 5 volume levels that can be selected:

277191747-171bb8bf-4a6c-4e0b-a7eb-fb970ec07137

Requirements

Supported Games*

  • Team Fortress 2
  • Open Fortress

* Voice Manager would likely work with any game that supports the steam voice codec. I would be happy to add support for other games by request so long as testing assistance for said game is provided.

Supported Platforms

  • Linux
  • Windows

Sourcemod

  • Version 1.10+

Supported Database Drivers

  • mysql
  • sqlite

Supported Voice Codecs

  • steam (sv_voicecodec steam)

Installation

Download the latest release, unzip and copy to your addons directory.

Add a configuration for the voice manager database to your addons/sourcemod/configs/databases.cfg file. Note that voice manager will use the "default" configuration by default, but this can be configured via cvar, see below.

Configuration

vm_enabled - Enables or disables voice manager (0/1, default 1)
vm_database - Database configuration to use from databases.cfg (default is "default")
vm_allow_self - Allow players to override their own volume. This is recommended only for testing (0/1, default 0)

Commands

/vm | /voicemanager - Opens the Voice Manager menu
/vmclear - Clears the player's overrides from the database

Building

Build Extension for Linux

*Requires Docker (with docker compose) using Linux containers

> .\build_ext.bat
$ ./build_ext.sh

Build Extension for Windows

*Requires Windows environment with Docker (with docker compose) using Windows containers

> .\build_ext_windows.bat

Build Plugin

*Requires spcomp (1.10 or higher) added to your path or to the base directory

> .\build_plugin.bat
$ ./build_plugin.sh

Build All (Windows environment only)

> .\build.bat

VS Code Setup

To setup C++ includes for VS Code, clone sourcemod, metamod, and the tf2 sdk. Include the following paths:

  • ./
  • ./include
  • <sm_path>
  • <sm_path>\public
  • <sm_path>\public\extensions
  • <sm_path>\sourcepawn\include
  • <sm_path>\sourcepawn\third_party\amtl
  • <sm_path>\sourcepawn\third_party\amtl\amtl
  • <mm_path>\core
  • <mm_path>\core\sourcehook
  • <hl2sdk-tf2_path>\public
  • <hl2sdk-tf2_path>\public\tier0
  • <hl2sdk-tf2_path>\public\tier1

Troubleshooting

  • Problem: The VoiceManager plugin/extension did not load.
  • Potential Solution: Check for any errors on startup and ensure that an empty voicemanager.autoload file exists under the addons/sourcemod/extension directory.

  • Problem: When an adjustment is applied, there are no errors but the player does not have any voice output.
  • Potential Solution: Make sure the server is using the steam voice codec (sv_voicecodec steam)

Credits

  • Fraeven (Extension Code, Plugin Code, Testing)
  • Rowedahelicon (Plugin Code, Debugging Assistance, Testing)
  • Many members of the SCG community (Testing)

AlliedModders Thread

https://forums.alliedmods.net/showthread.php?t=344276