Skip to content

Home Page

Echo edited this page Jan 16, 2026 · 3 revisions

Welcome to the Lizard Template wiki!

This template assumes you have some sort of Visual Studio, or Visual Studio code, and NET4.8 installed, and prior C# knowledge.

Getting started

  • Download the template
  • You can do this by going to the code page and clicking "Code", then Download ZIP.
  • Extract the newly downloaded zip; this should be self explanatory. You can copy it to a new folder, or just edit straight away from the new folder.

  • Open the .csproj located in the folder's src ([folder name]/src/LizardTemplate.csproj), or open the .sln located in the same place.

  • The sln should come with everything you need. If it doesn't, you need Fisobs and all of the other listed dependencies in Visual Studio > EchosLizardTemplate.sln > LizardTemplate.csproj > Dependencies can be found in [Rain World Directory]/BepInEx/. At the time of writing this I don't remember the exact locations, but they should be relatively easy to locate.

  • Now that you have it initially setup, let's go to the next part:

Adding your Lizard

  • Alright! So you have the project set up, but now you have a base Plugin. Make sure to change the namespace to your own. You can do this by, after listing the "usings", do:
namespace MyMod;

and replace "MyMod" with whatever you want to name it.

  • Now, you should see this.
global using LizardTemplate.Lizards;
using BepInEx;
using BepInEx.Logging;
using Fisobs.Core;
using System.Security.Permissions;

#pragma warning disable CS0618
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
#pragma warning restore CS0618

namespace MyMod;

// don't remove any of this, but put additional hooks as needed (not for lizards, those are handled in LizardHooks.cs)
[BepInPlugin("com.author.lizardtemplate", "Lizard Template", "0.1.0"), BepInDependency("io.github.dual.fisobs")]
sealed class Plugin : BaseUnityPlugin
{
    public static new ManualLogSource Logger;
    bool IsInit;

    public void OnEnable()
    {
        Logger = base.Logger;
        On.RainWorld.OnModsInit += OnModsInit;
        On.LizardBreeds.BreedTemplate_Type_CreatureTemplate_CreatureTemplate_CreatureTemplate_CreatureTemplate += On_LizardBreeds_BreedTemplate_Type_CreatureTemplate_CreatureTemplate_CreatureTemplate_CreatureTemplate;
        On.LizardVoice.GetMyVoiceTrigger += On_LizardVoice_GetMyVoiceTrigger;
        // this registers the lizard ingame
        Content.Register(new TestLizardCritob());
    }

    private void OnModsInit(On.RainWorld.orig_OnModsInit orig, RainWorld self)
    {
        orig(self);

        if (IsInit) return;
        IsInit = true;

        // Initialize assets, your mod config, and anything that uses RainWorld here (thanks mod template)
        Logger.LogDebug("Hello world!");
    }
}
  • Right now, your lizard is relatively basic. Nothing special! Just a little guy. We'll do that later. But first, let's get Enums out of the way.

Enums

  • Let's get straight to the point. Enums are what you need to register your creature, and go for basically any sort of modded content. You'll see them in nearly every mod that adds anything new.

  • Open Enums.cs and take a look. You'll see that the variable is TestLizard; change this to whatever, but preferably your Lizard's name. Make sure to change all of the variables from TestLizard to yours.

  • You can add more than one lizard if desired! Just make sure to register/unregister them the same way as before in both CreatureTemplateType and SandboxUnlockID.

  • With that out of the way, let's get to the fun part.

Actually making your lizard

  • This is probably the most fun part, but also the most C# knowledge-demanding part. You'll need to know how to call methods, make overrides, declare variables, and use if statements. If you don't know how to do this, I'd recommend holding off on this until you properly understand C# and Rain World's code.

  • Let's begin by renaming TestLizard.cs to your lizard's name. It can be anything, but like with Enums, should be able to easily tell what it is. For example, you can name it AppleLizard.cs, and it'll be easily identifiable, unlike SillyThing.cs.

  • Now, you'll notice there's a constructor. Here, you can declare modules and color primarily. Do not register anything breed-related here. That's in Hooks.cs!

  • Let's start by changing the color. You can do this by editing the variable effectColor.

  • This one is a bit confusing. Usually, you use Custom.HSL2RGB; I won't be using anything else for the sake of the guide.
  • You'll need a color picker with a float option. Personally, I use this, because the decimal values can be put into Custom.WrappedRandomVariation and Custom.ClampedRandomVariation as floats.

  • Don't mess with the rotModule, as it's for Watcher's rot lizard mechanic.

  • Next, we can move to TestLizardGraphics.cs. Rename that too.

  • After that's been renamed, look inside. This is how you add the graphics features to the lizard (like back spines, or the cyan lizard tail).

  • The AddCosmetic method's second overload should something like so:

spriteIndex = AddCosmetic(spriteIndex, new TailTuft(this, spriteIndex));

i'll finish writing this someday i swear gangalang

Clone this wiki locally