StartSpawnOnDeath
Server-side Valheim mod that returns only the player who dies to the Sacrificial Stones after respawn while beds remain usable for sleeping. Vanilla clients need no mod.Start Spawn On Death - by: PattPC
A small server-side only Valheim mod for dedicated servers.
When a player dies, Valheim is allowed to perform its normal death and bed-respawn flow. As soon as that player is alive again, the dedicated server returns that player only to the world's Sacrificial Stones / StartTemple.
Clients do not need BepInEx or this mod.
The mod can be used in singleplayer worlds aswell, but is not required for each client in a multiplayer world, only the hosts' server files.
Features
- Server-side only; vanilla clients can join normally.
- Only the player who died is teleported.
- Beds remain fully usable for claiming and sleeping.
- Normal tombstones, skill loss, item loss, raids, combat, food and progression are untouched.
- Uses Valheim's existing vanilla player teleport RPC instead of a custom client RPC.
- Verifies that the player actually reached
StartTempleand retries if necessary. - Can remember an unfinished death return across disconnects/server restarts.
- Large centered death-return announcement enabled by default.
- Optional vanilla chat/shout announcement, disabled by default.
Default announcement:
"{player} died and was returned to the Sacrificial Stones."
Requirements
- Valheim Dedicated Server
- BepInExPack for Valheim installed on the server
- Current Valheim 1.0-compatible BepInExPack
No client-side installation is required.
Installation
Thunderstore / mod manager package
Install the package on the dedicated server profile. The package places: "BepInEx/plugins/StartSpawnOnDeath/StartSpawnOnDeath.dll" on the server.
Manual installation
- Stop the dedicated server.
- Install BepInExPack for Valheim on the server if needed.
- Create: BepInEx/plugins/StartSpawnOnDeath/
- Copy
StartSpawnOnDeath.dllinto that folder. - Start the server.
The config is generated automatically at: "BepInEx/config/startspawnondeath.cfg"
Default configuration
The default presentation is intentionally simple: the larger center-screen announcement is enabled and the smaller chat/shout message is disabled.
[Chat] BroadcastDeathReturn = false AnnouncementText = {player} died and was returned to the Sacrificial Stones. ServerName = Server
[Display] ShowExtendedHudAnnouncement = true HudAnnouncementText = {player} died and was returned to the Sacrificial Stones. HudDurationSeconds = 5 HudRefreshIntervalSeconds = 0.75
The important gameplay defaults are:
[General] Enabled = true PollIntervalSeconds = 0.25 RespawnSettleDelaySeconds = 0.50 RetryIntervalSeconds = 1.0 FastRetryCount = 5 SlowRetryIntervalSeconds = 5.0 VerificationRadiusMeters = 12.0 SpawnYOffsetMeters = 1.5 PersistPendingDeaths = true VerboseLogging = false
If PersistPendingDeaths = true, an internal persistence file is stored as: "BepInEx/config/startspawnondeath.pending.txt"
The file stores a hashed key rather than the raw connection identity.
How it works
The dedicated server watches each connected player's networked character state separately. When a player's character enters the dead state, that peer gets its own pending return-to-spawn latch.
After that same character becomes alive again, the server sends Valheim's built-in RPC_TeleportPlayer specifically to that peer. Other connected players are not targeted.
The server then checks the player's synchronized position. The pending death state is cleared only after the player is verified near StartTemple.
Known limitation
Because this is server-only, the player's local character profile still remembers their bed as its nominal spawn point. A player may therefore briefly begin the normal bed-respawn process before the server moves them to the Sacrificial Stones.
Preventing a bed spawn coordinate from being saved at all would require client-side code, which this mod deliberately avoids.
Compatibility
Initial public release built for the Valheim 1.0 generation of the dedicated server and BepInExPack. Game updates can change Valheim's internal API; if a future update breaks the plugin, it may need to be rebuilt or updated.
For server operators
Useful log messages include: <player> died at (...); return to StartTemple queued. Teleporting <player> to StartTemple at (...). <player> return to StartTemple verified at (...).
These are written to the server/BepInEx log. Set VerboseLogging = true for additional state-machine details.
