Getting Started

From Rain World Modding
Jump to navigation Jump to search

Cleanup needed
This article needs structural or tonal clean-up to meet quality standards. Feel free to help improve it.

"I want to make a code mod!"

"I'm new to coding."

Rainworld is coded in C#. You will want a good understanding of it, along with understanding how object orientated programming works. For specific resources on learning C#, see Learning C#

"I understand C#, How do I make mods?"

In general, mods are made by 'hooking' into Rainworld's existing methods, and putting your own code either before or after those methods. For getting started with hooking and Bepin plugins, see BepInPlugins
You will need to download either dnSpy or ILSpy. Both decompile the game's code so you can read it. ILspy is better at decompiling than dnSpy, but has a worse interface.
You can find Rainworld's code in Rain World\RainWorld_Data\Managed\Assembly-CSharp.dll. Simply open this file up with either program.

While a little outdated, Henpe's modding guides are very useful at explaining how the game works. Video 1 is very outdated, however.

When starting out, you'll want to use a mod template to setup your plugin. For example, Noir's mod templates:

You will need to add dependencies to your file. You can do this by right clicking 'dependencies' -> Add Project Reference -> Browse -> then find the .dll files in your Rainworld install (or if you’re depending on a mod, in your Workshop files.) Generally you will want to always depend on Rain World\BepInEx\utils\PUBLIC-Assembly-CSharp.dll and Rain World\BepInEx\plugins\HOOKS-Assembly-CSharp.dll.

"I want to make a custom slugcat!"

Custom slugcats are made easy by using Slugbase. It has its own set of tutorials and documentation on its Github page, along with a template to get started.

"I want to make custom sprites for DMS!"

DMS sprites work very similarly to FancySlugCat sprites. Mehri has made a guide on the steam community explaining how to create them.

"I want to make a custom lizard/variant of any creature!"

Fisobs is used in creating custom creatures. It is made primarily for unique creatures but can also be used to create variants. Fisobs’ examples of a custom creature and item
LB has provided an example of a working Lizard variant to examine, downloadable here.
In general, you want to have Fisobs return the creature/ai/state of what you are making a variant of, and then hook into that creature's methods to change it based on if that creature's template.type is your custom variant's template.

For those making custom lizards based on a lizard customizer lizard, BreedParams is where most of your lizard customizer stats will go.

Lizard customizer is also NOT compatible with Fisobs custom lizards!

"I want to make levels/regions!"

General good advice is to study existing rooms! Your installation of the level editor should come with the project files of all the base game rooms, you can open these up to study. Look at how the tiles and materials were done, along with the general flow of the level.

You can download the Official Level Editor here. An in depth guide to starting with the level editor can be found at Region From The Ground Up

Kaeporo has created a video guide to using the level editor, available here.

When you want to put your levels in game, you will put your rendered level files (a .txt and .pngs for each camera) in:

  • mods\[yourmod'sname]\levels for Arena levels.
  • mods\[yourmod'sname]\world\[regionacronymn]_rooms for region rooms.

For regions you will also need a world_[region acronym].txt in \mods\[yourmod'sname]\world\[regionacronymn]
For example, a region with the acronym GM would have a world_GM.txt in \world\GM, and its rooms would be in \world\GM-rooms

Once in game, you will likely want to change the palette and add effects and objects into the room. You can use Dev Tools to do this. First you need to enable it in the remix menu, then once in game you can enable it by pressing O. The main Dev Tools menu is opened by pressing H. For more info on the devtool's menu, see Dev Tools

Additional Resources

There is also the Community Level Editor. You install it on top of your official level editor. It will add on community materials and effects, along with making the level editor more stable and including reminders for the keybinds!

Timofey's RWE+ is an alternative level editor. It renders using Drizzle, a custom renderer. RWE+ has a more user friendly interface, and Drizzle is a much faster renderer than the normal renderer, with community effects and materials in it.

Solar has collected a repository of community made tiles and props for the Level editor, along with the level project files of many modded regions. Github Link.

Bro has created a world editor program to make it easier to setup a region's connections, spawns, and maps, downloadable from Github here.
Regionkit is a dependency that contains many useful objects and settings such as custom shelter behaviours, custom decals, animated machinery, particles systems etc. These can be accessed primarily through Dev Tools.