Modding

## Modding Helium Rain - overview

**Modding** support in Helium Rain can enable new ships, stations, resources, sectors, or ship upgrades. They cannot add new quests, story, or new C++ functionality - if you want to modify the game sources, please follow the instructions on our public Git repository. Source mods can't be distributed through Steamworks, and by design, a source code mod would behave as an entirely separate game - two source mods can't be combined.

Creating mods will require the Helium Rain Mod Kit, available through the Epic Games Launcher for free. No other software is required. The Helium Rain Mod Kit doesn't provide all game assets, though about half of them are provided for reference. Helium Rain mods can then be distributed through Steamworks and applied automatically to users, but developers can make them available elsewhere to be applied manually on GOG & itch.io releases.

## Creating a mod

To start the modding process, you will need to download the Epic Games Launcher, register, and find the Helium Rain Mod Kit at the bottom of the Store tab. Install it and make sure to remember where the mod kit is installed on your computer, as you will be working from there to set it up. Once installed, the modding SDK should have a few folders - one named "UE\_4.20", which is the engine, and one named "HeliumRainModKit" - everything will happen in that second folder.

Modding will work by creating a **plugin** for the game. We'll create a mod named **ExampleMod** for reference - make sure to always use the same name everywhere, without spaces or special characters. This mod should already exist - make sure to adapt this tutorial to your own mod, or try first with the example.

A plugin has to be created in the **/HeliumRainModKit/Mods** folder of the SDK, and has three mandatory components :

* A plugin file, **ExampleMod.uplugin**, created manually
* A preview image for Steamworks, **Preview.png**, created manually
* A content directory, that will be created through the editor

The syntax of the plugin file is quite easy. Here is an example.

```
   {
   	"FileVersion" : 3,

   	"FriendlyName" : "Example Mod",
   	"Version" : 1,
   	"VersionName" : "1.0",
   	"CreatedBy" : "Deimos Games",
   	"CreatedByURL" : "http://helium-rain.com",
   	"EngineVersion" : "4.20.0",
   	"Description" : "Example mod for the Helium Rain Mod Kit",
   	"Category" : "User Mod",
   	"EnabledByDefault" : true,
   	"Modules" :
           [
           ],
   	"CanContainContent" : true
   }

```

Once this is done, you can launch the Unreal Engine editor right away. You don't need to decide on a great description or a kick-ass preview - you can edit both later and update the mod on Steam.

## Creating content

This part assumes you are familiar with Unreal Engine 4. We won't provide our own guide, or detailed guides on how the game assets are structured.

You will work a lot with the **Content Browser** window. Make sure a folder list panel is visible on the left side of that window - toggle it with the small button below "Add New" on the top left. Your mod folder should appear at this point, this is where you will work from ! You can only add content here - changes elsewhere will not be applied. You can't remove existing content or update a material - you can however copy a material to the mod folder, change it, and use it for your content.

Here are some details on Helium Rain's architecture.

* All of our gameplay data is created through what we call **DataAssets**. You can find many of them in the **/Gameplay/Catalog** folder of the **Content Browser** as examples - look at how they're built, and learn from that.
* Ships or stations have an additional **Template**file, built with UE4's **Blueprint** tool. Templates let us actually design the ship and place parts. These are found in **/Ships/Templates** and **/Stations/Templates**, and are referenced from the DataAssets.
* A new ship would require both a new data asset and a new template. A modified ship could only use a new data asset, and keep the base template.
* A new weapon or engine would require a data asset and a **StaticMesh**.
* New sectors only require a data asset, but can also feature an entire new level, if you add a sub-level to the Space map, and provide its name in the data asset.

Talk with other modders on the Steam forums, or our Reddit forum, to get answers ! The source code for the game is also available if you've got questions.

## Building a mod

To build a mod, you will need to open the **Project Launcher** window in Unreal Engine. Add a new profile using the small "plus" sign on the bottom right, or use the provided "Mod" profile.

We will create a profile that "cooks" a "Shipping" "DLC", using a "PAK file" with compression, based on a previous release of the game. Let's explain all of this.

* Cooking is the process to create a usable mod file for a packaged game. This file will be a .pak file, a compressed archive of your mod.
* Like the following picture, make sure you pick the "HeliumRain" project by browsing for the HeliumRainModKit/HeliumRain.uproject file.
* We will cook for WindowsNoEditor, and LinuxNoEditor. Please cook for the "en" culture.
* What is called DLC here is your mod - use the name of your own mod.
* The release is the name of the folder inside **/Releases/** - currently "1.3.4-modkit".

Once you have filled the details in, run the profile. This will be required for every content update.

## Uploading a mod

This is the easy part. Open a console command (cmd), go to the mod kit folder ("cd /D "C:\...\HeliumRainModKit"), and run the following command :

```
   Boiler --game HeliumRain --mod ExampleMod

```

Your mod will be uploaded as a hidden new project on the Steamworks page for Helium Rain. Look for a menu near your user name to find your uploaded mods, complete the settings, and make it visible. Players can now subscribe to the mod, enabling them next time the game runs. Enabled mods are listed on the bottom of the main menu.