Trying to tweak some settings in a mod for Subnautica 1. It thankfully has a github page, and even has a fork with the change I’m looking for (or close enough): https://github.com/sgsregde-ui/PrimeSonicSubnauticaMods

I can’t get a grasp on how to compile it into the DLL I need, though. I got VS Code and can open the files and make changes, but can’t figure out how to “build” it. It says I need a task, but none of the defaults work. I have no real experience coding or compiling, so I have no idea what’s going wrong here. Any help would be appreciated.

  • Ech@lemmy.caOP
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    Ok, now I’m stuck on hundreds of namespace errors, e.g. The type or namespace name 'TechType' could not be found (are you missing a using directive or an assembly reference?). I’ve tried ItemGroup -> Reference -> Aliases, and that seems to do something, but not fixing things. Will keep poking around at it.

    • Wimopy@feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      I think I’ve found a way to get things to work:

      1. Within UnifiedVSSolution, change Subnautica.selective.slnf line 5 to "PrimeSonicSubnauticaMods/CyclopsNuclearUpgrades/CyclopsNuclearUpgrades.csproj" (if you ever want to build multiple mods, you’d add them as extra lines, comma separated, here)
      2. At the bottom of VS Code: select Subnautica.selective as your solution. Also make sure Subnautica Any CPU is selected. (Or BelowZero for Below Zero of course).
      3. Change the backslashes on line 28 in CyclopsNuclearUpgrades.csproj to forward slashes (no idea why that’s the only time OS-specific folder separators come up as an issue…)
      4. Might need to do a restart or two as prompted by C# Doctor.
      5. At this point I could right-click Subnautica.selective.slnf and hit Build and the output was put in bin/Subnautica

      If you ever want to try something simpler from scratch I can recommend https://subnauticamodding.github.io/Nautilus/guides/dev-setup.html though. And I’m sure the modding discord is very helpful too.

      • Ech@lemmy.caOP
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        That worked! Thanks so much for your patience and effort. I really appreciate it ^.^

        • Wimopy@feddit.uk
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          Happy to help! Just happened to have time during work, and trouble-shooting VS Code (though usually for Java) feels like half my day job anyway.