-
Notifications
You must be signed in to change notification settings - Fork 2
Setting up a mod using ECC
You want to begin setting up a mod like usual. Unfortunately, I do not have the time right now to explain that. Take a look at this guide.
You will want to reference the following DLLS in your C# project:
- In
Subnautica\Subnautica_Data\Managed
:Assembly-CSharp
Assembly-CSharp-firstpass
UnityEngine.AssetBundleModule
UnityEngine.AudioModule
UnityEngine.CoreModule
- DLLs from other mods:
ECCLibrary
SMLHelper
- In
Subnautica\BepInEx\plugins\QModManager
:QModInstaller
In your patch file, make sure to add using ECCLibrary;
.
Asset Bundles are a Unity feature which allows you to efficiently import and load assets at runtime. This is essential for adding models into the game.
You will want a static reference to your AssetBundle in your mod class. The first line in your Patch method should be where you set the reference to this. Go here to learn about loading an AssetBundle.
If your mod uses custom audio, in the next line you should access ECCAudio.RegisterClips
to load all clips from your AssetBundle into ECC's audio list. For more info click here.
Note: The Unity audio system may soon become obsolete in terms of modding, as new methods are added into SMLHelprt for creating FMOD assets. With how ECC works though, using ECCAudio/Unity Audio at all is completely optional.
Example:
using QModManager.API.ModLoading;
using ECCLibrary;
using UnityEngine;
using System.Reflection;
[QModCore]
public static class QPatch
{
public static AssetBundle assetBundle;
[QModPatch]
public static void Patch()
{
assetBundle = ECCHelpers.LoadAssetBundleFromAssetsFolder(Assembly.GetExecutingAssembly(), "deextinctionassets");
ECCAudio.RegisterClips(assetBundle);
//Patch creatures and stuff here
}
}
If you want to start by setting up your mod Unity project (so your mod can have custom assets) click here.
If you are ready to begin writing your own creatures, click here.
This wiki is work in progress. Feel free to contribute.