toebeann / SnapBuilder

Snap-to-Grid in Subnautica!
https://www.nexusmods.com/subnautica/mods/427
GNU Lesser General Public License v3.0
5 stars 1 forks source link

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

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.

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

Fast Loading Screen

Turboboost your Subnautica loading times!