Hello! This is a basic guide for adding a custom airship. As an example, we are going to add a working version of the Tolroko Flyer.

The Asset Bundle

First, make sure your Valheim Unity export is properly set up. You are going to be making an asset bundle with your resources. If you have not yet done this, I have a guide here:

Valheim Mod Dev 2.0: How to create asset bundles with custom items (cleaned up reupload)

Next, you will need to set up your asset. Choose a location in the project and create an empty game object. If you are using your own model, import it now. After importing, you can generate the colliders if you want, or make your own that fit your model. To generate them, choose the "Generate Colliders" option on import:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7dc7de23-0ef4-4a23-a441-b71b50843665/Untitled.png

If you generate your colliders, you will most likely need to swap them to convex colliders to work with the rigidbody setup. You can see the "Convex" option on the mesh collider:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3c2af47a-93d9-4ce5-a604-7053f3b578e6/Untitled.png

After that, add the following 4 scripts and a rigidbody to your base object:

These scripts should have the following settings (with some adjusted to your preference):

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ef788d0f-9ef6-4aa6-a1b7-014f1bd3d7db/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d4435811-b604-4cc6-8840-a1c173374ce4/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d915aae3-7d47-4989-984e-87d813ec934e/Untitled.png

The prefabs targeted in the Wear N Tear script should be your base prefab.

Next, add a new object called OnboardTrigger underneath your base object with only a Box Collider that surrounds your ship. This trigger will let the script know if any players are on board. It should look something like this:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3364474f-825b-4614-9afd-19733674db45/Untitled.png