Setting up a development environment for Nitrox
Please be aware that this mod is in its 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.
Repository setup
- Fork the repository to your own Github account (use the fork button top-right).
- Pull git repository locally:
git clone https://github.com/<your-github-name>/Nitrox.git
- If you want to add the main Nitrox repository as upstream (recommended):
git remote add upstream https://github.com/SubnauticaNitrox/Nitrox.git
.
Nitrox setup (using an IDE)
Make sure Subnautica is not on legacy. The master branch of Nitrox always targets the latest Subnautica code.
- Load
Nitrox.sln
inside MS Visual Studio or JetBrains Rider - Run
dotnet restore
- Build the entire solution. If build fails due to dependency issues then rebuild after trying the following:
- Clear your IDE's index cache AND restart the IDE.
- Use the built NitroxLauncher.exe to start the server and Subnautica.
Nitrox setup (CLI)
Make sure you have an up-to-date Microsoft .NET SDK: https://dotnet.microsoft.com/en-us/download
dotnet build
For release builds, run this command:
dotnet build -c Release
Verify setup
- Run NitroxServer (if not already started) and verify that server window shows no (critical) errors.
- Start Subnautica (if not already started).
- If you see a
Multiplayer
button then Nitrox has been bootstrapped successfully. - Verify Subnautica logs from the
Nitrox Logs
folder in the launcher directory or%UserProfile%\AppData\LocalLow\Unknown Worlds\Subnautica\Player.log
(Search fornitrox
, verify no code exceptions)- NOTE: There will probably be some errors, but nothing substantial in the first part regarding loading of Nitrox.
- On the main menu of Subnautica, join a new game by connecting through the multiplayer button in the UI. If you want to connect to your own server, use the "My server" option which uses 127.0.0.1/localhost IP.