Mod preparation

Setting your ModelContainer

As mentioned before, mods are nested inside a container object that has all of the mod's information. Let's start by creating that container.

Create an empty GameObject. One way to do this is to click on "Create Empty" inside the GameObject menu.

You will see that one new item appeared in the Hierarchy window. It's your new empty GameObject. When you create a new GameObject, it will by default be selected, so you can see, on the right, the inspector showing its name, and its Transform component.

Inside the transform, you might see some numbers in the Position field. I'll set mine to zero just to be organized.

Much better! What this does is moving our GameObject to the "center" of the world, to coordinates X:0, Y:0 and Z:0.

Next, you must rename this GameObject. Not only to be organized this time, but this is a requirement that the game imposes. All NPC mods have to be in a container called ModelContainer.

After renaming your GameObject to "ModelContainer", you have to add a component. Click on "Add Component" and type "custom model info". As you type, you'll see components appearing that match your search query. Click on Custom Model Info.

When you do that, a new component will be added.

The Custom Model Info component has a collapsible field called "Custom Model Information". Open it by clicking on it. Inside, there are 4 fields. Leave them all empty for now.

Create another empty GameObject now.

After creating your new empty GameObject, you will have to nest it inside ModelContainer. To do this, grab the new GameObject in the Hierarchy window and drop it inside ModelContainer. If you do it rightm, you will see a triangle to the left side of ModelContainer pointing down. If you click that triangle, ModelContainer will collapse, hidding the nested GameObject. Pressing the triangle again will open it.

You empty GameObject is now what's called a "child" GameObject of ModelContainer. Consequently, ModelContainer is the now the "parent".

Rename the child GameObject. This time, you are free to give it whatever name you feel appropriate. Naturally, it should make sense to the theme of your mod. I'll name mine "Test Mod".

Add a new component to the child GameObject. Press "Add Component" and type "npc skin info". Add this component.

Leave all the fields empty for now.

Note: make sure both "Needs Hair" and "Needs Eyes" fields are checked. If unchecked, the modded character will spawn without hair and eyes.

You are going to need a square image for your mod. In order to get an image in your Unity project, you just need to drag and drop and image file from the Windows Explorer into the Project window in the Unity Editor. You can drop it in the Assets folder.

Note: unless you want to see your image squashed, use a square one. Ideally, 512 x 512 pixels will be more than enough. Larger images will only make your mod bigger.

With your image selected, in the Inspector window you click in the Texture Type dropdown and select Sprite. After you do that, press the "Apply" button in the bottom-right.

Now, select ModelContainer in the Hierarchy window, and drag and drop your image, from the Project window into the Image field in the Inspector window.

Fill in the Name and the Description of your mod.

Drag and drop the child GameObject (Test Mod, in my case) into the Model Prefab field in the ModelContainer. With this step finished, your mod is now properly packaged.

Note: The name Model Prefab is actually a misnomer from my part. This isn't something you need to concern yourself with, but for the sake of clarity, the correct name should be "Model GameObject". The original idea was to actually use prefabs. In practice, that approach didn't work as well, so I ended up not using prefabs, just a standard nest GameObject. Changing the name of this field will also mean changing some other things in code, and I decided to save the trouble.

Compiling your mod

Everything is setup in your ModelContainer, but there are a couple more steps until we can get your mod into the game.

Not only are scenes saved in Unity, but also entire hierarchies of GameObjects. Stored GameObjects are called Prefabs. In order to make a prefab out of your ModelContainer, just grab it in the Hierarchy window and drop it in the Project window. Inside the Assets folder will be fine.

With your ModelContainer prefab selected, you have to click the bottom part of the Inspector window, just where it says "Asset Labels" to open up a sub-panel.

In this new sub-panel, open the AssetBundle dropdown and click "New...".

You will have to type here the name of your mod file. The actual file people will have to download and put in their game's folder. Try to think of a good and unique name.

Don't use spaces. Underscores are fine. Uppercases will be turned into lowercase.

Go to the AssetBundleBuilder menu, and click on Build. You will have to wait for around a minute. If you see nothing happening, minimize the Editor or go to the Windows Explorer.

Note: if there's no StreamingAssets folder inside the Assets folder, you will need to manually create one by right clicking in the Project window, the click on Create > Folder. The project will come with an empty Streaming Assets folder, so you won't have to do this.

After compiling you will see something like this.

Right click on any place in the Project window and select "Show in Explorer".

You'll see that 8 files are generated. Half of them are .meta files, which are files Unity generates for every single file or folder in the Assets folder. Not counting the .meta files, there are 4 files. Two of those, are .manifest files. Orchid Rain doesn't need those. The StreamingAssets file is also completely ignored. This means that out of all those 8 files, the only one we care about is the one that has the name of your mod. You can also tell which one is right file by its size. Naturally, your mod will be the biggest.

Sharing your mod

Now that you know which file is your mod, you can grab that one and share it around. Of course, at this point your mod is totally empty, but at least we can ensure you did everything right by putting it into the game, and seeing if its loaded.

Navigate to the game's folder, and go to Orchid Rain - Mission X_Data > StreamingAssets > models.

Once you are inside the models folder, place your mod file and launch the game. You should see it listed in the Custom Content menu.

Mod listed! Give yourself a cookie on me. Though nothing will happen when you select it, other that reloading the current model.