Thank you for your interest in contributing to Nitrox Unlocked! This guide will help you get started with development, understand our standards, and submit your contributions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Papela/Nitrox-Cracked-Mod/llms.txt
Use this file to discover all available pages before exploring further.
Getting Started
Prerequisites
Before you begin, ensure you have:Development Tools
- Visual Studio 2022 or JetBrains Rider
- .NET 7 SDK or later
- Git for version control
Game Requirements
- Subnautica installed
- Knowledge of C# and Unity basics
- Familiarity with Harmony patching (helpful)
Development Setup
Open Solution
Open
Nitrox.sln in Visual Studio or Rider. The solution contains all projects:- Nitrox.Launcher
- NitroxPatcher
- NitroxClient
- Nitrox.Server.Subnautica
- Nitrox.Model
- Nitrox.Model.Subnautica
- Nitrox.Test
Configure Subnautica Path
The build system will prompt you for your Subnautica installation path on first build. This is needed to reference the game’s assemblies.
The first build may take a few minutes as it resolves NuGet packages and references Subnautica’s assemblies.
Project Structure
Understanding the codebase organization:Building From Source
Build Configurations
- Debug: Includes debug symbols, extended timeouts, verbose logging
- Release: Optimized for production use
Common Build Issues
Subnautica assemblies not found
Subnautica assemblies not found
Ensure your Subnautica path is correctly configured. Check
Directory.Build.targets for the path resolution logic.NuGet restore fails
NuGet restore fails
Type or namespace could not be found
Type or namespace could not be found
Clean and rebuild the entire solution:
Code Standards
We follow specific coding standards to maintain code quality:General Principles
Clean & Minimal
Write concise, readable code. Avoid unnecessary complexity or over-engineering.
No AI Bloat
If using AI for code generation, review and simplify before submitting. We prefer human-written, thoughtful code.
C# Style Guide
Commenting Guidelines
- Do
- Don't
Patch Documentation
Harmony patches should have comments explaining the purpose:Making Contributions
Finding Issues to Work On
- Check the GitHub Issues
- Look for issues labeled
good first issueorhelp wanted - Comment on the issue to indicate you’re working on it
- Ask questions if anything is unclear
Creating a Pull Request
Create a Feature Branch
feature/add-inventory-syncfix/base-deconstruction-crashrefactor/packet-serialization
Test Your Changes
- Build the solution without errors
- Test in-game (both single player and multiplayer if applicable)
- Verify no regressions in existing features
- Add unit tests for new functionality when possible
Pull Request Guidelines
Good PR description:AI Usage Policy
You’re free to use AI tools to assist with code generation, but please review and refine the output before submitting.
Guidelines
- Review AI code carefully: Nitrox interacts intimately with Subnautica’s codebase, which AI models don’t have access to
- Never upload Subnautica source code to AI: The game’s code is copyrighted and uploading it violates copyright law
- Simplify AI output: Remove unnecessary verbosity, comments, and over-engineering
- Understand the code: Don’t submit code you don’t understand
What NOT to do:
Testing
Running Tests
Nitrox includes a test project:Writing Tests
Add tests for new functionality:Debugging
Debugging the Patcher
- Set
NitroxPatcheras startup project - In project properties, set:
- Executable: Path to Subnautica.exe
- Arguments:
--nitrox "path/to/nitrox/launcher"
- Set breakpoints in your patch code
- Press F5 to debug
Debugging the Server
- Set
Nitrox.Server.Subnauticaas startup project - Set breakpoints in server code
- Press F5 to start server in debug mode
- Connect with a client
Logging
Use theLog class for debugging:
- Client: Subnautica’s log directory
- Server: Server’s working directory
Getting Help
Discord Community
Join our Discord server for real-time help and discussion with other developers.
GitHub Issues
Report bugs or request features through GitHub Issues.
Code Review Process
When you submit a PR:- Automated Checks: GitHub Actions will run builds and tests
- Code Review: Maintainers will review your code for:
- Code quality and style
- Functionality and correctness
- Performance implications
- Potential bugs or edge cases
- Feedback: You may receive comments requesting changes
- Approval: Once approved, your PR will be merged
Be patient with the review process. Maintainers are volunteers and may take time to review PRs thoroughly.
Best Practices
Performance
- Avoid allocating in hot paths (every frame)
- Use object pooling for frequently created objects
- Cache references instead of repeated GetComponent calls
- Profile before optimizing (don’t prematurely optimize)
Networking
- Choose appropriate delivery methods for packets
- Batch related updates when possible
- Validate all input from clients on the server
- Never trust client data for authoritative actions
Patching
- Use dynamic patches for multiplayer-only features
- Document why you’re patching (not just what)
- Test patches with game updates (they may break)
- Prefer simple patches over complex transpilers
License
Nitrox Unlocked is licensed under GNU GPL v3. By contributing, you agree that your contributions will be licensed under the same terms.Disclaimer
Official Nitrox support is not responsible for helping with this version. All support should be directed to this project’s community channels.Thank You!
Your contributions help make Nitrox Unlocked better for everyone. Whether it’s code, documentation, bug reports, or community support, every contribution matters. If you found this project helpful, please give it a star on GitHub! ⭐Architecture
Learn about the project structure
Patching System
Understand Harmony patching
Networking
Explore the networking layer
