
Mage Arena
You are viewing a potentially older version of this package. View Latest Version

A plugin for Mage Arena that synchronizes mods between host and clients.
ModSync.dll in the BepInEx/plugins folderIf your mod can be considered a "cheat" - You MUST add the "all" tag and follow below, or you risk your mod being removed.
Mod developers can specify their mod's sync type by adding a static field or property named modsync:
public static string modsync = "all"; // Requires matching on both host and client - This is what is considered when syncing lobbies
public static string modsync = "host"; // Only required on host - These do not count for syncing lobbies
public static string modsync = "client"; // Only required on client - These do not count for syncing lobbies
Then add the following code to your awake method:
// Check if ModSync is present before initializing
if (!CheckModSyncDependency())
{
Logger.LogError("ModSync is required but not found! Closing game...");
ShowModSyncMissingMessage();
StartCoroutine(CloseGameAfterDelay(6f));
return;
}
Logger.LogInfo("ModSync found! Initializing mod...");
// Your mod initialization code here
Finally, add the following classes from the ExampleModUsage.cs on the github:
CheckModSyncDependency(),
ShowModSyncMissingMessage(),
CloseGameAfterDelay(float delaySeconds),
ModSyncMissingMessage
Timeout Errors
Mod Mismatches
[ModSync] entriesDonations are never required, but appreciated. The mod will always remain free and up-to-date.
You can submit issues or questions in the modding discord, on my mod-releases thread.