Vehicle Developer Manual - NeisesMike/VehicleFramework GitHub Wiki

If you have never written a Subnautica mod, this isn't the best place to start.

The best place to start is mroshaw's modding tutorial.

Video Tutorials

Video Guide to make a Submersible from scratch

Video Guide to make a Submarine out of a Submersible

Required Steps for New Vehicles

  1. You must already have a 3D model. This guide won't help you with this.
  2. You must import the 3D model into Unity and use the model to create a prefab.
  3. You must add Colliders to your prefab in order to create the vehicle's collision model.
  4. You must export your finished prefab in an AssetBundle.
  5. You must build the BepInEx plugin that will register your vehicle with Vehicle Framework.
  6. You must put the .dll from your plugin and your AssetBundle in the BepInEx plugins folder.

After that, you should be able to start Subnautica to test your mod.

Optional Features for Vehicles

Submarine-Exclusive Optional Features

Helpful Signals/Interfaces (from Vehicle Framework)

  • IPlayerListener (detail to follow)
  • IAutoPilotListener (detail to follow)
  • ILightsStatusListener (detail to follow)
  • IPowerChanged (detail to follow)
  • IPowerListener (detail to follow)
  • IScuttleListener (detail to follow)
  • IVehicleStatusListener (detail to follow)

Helpful Signals/Interfaces (from Subnautica itself)

  • IHandTarget (detail to follow)
  • IOnTakeDamage (detail to follow)
  • ICraftTarget (detail to follow)
  • IProtoTreeEventListener (detail to follow)
  • LiveMixin.onHealDamage (detail to follow)
  • ItemsContainer.onAddItem (detail to follow)
  • ItemsContainer.onRemoveItem (detail to follow)
  • Equipment.onEquip (detail to follow)
  • Equipment.onUnequip (detail to follow)

To Infinity and Beyond

There are dozens of other virtual fields in ModVehicle that you can override, but I'm not going to talk about them here. If you want to override those, you're an advanced user; you can probably figure it out yourself. If you need help, reach out on the Vehicle Framework Discord Server.

Old Big Guides

You probably don't want to use these. If you can find the information anywhere above, you should prefer it there. I don't think these guides have anything new to say, and a lot of their information is outdated. But I'm not comfortable killing them yet.