Modding Monster Train – Editing Name of Champion Tutorial

June 22, 2021

Modding

Monster Train


Title:
Monster Train – Shiny Mark mades mods

By:
Good Shepherd Entertainment


Youtube – Tutorial #1

Description:
Extremely basic introduction to setting up a C# project for modding Monster Train (slightly outdated).


Overview

This was an introductory tutorial mostly meant to help you learn how to setup a C# project to mod Monster Train. It has however become slightly deprecated since the DLC was launched, however it did lead to me gaining a better grasp on the logging system for debugging.

Following Tutorial

This tutorial is rather straight forward, but even this had its fair share of issues. One of the first major blocks I ran into and resolved was how strict Harmony is with some of the ways it interacts with the base game code. Specifically, the __result parameters used in the Postfix() methods specifically require EXACTLY 2 underscores before ‘result’. This is actually just part of their system of naming conventions, and is further explained in other Monster Train modding documentation.

The other issue I encountered is that one of the renaming conventions was not working. I was able to change the name on the card (the CardState change), however changing the name while the unit was in the train (the CharacterData change) was not performing as expected. I was able to find through logging that the method being called was indeed returning the string “Hornbreaker Prince” and my system was identifying that, but for whatever reason the result was not changing the ‘in train name’. My suspicion is that an updated underlying system is actually returning the name of the unit back to ‘Hornbreaker Prince’ and it also needs to be changed somewhere else, but I am unsure where that would be.

Either way, changing the name of a card can be done in better ways so this issue does not particularly need resolved. Some others mentioned going through Monster Train’s localization system to find a better place to change the name of a card.

Confirming Updated DLC as Error

To check that this was not just an error in my code or program, I downloaded the existing mod created in the above mentioned tutorial (as it is available in the Steam Workshop). Sure enough, even though it is seen working in the old video, the download of that mod had the same result as my mod. The name on the card was changed to ‘Frank’ but the name on the unit in the train was still ‘Hornbreaker Prince’.

Fig. 1: Showing Side by Side of Where the Name Change Worked and Did Not Work

via Blogger http://stevelilleyschool.blogspot.com/2021/06/modding-monster-train-editing-name-of.html