Before you begin
Coding and writing mods is fun! It’s more fun with the support of a community of brilliant, helpful, fellow modders. This guide wouldn’t have been possible without the help and support of this community. Supporting such a community is as much about giving and sharing as it is about receiving help and support.
Therefore, I would suggest you do two things before you begin:
-
Get yourself onto the Subnautica Modding Discord - lurk, get involved, learn, ask questions, it’s all good!
-
Set yourself up a repository on GitHub – sharing and collaborating on code is one of the best ways to learn and improve. It’s easy to do, just get yourself onto GitHub.com and register. We’ll cover creating your first repository in the next section.
Finally, a few more pointers before we start:
Subnautica game versions
You may have read about “Legacy” and “V2.0” versions of Subnautica. It is indeed the case that there are different versions of the game, and those versions require different approaches to modding. For the purposes of this tutorial, I am assuming we’re modding the latest,”V2.0” version of the game. To reiterate: this tutorial does NOT cover modding the “Legacy” branch of the games!
Subnautica and Below Zero
One of the benefits of the “new” versions is that the game code for Subnautica and Below Zero are far more closely aligned than before. For this reason, the tutorial will cover the “Subnautica” game only. The principles and most of the code used can be directly applied to “Below Zero”.
Game installation folders
Where I refer to <game>, this is the folder in which your Subnautica game is installed. For example, for me, it’s:
E:\Games\Steam\steamapps\common\SubnauticaZero
and
E:\Games\Steam\steamapps\common\Subnautica
Tutorial mod source code
You can find the full source code for the sample mods in this repository on GitHub.
Let’s go!
So, choose your path, is it going to be the original Subnautica or Below Zero? Take your pick, and let’s code us a mod!