A Beat Saber mod that implements core custom multiplayer functionality. This is a core mod and doesn't really add anything to the game without a custom server to support it's features. I Recommend BeatTogether.
MultiplayerCore
file listed under Assets
Here.
Artifacts
Here (pick the topmost successful build).Beat Saber.exe
is in).
MultiplayerCore.dll
(and MultiplayerCore.pdb
if it exists) should end up in your Plugins
folder (NOT the one in Beat Saber_Data
).Beat Saber IPA.json
(in your UserData
folder) and change Debug
-> ShowCallSource
to true
. This will enable BSIPA to get file and line numbers from the PDB
file where errors occur, which is very useful when reading the log files. This may have a slight impact on performance.Lastly, check out other mods that depend on MultiplayerCore!
These can be downloaded from BeatMods or using Mod Assistant.
Issues
tab at the top of the GitHub page. This allows any contributor to see the problem and attempt to fix it, and others with the same issue can contribute more information. Please try the troubleshooting steps before reporting the issues listed there. Please only report issues after using the latest build, your problem may have already been fixed.Beat Saber\Logs\_latest.log
(Beat Saber
being the folder Beat Saber.exe
is in)._latest.log
file in your help request.How do I send and receive packets??? ok just do this oh yeah also you have to register the packet before you send it!!!!
// ok cool wanna make a packet?
public class WhateverTheFuckPacket : MpPacket {
public override void Serialize(NetDataWriter writer)
{
// write data into packet
}
public override void Deserialize(NetDataReader reader)
{
// read data from packet
}
}
// ok cool wanna send it and receive it now?
public class WhateverTheFuckManager : IInitializable, IDisposable
{
[Inject]
private readonly MpPacketSerializer _packetSerializer;
public void Initialize()
=> _packetSerializer.RegisterCallback<WhateverTheFuckPacket>(HandlePacket);
public void Dispose()
=> _packetSerializer.UnregisterCallback<WhateverTheFuckPacket>();
public void Send()
{
// send (you can do this from anywhere really that the game can handle it but i prefer to do it here)
_multiplayerSessionManager.Send(new WhateverTheFuckPacket());
}
public void HandlePacket(WhateverTheFuckPacket packet, IConnectedPlayer player)
{
// handle that shit fam
}
}
Anyone can feel free to contribute bug fixes or enhancements to MultiplayerCore. Please keep in mind that this mod's purpose is to implement core functionality of modded multiplayer, so we will likely not be accepting enhancements that fall out of that scope. GitHub Actions for Pull Requests made from GitHub accounts that don't have direct access to the repository will fail. This is normal because the Action requires a Secret
to download dependencies.
Visual Studio 2022 with the BeatSaberModdingTools extension is the recommended development environment.
MultiplayerCore.sln
MultiplayerCore
project, go to Beat Saber Modding Tools
-> Set Beat Saber Directory
Extensions
-> Beat Saber Modding Tools
-> Settings...
MultiplayerCore.csproj.user
file to set the location of your game install. An example is showing below.Example csproj.user File:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BeatSaberDir>Full\Path\To\Beat Saber</BeatSaberDir>
</PropertyGroup>
</Project>
You can support development of MultiplayerCore by donating at the following links: