[toc]
MonsterTrainManifestExtension
Enable fine-grained control of blocked contents and features for Monster Train mods via modmanifest.json
.
Basic usage
-
Add this NuGet package to your project: https://www.nuget.org/packages/MonsterTrainManifestExtension
-
Modify your
modmanifest.json
according to this documentation. This is an example of modifiedmodmanifest.json
file for Arcadian Clan mod:{ "ModId": 2205081572, "Title": "Arcadian Clan", "Tags": [ "Clan", "Monsters", "Spells", "Artifacts" ], "CosmeticOnly": false, "BranchMetagameSave": true, "ReportRunSummaryAsModded": "OnlyWhenNewClansAreInvolved", "BlockCreatingCustomChallenge": true, "BlockHellRush": false, "BlockAchievements": false, "BlockWinStreaks": false, "BlockCovenantRank": false, "BlockCompendiumVictoryTracking": false, "BlockCompendiumCardTracking": false, "BlockLocalStats": false }
-
Make sure to publish your mod with
MonsterTrainManifestExtension.dll
andNewtonsoft.Json.dll
inplugins
directory.
Advanced usage
The BranchMetagameSave
option isolates the modded progress file. That alone already protects the players from having a save with modded data which might result in an invalid save on the base game synced over the Steam Cloud.
But if you'd like to step further and extensively modify the MetagameSaveData
class in MT, you can follow these steps to ensure it's safe to modify them:
-
Enable
BranchMetagameSave
option ("BranchMetagameSave": true
) -
Add
[BepInEx.BepInDependency("com.nedsociety.monstertrainmanifestextension")]
attribute to your class:[BepInEx.BepInDependency("com.nedsociety.monstertrainmanifestextension")] [BepInEx.BepInPlugin("com.my.mtmod", "MyMtMod", "1.0.0.0")] public class MyMtMod : BepInEx.BaseUnityPlugin { // ...
-
From your
Awake()
, orInitialize()
if you're using Trainworks, check ifMonsterTrainManifestExtension.MonsterTrainManifestExtension.Instance.Enabled
is true. This property indicates whether you're safe to modify the save file or not.if (MonsterTrainManifestExtension.MonsterTrainManifestExtension.Instance.Enabled) { // Modify the MetagameSaveData class or instance. // You can access the instance via Trainworks.Managers.ProviderManager.SaveManager.GetMetagameSave() }
-
Done! Your modifications will be safely serialized into an isolated save.
DISCLAIMER
Monster Train is a trademark of Shiny Shoe LLC. Unless otherwise stated, the authors and the contributors of this repository is not affiliated with nor endorsed by Shiny Shoe LLC.