Sends active talking state to Memory. Supposed to be used in junction with the Positional Audio Mod for GTFO.
- Make sure you have my Positional Audio Mod for GTFO installed in r2modman.
- Run the game modded once, then close it.
- Open r2modman, and go to the Config Editor.
- Click on
BepInEx\config\net.devante.gtfo.positionalaudio.cfg
, then Edit Config. - Change
Enabled
totrue
.
- Download the latest
.dll
on the Releases page. - Open Mumble and open Settings.
- Click on the Plugins tab.
- Click
Install plugin...
- Select the downloaded
.dll
. - Click
Yes
. - Scroll down, and check the box next to TalkState to
Enabled
, withKeyEvents
as well. - Click
Apply
, thenOK
. - Connect to a Server, and launch your game.
As long as the plugin is loaded, it will be sending your voice state to memory. Twice each time you speak; once for
talking
, once fornot talking
.
If you would like to use this to send talking data to your own mod, you certainly can.
It uses a Memory Linked File @ %temp%\posaudio_mumlink
to store a string of the current state. My mod uses the following code to pull the data from the Memory Linked File to the BepInEx Plugin in C#.
static void ReadMemoryMappedFile()
{
var character = Player.PlayerManager.GetLocalPlayerAgent();
const string memoryMappedFileName = "posaudio_mumlink";
const int dataSize = 1024;
Console.WriteLine($"Initiated RMMF!");
while (true)
{
using (var mmf = MemoryMappedFile.OpenExisting(memoryMappedFileName))
{
using (var accessor = mmf.CreateViewAccessor(0, dataSize))
{
byte[] dataBytes = new byte[dataSize];
accessor.ReadArray(0, dataBytes, 0, dataSize);
string receivedData = Encoding.UTF8.GetString(dataBytes).TrimEnd('\0');
// Console.WriteLine($"Received Data: {receivedData}");
if (receivedData == "Talking")
{
// do stuff;
}
}
}
Thread.Sleep(90); // Sleep for 90 milliseconds.
// Adjust update frequency if CPU performance is bad.
}
}
I would 100% change the way this updates. GTFO is stinky and requires you to update the values faster than the game in order for it to work, so you shouldn't have to take such an aggressive approach like I did.
- None. Please report any on the Issue Tracker.