Skip to content

toebeann/SnapBuilder

Repository files navigation

SnapBuilder - Snap-to-Grid for Subnautica!

SnapBuilder - Snap-to-Grid for Subnautica & Subnautica: Below Zero!

What is this?

SnapBuilder is the snap-to-grid mod for Subnautica & Subnautica: Below Zero you've been dreaming of!

Features

Configuring SnapBuilder

Installation

Prerequisites (install these first)

Required

Highly recommended

  • Vortex Mod Manager (Windows only) - Makes installing mods a breeze.
  • BepInEx Tweaks - Without this, SnapBuilder and many other BepInEx plugins will be disabled whenever you back out to the main menu and will not work again until you restart the game.
  • Configuration Manager - Allows you to configure your settings for this and many other BepInEx plugins in-game.

Installating SnapBuilder

Automatic (Windows only)

  1. Get Vortex Mod Manager
  2. Click the Vortex button at the top of the relevant Nexus Mods page for this mod to install:

Manual

  1. Click the Manual Download button under the main file of the Files tab of the relevant Nexus Mods page to download:
  2. Extract the contents of the archive into the [game dir]\BepInEx folder

Default controls

The following controls are entirely configurable in-game with Configuration Manager. Simply press F5 to open the configuration window.

  • Toggle snap-to-grid/freehand placement: middle mouse
  • Toggle fine grid snapping: left ctrl
  • Toggle fine rotation snapping: left alt
  • Toggle detailed colliders: f
  • Toggle extended build range: b
  • Increase extended build range: mouse4
  • Decresae extended build range: mouse3
  • Reset extended build range: mouse4 + mouse3

Need help?

Most issues are resolved by carefully re-reading the installation instructions or stickies at the top of the Posts tab on the relevant Nexus Mods page (Subnautica, Below Zero), but if you have stumbled on a bug, please file a bug report on the Bugs tab (Subnautica, Below Zero) with as much information as possible to help me find the cause and get it squashed in an update.

I'm a dev, how do I make my mod compatible?

By default, most items added to the game by other mods should work just fine with SnapBuilder assuming they also work fine in-game. For the edge cases where they do not and SnapBuilder does not understand which way to rotate your items by default, it is easy to make your items compatible without a dependency on SnapBuilder.

On your prefab's model GameObject, simply add a child GameObject named SnapBuilder. Whatever you set the localRotation and localPosition of this GameObject to, SnapBuilder will treat these as the default transformations for the item.

The GameObject named SnapBuilder must be the direct child of the GameObject located at Builder.ghostModel when the user is interacting with the Habitat Builder.

For example:

        public override GameObject GetGameObject()
        {
            GameObject prefab = ... // code to load your prefab goes here

            // Get model
            GameObject model = prefab.FindChild("MY_MODEL'S_TRANSFORM");

            // help snapbuilder understand the model
            var snapBuilder = new GameObject("SnapBuilder");
            snapBuilder.transform.SetParent(model.transform, false);
            snapBuilder.transform.localEulerAngles = new Vector3(-90, -90, 0);

            // do other stuff...
        }

Check out these other mods by Tobey!

Fast Loading Screen

Turboboost your Subnautica loading times!