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.2
- Improved reconnect handling for players who disconnect while traveling on vanilla ships or ValheimRAFT vessels
- Improved ship detection for ValheimRAFT
- Improved mobile bed support for ValheimRAFT bases after server restarts or ship movement.
- Added destroyed-bed cleanup for online players, with safe validation for beds destroyed while players are offline.
- Reduced false warning messages on first install or when no mobile spawn data exists.
- Prevented stored ship restore data from being cleared just because the player briefly steps off a ship.
- Added safer stale-data cleanup when stored ship or bed data can no longer be resolved.
- Fixed erronius version numbers
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:
Optional:
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.