ValheimRaftBedFix
Never Get Left Behind AGAIN! Persistent ship reconnect and mobile raft bed restoration for Valheim and ValheimRAFT.
About this mod Author’s original text
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:
- 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.
*
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: