-
Notifications
You must be signed in to change notification settings - Fork 5
Modding Tools
The following are commonly used when modding, and it is recommended that you download them.
We use a decompiler to browse the code for Monster Train 2, finding out how the game works at a deeper level, and determining existing functions that need to be patched. It is an essential tool for any modder.
Here are some options on a C# decompiler
Start up the decompiler. Navigate to the MonsterTrain2_Data/Managed folder and open up Assembly-CSharp.dll in it. This is the dll that contains all the code for the game. Later we'll talk about patching methods with Harmony; for now, just know that this is how you figure out which methods to patch.
If you spend some time looking around, you'll notice that the cards are nowhere to be found. There's no Frozen Lance in the code. That's because cards don't have their own classes; they're loaded from Unity assets. In order to view them, we'll need another program:
The unity asset explorer is essential for dumping data from the game. All of the game data can be found in an asset explorer.
There's really only one good option for this right now, and it's AssetStudio
Using it's a bit unintuitive. Follow these instructions exactly.
- Open AssetStudio
- File -> Open Folder
- Select the
MonsterTrain2_Datafolder and open it; it'll take a minute to load - Switch to the
Asset Listtab at the top - Search for a card. For example, Frozen Lance is called
StarterIceSpear. Click it. - Another folder chooser will pop up with absolutely no explanation. Choose the
Managedfolder. If you don't, you'll have to close the whole program and go back to step 1. - You should now see all of Frozen Lance's data on the right side. If you only see a small stub, it's because you didn't choose the
Managedfolder.
The Runtime Unity Editor by ManlyMarco
This is a BepInEx plugin. Install it as you would any other mod. Then, while in game, hit F12, and you should see a Unity GUI. This shows all the objects in the current scene. It's very convenient for both exploration and debugging.
Note
If nothing comes up when hitting F12. Edit the file BepinEx/config/BepinEx.cfg and set HideManagerGameObject to true
A dev console mod allows you options to modify game state, like giving yourself a specific card, artifact, etc. for testing. Pick one and try it out, I wouldn't recommend installing multiple without configurating them as some may use the same hotkey to activate.
Stoker Dev Cheat Screen Dev Cheat Console
Note
Again if nothing comes up when hitting F12. Edit the file BepinEx/config/BepinEx.cfg and set HideManagerGameObject to true