You are viewing a potentially older version of this package. View all versions.
zolantris-ValheimRAFT-2.1.1 icon

ValheimRAFT

ValheimRAFT - a water vehicles mod for valheim. V2 has new hulls,walls,slabs.

Date uploaded a month ago
Version 2.1.1
Download link zolantris-ValheimRAFT-2.1.1.zip
Downloads 12732
Dependency string zolantris-ValheimRAFT-2.1.1

This mod requires the following mods to function

ValheimModding-Jotunn-2.20.0 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.20.0

README

ValheimRAFT

ValheimRAFT Community Made Boat Hjalmere

This mod aims to continue support for Water based features of the original ValheimRAFT mod and incorporate more vehicle items and mechanics within the mod and further extends it's capabilities.

Background

This repo is a ValheimRaft fork that works with latest Valheim.

The original mod owner Sarcen stopped maintaining the mod August 2023. They gave permission to maintain and open source the mod on 12/25/2023.

Contents

Features

  • Build a RAFT on the water using Valheim's building prefabs.
  • Adds a climbable ladder
  • Add piers that reach the ocean floor (stone and log)
  • Adds anchors
  • Adds custom sails (requires meshes to be working)
  • Adds ropes (requires meshes to be working)
  • Sails now will each contribute to the total shipShip.Speed. Custom Sails do an area calculation while Tier 1-3 sails are preset values.

Community

Join us on discord to get the latest information, upcoming features, and discontain other mods.

Discord Link

Prefabs

Name Icon Description
Hull (Wood) V2 Raft Hull. See more info on Hull Mechanics
Hull (Iron) V2 Raft Hull Iron, See more info on Hull Mechanics
Hull Slab (Wood) V2 Raft Hull Slab 2x2 and 4x4 variants. See more info on Hull Mechanics
Hull Slab (Iron) V2 Raft Hull Slab Iron 2x2 and 4x4 variants. See more info on Hull Mechanics.
Hull Wall (Wood) V2 Raft Hull Wall 2x2 and 4x4 variants. See more info on Hull Mechanics.
Hull Wall (Iron) V2 Raft Hull Wall Iron 2x2 and 4x4 variants. See more info on Hull Mechanics.
Hull Rib (Wood) V2 Raft Hull Rib, a curved hull wall going for 0-90 degrees a combo of 3 hull walls. See more info on Hull Mechanics.
Hull Rib (Iron) V2 Raft Hull Rib, a curved hull wall going for 0-90 degrees a combo of 3 hull walls. See more info on Hull Mechanics.
Rudder Basic Basic Raft Rudder, turns with wheel. First rudder on ship will also move ship's wake effects to it's location. Future updates may add functionality
Rudder Advanced (Iron) Advanced Rudder, a larger rudder that turns with the ship. First rudder on ship will also move ship's wake effects to it's location. No other functionality.
Rudder Advanced (Wood) Advanced Rudder, a larger rudder that turns with the ship. First rudder on ship will also move ship's wake effects to it's location. No other functionality.
Rudder Advanced Twin (Wood) Advanced Rudder, a larger rudder that turns with the ship. First rudder on ship will also move ship's wake effects to it's location. No other functionality.
Rudder Advanced Twin (Iron) Advanced Rudder, a larger rudder that turns with the ship. First rudder on ship will also move ship's wake effects to it's location. No other functionality.
Steering Wheel Steer the vehicle. Steering will be fast on slow speed, medium on half speed, and slow on fast speed. Previously all steering was slow. The direction it faces will determine the direction the boat sails.
Raft Sail Tier 1 Raft Sail. Offers modest sailing power.
Karve Sail Tier 2 Karve Sail offers mid-level sailing power.
Viking Sail Tier 3 Viking Sail offers high-level sailing power.
Custom Sail (3) or (4) corners Tier 1 Custom Sail, Offers a customizable sail of 3 points or 4 point sails. Each sail cubic foot is counted for sailing force. The sails are a balanced at tier1 sailing.
Rope Anchor Connect an infinite number of ropes from this anchor point to the target prefab's center position. To disconnect grab a rope from the anchor point and re-attach to the already attached prefab. It should disconnect the rope. Ropes will not have any affect on physics. They do not anchor the ship.
Rope Ladder Connect a rope ladder to a boat or any building to allow for climbing from the ground up to the building. Will automatically extend to seafloor or ground every couple seconds if the terrain changes.
Boarding Ramp (normal, Wide) Boarding ramp can extend out from 1 - 50+ units. Each unit adds an additional expanded plank. There are no resource costs to increasing the extension bridge size. Boarding ramps collide with the sea so they will effectively hover over the sea. Ramps require network connection in multiplayer to properly work if the player is not the owner.
Dirty (1x1, 2x2) Allows for growing vanilla Valheim crops. Currently does not support mods that utilize heightmaps to determine placement. Each dirt section is not a heightmap.

Installation Guide

:warning: The Raft Mod must be installed correctly in order to resolve Custom Sail materials. :warning:

  • Folder must be placed within <ValheimGameFolder>/BepInEx/plugins/
  • The folder must be named ValheimRAFT or zolantris-ValheimRAFT and contain a Assets folder

Noting that in future updates this may not be required, however loading custom textures will always be supported. This allows players to drag and drop their favorite logos or custom sail textures and see them in game.

Current logos

Name Image
Stag Logo
Pirate Logo

Hull Mechanics

These mechanics apply only to V2 WaterVehicles. The older V1 rafts will never support this feature.

Every piece of hull added to a ship will adjust the ship's floatation. Floatation is determined by the key HullFloatationColliderLocation.

Value Floatation Calculation Description
Average Average is the total number of hull pieces height averaged together.

Example: 4 pieces are used with 0 height and 1 piece at height 5. The average would be (sum of height)/(number of pieces) or 5/5=1 height. If a hull is 4 pieces high the mid point (top of second piece) would be the floatation point
Center The center point between the max height hull piece on a raft and the lowest height hull piece placed on a raft. No quantity will be factored in to determine the center point.
Top The ship will float at the top most hull piece. Likely only useful if using hull pieces to make underwater vehicles
Bottom The lowest most hull pieces will determine the floatation point. Placing other prefabs that are not hull pieces can be done, but any hull piece below another one will make the ship float higher.

Commands

:warning: All Commands require the player to point at a ship to work. :warning:

Name Args Description
vehicle creative aka raftcreative None Temporarily Enables/disables the vehicles's physics AND move the vehicle up in the air based on the creative height set in the config. The Vehicle will float in the air allowing the user to build on the raft with mods that break (or do not have compatibility) with the piece placement Relative Rotation. IE Gizmos. The vehicle should have zero rotation for X and Z axis.
vehicle toggleOceanSway None Permanently Enables/disables the vehicle ocean sway. When disabled it will force the vehicle to only go up or down based on the sea water, it will never sway.
- Not immersive but QOL fix for the seasick.
vehicle recover aka raftrecover None Recovers all vehicles within 1000 units of the player. Only works if the vehicle/raft is broken. If something happened with the render and the vehicle still exists you likely need to restore from a backup. (and also report the issue)
vehicle debug None Enables/disables the debugger dynamically for vehicles, debug menu contains shortcuts for vehicle creative and vehicle toggleOceanSway
vehicle downgradeShipToV1 None Downgrades a V2 ship. If you chose to downgrade due to some issue with the new vehicle...this is not a good idea, but it is provided for compatibility and an option if there are problems with a v2 ship with other mods etc.
This command will be remove in future updates.
vehicle upgradeShipToV2 None Upgrades a V1 ship to a V2 ship. (only works if you downgraded first).
This command will be remove in future updates.

Client/Server/SinglePlayer Support

Server support may or may not work. In >=1.6.2 ships and loading were mainly fixed by adding some threading optimization. There is also a config called ServerRaftUpdateZoneInterval this allows users to tweak the update frequency of checks.

The following has been tested:

  • SinglePlayer
    • boats will load
    • FPS issues with giant ships
  • Client only with a server IE (connecting to server without mod),
    • creating a boat and logging on and off the server does not destroy the boat.
    • sailing and teleporting does not destroy the boat.
    • The client will still be able to create items and the server will keep those raft items. (unless you have mods that garbage collect unused ZDOs)
    • restarting/stopping/starting server keeps the boat.
    • Removing the ValheimRAFT mod from the client will make the server glitch out the boat items.
    • joining back (after adding the mod again) will render the items correctly.
    • Loading a ship into view will possibly
  • Server & Client
    • Loading a 4500 build plan ship. Traveling around a couple sectors. The ship remained as built.
    • Moving away from the ship until it unloaded. Moving back immediately and attempting to land on the ship while it renders. It works and still loads. Looks a bit funny as it spawns.
      • Warning to anyone that builds property next to a large ship, when it renders it's possible a wave could briefly flip it and the top part of the ship rolls and hits property.

Config

Please reference the config output auto-generated document

Issues

If you have a bug, please create an issue under the repo's issues section.

  • Please respect the form. Adding the relevant information makes it easier to triage the problem.

Click here to create an issue now.

Mod Support

In 1.6.0+ this mod supports PlanBuild a popular blueprinting mod.

Support is added via a patch that makes PlanBuild use the Raft localPosition instead of world position which each item could be moving/swaying and updating as the PlanBuild iterated through the items. This easily breaks the Plan save.

  • Hopefully this logic can be incorporated within PlanBuild directly. There is a config toggle to turn this patch off to future-proof things.
  • Alternative approaches for this could be doing a detection if the game object is attached to a parent object and calculating coordinates of the items after all object positions have been fetched.

Noting that Planbuild does not register well with harmony so searching for it is not possible (from what I saw). There is a path resolution and a config flag to enable coordinate fixes. Disable the config value fixPlanBuildPositionIssues and it should no longer cause errors for not having PlanBuild installed.

FAQs

Please read these if you are experiencing trouble.

Help My Raft is A Box

  1. Did you install the ValheimRAFT mod correctly?
    • No? Install it correctly following this guide, otherwise the commands may not work or sails will not be generated.
  2. Did you upgrade from v1.x.x to >=v2.0.0?
    • Run vehicle recontain this command works in >=2.0.2
    • v2.0.0 had to make a plugin GUID change which likely broke the prefab registry of the v1 raft. This GUID change was in order to reset older mods from pointing to the updated ValheimRAFT and breaking features.
  3. Are you manually installing?
    • A: Yes? Don't do it.
    • No: Good Job, debugging the problem should be as simple as unchecking your mods, automatically updating things, and editing your configs.
  4. Did you install a mod that is crashing the bepinex plugins?
    • Try to remove mods that are older. Many mods are not meant to endure updates from valheim and need a fix to make their code stable again. Disable all older mods and only include ValheimRAFT, Jotunn, and BepInEx.
  5. Did you install a mod that overrides ValheimRAFT code?
    • Mods that override Player.PlacePiece will cause problems with piece placement.
      • Example Gizmos overrides the rotations and angles of pieces so it is not compatible for a boat in motion. Use vehicle creative or raftcreative to make the ship stop moving and place pieces.
    • Mods that override Player.GetControlledShip will cause the boat to be unable to interact or update hud or be controlled.
    • Mods that adjust or change Ship Values from Valheim will no longer affect the V2 WaterVehicle. This means the Vehicle is much more resilient and more compatible with mods that add new ships but also means it has it's own logic so the ship will not benefit OR break from those mods.

Help My Raft Turns into a Box when I load the area

  1. Are you on a dedicated server?
    • No? Switch to a dedicated server. The raft mod may not be stable when hosting from a LAN IP. This likely was fixed in >=2.0.0. But will continue to be an issue if you are using a v1 raft.
    • No, But I'm on single player...
      • Submit a bug report. Single player should render correctly. If you only have ValheimRAFT + Jotunn and absolutely trust your mod list.

Help My Raft went underground

  • For now there is no command to save your raft.
  1. Download Unity Explorer

  2. Under Object list search for WaterVehicleShip it should show up as ValheimVehicles_WaterVehicleShip

  • ValheimVehicles is a prefix for anything related to V2 RAFT/Vehicles mod.
  • If you see multiple ships, make sure you click the green box to Enable/disable them to confirm you are changing the correct ship.
  1. Change the height of the vehicle by clicking on the Object and within inspector - another pannel, click on local position and change the Y coordinate to +20 height or more.
    • Make sure you never change the x or z positions otherwise the boat might be removed from rendering and be sent to the other side of the world.
    • Example Position 1600.084 29.7749 1685.39 Set to 1600.084 50 1685.39

Help My Raft Is Sinking When I Build Hulls

  1. Please read the guide on Vehicle Hulls? Each Hull affects the floatation of the vehicle.
  2. Select the correct config and add or remove a piece to see the ship update based on the new config value.

My Bed does not update

This is a known issue do the following work-around.

  • Every time the raft is moved and then stopped. Rebuild your bed and then set your spawn again.

This may be resolved in future updates.

Graphics

This project supports both Vulkan and Direct3D11 as of >=1.6.11. Previously it only supported Direct3D11.

Contributing

  1. Please fork the codebase and make a pull request via your fork branch.
  2. Changes need to be feature based IE keep the changes minimal and single focused. Larger changes are welcome, but they have higher chance of breaking other things and are harder to maintain.
  3. If you want to directly get involved. Reach out on discord.
  4. Please read the Contributing.md document for more information

Maintainers

Name Date Active
Zolantris 12-2023 - present Active
Sarcen 04-2021 - 08-2023 Inactive

Attribution

Name Contributions
Sarcen For creating the initial mod and supporting it until v1.4.8!
Zolantris For supporting and expanding the Raft Mod since v1.5.0.
RacerX For contributing a stag icon for sails - Looks awesome! And for making some other unreleased assets.

Support Open Source

Buy Me a Coffee at ko-fi.com

Logging Metrics

These packages may contain logging. Logging can be opted out by any user by unchecking enableMetrics. If you choose to opt-out, please be aware, this will make it more difficult to troubleshoot issues.

  • Logging does not do anything without a SentryUnityPlugin package that has not been made available to the community (yet). In future updates Sentry logging will be recommended to beta testing players so benchmarks can be collected related to Vehicle performance.

What information will be collected

  • Paths related to Valheim Game directory
  • Paths related to ValheimRAFT / ValheimVehicles plugin directory such as symlinked directories from vortex mod installer or directories created by r2modman or thunderstore.
  • Health related to the ValheimRAFT mod. It will track performance, slowdowns, and bottlenecks making it significantly easier to debug.

This logging has yet to be implemented.