Files
Main File - Version v1.0 Latest
Description
Mods Settings
Adds a Mods tab to Subnautica 2’s settings menu, giving supported mods a dedicated place to register and display their own settings. Required by mods that hook into it, this library also supports settings that can persist between sessions and apply live without reloading a save. Once installed, any compatible mod will automatically populate the tab with its own options.
Installation
Requires UE4SS for Subnautica 2 first, so install that before anything else. Download the latest SN2ModSettings-vX.Y.zip and install it with your mod manager, or manually extract it to <Subnautica 2 install>\Subnautica2\Binaries\Win64\ue4ss\Mods\. Either way, the final folder should be ue4ss\Mods\SN2ModSettings\.
For Linux, Proton, and Steam Deck users, follow the dedicated setup notes in the support post. On its own, this mod adds no visible changes—the Mods tab appears only after at least one supported mod has registered settings.
For mod developers
If your project uses ModSettings, you can message the author to get your mod linked on the page. SN2ModSettings lets mods add a Lua manifest in SN2ModSettings/registrations/, and the library builds the UI using the same widget classes as the vanilla menu. It supports sliders for numbers, toggles for booleans, keybinds for keys, rotators for selecting from preset labels, and optional enabled_by gating so dependent settings can be grayed out.
Each mod gets its own section using the display string as the header, with alphabetical sorting and the library’s own Mod Settings section pinned at the top so the Check for updates toggle always stays visible. The description field appears in the side panel whenever a setting is focused.
If a manifest includes version, the header shows "<display> - vX.Y.Z". If it includes github, the library checks GitHub Releases once per session and appends - Update Available! vA.B.C when a newer tag exists. If it includes nexus_id, the library adds a View on Nexus Mods row at the bottom of the section.
User changes are mirrored to a UE4SS SharedVariable for live cross-mod access and to SN2ModSettings/saved/<your-mod>.lua for persistence. Mods can read the SharedVariable in a LoopAsync and apply changes instantly. Because UE4SS isolates each mod’s _G, SharedVariable is the cross-mod communication channel.
File layout
ue4ss/Mods/SN2ModSettings/registrations/YourMod.lua is the manifest you write at load time, while ue4ss/Mods/SN2ModSettings/saved/YourMod.lua is written by the library with the player’s saved values.
Writing your manifest
Use a short, stable name, since it becomes both the registration filename and the saved-settings filename. Changing it later will orphan existing saved data.
Reading saved values
Each setting is also exposed as a UE4SS SharedVariable in the form SN2ModSettings/<your-mod>/<setting-key>, and the library seeds defaults at startup so the first read returns valid data. The saved file is also written for persistence, but SharedVariable is the fast path for live values.
Pushing values back from your mod
From version 1.2.0 onward, the value-poll loop also pushes external changes back into the UI for toggles. If a game event changes a setting outside the menu, calling ModRef:SetSharedVariable("SN2ModSettings/<your-mod>/<key>", value) will update the menu within about 200 ms.
Keybinds
type="keybind" creates a vanilla-style binding row with a primary and alternate selector. The primary and alt values are saved separately, both flow through the same SharedVariable channel, and rebinding takes effect immediately without a restart if you use the dispatcher pattern.
Rotators
type="rotator" adds the same cycle-style widget used in the vanilla display settings. You provide a list of string options and a default value, and the selected label is saved instead of an index.
C++ mods
C++ mods can register settings too, but they must write the manifest using a path derived from the module location instead of a CWD-relative path. The same manifest keys work for Lua and C++ mods, including version, github, nexus_id, all widget types, and enabled_by gating.
Supported widgets
Supported widgets are slider, toggle, keybind, and rotator. Planned but not yet wired up are combobox, button, and radio.
Gotchas
Defaults are seeded into SharedVariables at startup, so in-Lua defaults matter only before the first read. enabled_by only affects the UI, not the mod logic itself, and the mod still needs to handle its own behavior when a master toggle is off. Also, do not rename the manifest name after release, or users’ saved settings will be lost.
Rate This Mod
Login to rate this mod.
by