FANDOM


This page lists the steps for adding your own custom slugcat to AndrewFM's "More Slugcats" mod, which can be downloaded from https://maxtcc.github.io/.

Requirements: dnSpy, an image editing program and the modded assembly for More Slugcats.

Portrait files Edit

Navigate to "Rain World\Assets\Futile\Resources\Illustrations" (this is where you installed the image files for the mod. Copy a slugcat_x.png file and a SlugcatPortrait_x.png file. Edit these to suit the needs of your slugcat, and save them as slugcat_7.png and SlugcatPortrait_7.png, respectively.

After saving the files, place them in the folder mentioned above.

DeathPersistentSaveData Edit

Using dnSpy, navigate to the DeathPersistentSaveData class. Once there, locate the SlugcatType enum and add a new field to it. Name this whatever you want, and use a value higher than 6.

Then, navigate to the SaveToString method. In there, you will find several pieces of code similar to this:

else if (this.slugcatType == DeathPersistentSaveData.SlugcatType.MONKCAT)
{
    text += "MONKCAT<dpA>";
}

Add a new piece of code after this one, but replace MONKCAT with what you named your field in SlugcatType.

Then, navigate to the FromString method. Find this piece of code:

else if (a == "MONKCAT")
{
    this.slugcatType = DeathPersistentSaveData.SlugcatType.MONKCAT;
}

After this piece of code, add an identical one but, again, replace MONKCAT with whatever your SlugcatType field was named.

SlugcatSelectMenu Edit

Using dnSpy, navigate to the constructor method of Menu.SlugcatSelectMenu. Once there, find this piece of code:

for (int j = 1; j <= 6; j++)
{
    this.slugcatIllustrations.Add(new MenuIllustration(this, this.pages[0], string.Empty, "slugcat_" + j.ToString(), new Vector2(0.01f, 0.01f), true, false));
}

Change that 6 to a 7. This will you allow you to add one slugcat.

Next, you'll need to adjust the placement of the new menu button that will appear. Find this piece of code:

for (int k = 0; k < this.slugcatIllustrations.Count; k++)
{
    if (k < (this.slugcatIllustrations.Count - 1) / 2)
    {
        this.slugcatIllustrations[k].pos.x = num - num3 - 5f;
    }
    else
    {
        this.slugcatIllustrations[k].pos.x = num + num3 - 5f;
    }

For the sake of the tutorial, we will manually adjust the position of the single new menu button we're adding. Just after the piece of code above, add this:

if (k == 6)
{
   this.slugcatIllustrations[k].pos.x = num - num3 - 115f;
}

Now, navigate to the SetPortraitData method.

After the piece of code for MONKCAT, add the following piece of code.

if (id == 0)
{
   this.slugcatPortraitFacts.text = "The traditional slugcat choice.\n\n+ Well balanced, suitable for new players.\n+ The game as it was meant to be played.";
   this.manager.rainWorld.persistentData.selectedSlugcat = DeathPersistentSaveData.SlugcatType.NORMAL;
   return;
}

Change the 0 to a 6, change the description string to whatever you want (try to follow the format) and change the NORMAL to what you named your SlugcatType.

Customizing your Slugcat Edit

You can do lots of things when customizing your slugcat! Try going into the Player or PlayerGraphics classes.

In here, you can add custom code that only activates when your're using your newly added slugcat. If you want to check if your slugcat is being used, this is a good way to do it:

if ((this.player.room.game.session as StoryGameSession).saveState.deathPersistentSaveData.slugcatType == DeathPersistentSaveData.SlugcatType.AXOCAT)
{
   //Your code here.
}

Of course, the AXOCAT would be replaced with your SlugcatType field.

Community content is available under CC-BY-SA unless otherwise noted.