Viking_Aquatic_Longship_Hazard_Emergency_Intervention_Mission-ValheimRaftBedFix icon

ValheimRaftBedFix

Never Get Left Behind AGAIN! Persistent ship reconnect and mobile raft bed restoration for Valheim and ValheimRAFT.

Last updated 2 weeks ago
Total downloads 304
Total rating 2 
Categories Mods
Dependency string Viking_Aquatic_Longship_Hazard_Emergency_Intervention_Mission-ValheimRaftBedFix-0.1.5
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202

README

ValheimRaftBedFix

This patches the behavior of a D/C during boat transit, and the issues associated with mobile beds, Attempting to persistent player login and respawn associated with mobile beds and reconnect after ship movement for Vanilla Valheim and ValheimRAFT.


What This Mod Does

Valheim normally saves players at a world position when they disconnect or die.

This creates a major problem for:

  • moving ships
  • longships underway
  • ValheimRAFT mobile bases

If the ship moves while the player is offline, reconnecting or respawning often leaves the player stranded in the ocean.

ValheimRaftBedFix solves this by restoring players relative to the ship itself instead of the original world coordinates.


New in Patch 0.1.5

0.1.5

  • Added server-side ship registry for persistent GUID -> position/zone lookup.
  • Improved reconnect recovery for ValheimRAFT/mobile ships when the ship chunk is not initially loaded.
  • Added safer restore suspension while waiting for a mobile boat to load.
  • Prevented restore attempts from being overwritten by normal logout tracking.
  • Improved durable ship-root detection to avoid attaching GUIDs to temporary/helper raft objects.
  • Improved fallback behavior when the original ship or mobile bed cannot be found.
  • Added better mobile bed validation/destruction handling. Dedicated servers should run the mod as well as clients so the server can keep the ship registry updated when other players move a vessel.

Features

Persistent Ship Logout Restoration

If a player disconnects while aboard:

  • vanilla boats
  • longships
  • Karves
  • ValheimRAFT ships

the mod stores:

  • the ship identity
  • the player's local offset relative to the ship

When the player reconnects:

  • the mod locates the ship
  • waits for stabilization/loading
  • restores the player back onto the ship

even if the ship has moved far away.


Mobile Bed Restoration

Beds attached to moving ships continue functioning even after the ship relocates.

If a player dies:

  • the mod relocates them to the moved ship bed
  • even if the raft has traveled since the bed was originally claimed

Ship Stabilization Protection

The mod waits for:

  • ZDO synchronization
  • physics stabilization
  • ship loading completion

before restoring the player.

This prevents:

  • spawning underwater
  • falling through ships
  • partial-load physics issues

Safe Fallback System

If restoration fails:

  • destroyed ship
  • destroyed bed
  • invalid data
  • timeout

the player is safely teleported to world origin instead of being stranded in the ocean.


Compatibility

Supported

  • Vanilla Valheim ships
  • ValheimRAFT
  • Dedicated servers
  • Multiplayer
  • Singleplayer

Designed For Compatibility

The mod uses Harmony postfix patches and does not suppress vanilla spawn logic.

This greatly reduces compatibility issues with other mods.


Configuration

Configuration file:

BepInEx/config/DarkestResponse.ValheimRaftBedFix.cfg

Available Settings

[General]

## Enable verbose debug logging.
DebugMode = false

## Maximum number of ship restore retry attempts.
MaxRestoreRetries = 120

## Delay between retry attempts.
RetryDelaySeconds = 0.5

## Show center-screen restore status messages.
EnableCenterMessages = true

Default behavior:

  • 120 retries
  • 0.5 second delay
  • 60 second maximum restoration window

Restore Messages

Players may see messages such as:

Please wait while ship finishes loading...
Ship loaded successfully.
Unable to locate your ship or bed.

These are intended to prevent confusion during delayed restoration.


Installation

Install with:

  • Thunderstore Mod Manager
  • r2modman

Or manually:

BepInEx/plugins/ValheimRaftBedFix/

Dependencies

Required:

  • BepInExPack Valheim

Optional:

  • ValheimRAFT

The mod functions correctly even if ValheimRAFT is not installed, but was the original intended target.


Known Limitations

  • Extremely unstable/desyncing ships may require several seconds to restore correctly.
  • If both the ship and mobile bed are destroyed, fallback restoration sends the player to world origin.
  • World origin safety depends on server/world configuration.

Recommended Use

Ideal for:

  • mobile sea bases
  • multiplayer ship crews
  • ValheimRAFT servers
  • long-distance naval exploration
  • Friends with wifi antennas next to microwaves
  • Friends with Dial up (But can they really be your friends?)

Credits

Created by:

Viking Aquatic Longship Hazard Emergency Intervention Mission


Future Plans

Possible future additions:

  • configurable fallback positions
  • admin recovery commands
  • ship ownership tracking
  • optional reconnect invulnerability
  • server-side recovery notifications

Disclaimer

Use at your own risk, I have no skin in this game.

Always back up important worlds and characters before adding gameplay-affecting mods, never backup the ones you hate.