Setting up a development environment for Nitrox

Sunrunner37 edited this page Jan 5, 2019 · 21 revisions

Please be aware that this mod is in it's early stages of development, and that the steps below are to set up a development environment for Nitrox. These steps are not for a regular install of this mod. We discourage the use of this mod for casual play until a stable public release has been made.

  1. Pull git repository locally (pass --recursive to git clone to init and clone submodules).
  2. Initialize git submodule(s) by running the following command: git submodule update --init --recursive. This command can also be used to fetch and update changes.
  3. Load .sln inside visual studio
  4. Build entire solution to generate binaries
    • If your Subnautica installation folder is not located in the usual folder (C:\Program Files (x86)\Steam\steamapps\common\Subnautica), a file called DevVars.targets will be generated in the solution directory where an alternative path can be set up. If this file is present, this location will be used regardless of the usual folder.
  5. Inject NitroxPatcher into Assembly-CSharp:
    1. Load up dnspy
    2. Inject before the first line of GameInput.Awake()
    3. Add a reference to NitroxPatcher. This should be in the same directory as Assembly-CSharp. If not, follow step 3 more carefully.
    4. Inject startup code: NitroxPatcher.Main.Execute().
    5. If you get compile errors like in issue 221 you should be able to remove the offending lines without repercussions.
  6. Start Subnautica
  7. Verify Subnautica logs at Subnautica/Subnautica_Data/output_log.txt (Search for nitrox, verify no errors)
  8. Run NitroxServer project and verify that there are no errors
  9. In the client, join a new game by connecting through the multiplayer button in the UI.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.