Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move QModManager code to BepInEx to support Subnautica 2.0 Release #2

Open
jet082 opened this issue Dec 29, 2022 · 1 comment
Open

Comments

@jet082
Copy link

jet082 commented Dec 29, 2022

QModManager has been depricated and does not support Subnautica 2.0. BepInEx is the new standard and thus updating the mod has become necessary.

Per the discord:

Hello @everyone,

We're taking the opportunity provided to us by the Subnautica update to retire QModManager in favour of BepInEx.

As a matter of fact, QMM is not actually a mod loader, but a middle step in the mod loading chain. BepInEx was the mod loader we used, then it loads QModManager, then QModManager loads other mods. So QMM is a mod loader for a mod loader.
This middle step in QMM was very problematic for us and usually caused hundreds of mods to die on the spot after each Subnautica update. Maintaining and developing QMM was also more complicated than it needed to be because any change made caused problems for already existing mods.

QMM will be archived and only used for Subnautica's Legacy branch on steam and moving on, mods will instead use BepInEx as the mod loader.

What does this mean to me as a mod user?
If you're using the Legacy branch in steam for Subnautica, you're fine and no further actions are required.

However, if you're using the latest Subnautica update, "Living Large", you must uninstall QModManager from your game, and look for mods that use BepInEx instead. You can find out how to uninstall QMM in the <#902110747801301023> channel.

What does this mean to me as a modder?
This means you'll need to update your mods to use BepInEx instead of QMM.
Your mod's entry point must be converted from:

using QModManager.API.ModLoading;
using QModManager.Utility;
using HarmonyLib;

[QModCore]
public static class QPatch
{
  [QModPatch]
  public static void Load()
  {
    var harmony = new Harmony("Your unique mod identifier");
    harmony.PatchAll();
  }
}

To BepInEx:

using BepInEx;
using HarmonyLib;


[BepInPlugin(GUID, MODNAME, VERSION)]
public class MyPlugin : BaseUnityPlugin
{
  // You may also use Awake(), Update(), LateUpdate() etc..
  // as BepInEx plugins are MonoBehaviours.
  private void Start()
  {
    var harmony = new Harmony(GUID);
    harmony.PatchAll();
  }
}

For more information on BepInEx, please visit their docs at https://docs.bepinex.dev.

At the meantime, we're also working on an SMLHelper migration to BepInEx, so stay tuned.

@jbeast291
Copy link
Owner

I am working on fixes for 2.0 and should have an update as soon as possible

The day counter chip mod is ready to go whenever SML for 2.0 is out to the public.
Life pod remastered might take some more time as there are some new issues with 2.0 and being on moving objects

Sorry for the wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants