cocopuff2u-Hearthbound icon

Hearthbound

Open a fallen friend's tombstone to bring them back to it (they're asked first). Cooldowns and daily limits. Server only.

Last updated a week ago
Total downloads 61
Total rating 0 
Categories Tweaks Mods Deep North Update Server-side
Dependency string cocopuff2u-Hearthbound-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2350

README

Hearthbound

Hearthbound

Open a fallen friend's tombstone to bring them back to it.

When someone dies in Valheim, they wake up at their bed with nothing, and have to make the long naked run back to their gear. With Hearthbound on your dedicated server, a friend standing at the tombstone just presses E on it, the fallen player gets asked if they want to come, and they're brought straight there.

Your players don't install anything. It runs only on the server.


How it works in game

  1. Someone dies. Their tombstone stays where they fell, as usual.
  2. A friend goes to the tombstone and opens it (E). The tombstone opens as normal, and the fallen player sees: "Bjorn can bring you to your tombstone. Crouch or type !yes to accept".
  3. The fallen player crouches or types !yes in chat within 20 seconds. !no, or doing nothing, says no.
  4. A short countdown ("Taking you to your tombstone in 3..."), then they're teleported there, with a loading screen like a portal.

Your own tombstone works exactly as in the normal game.

Limits keep it from replacing portals:

Cooldown The same player can't be brought back again for 10 minutes.
Daily limit 3 times per player in 24 hours. Kept across server restarts.
Fresh tombstones only Only tombstones up to 30 minutes old.
Per rescuer too One player can bring others back 6 times a day, so nobody runs a taxi service all night.
Keep out of boss fights, if you want Off by default. Set BossRadius (80 works well) and nobody can be brought to a tombstone that close to a boss. Dungeons can be blocked too (AllowInDungeons).
Admins exempt Server admins (adminlist.txt) skip the cooldowns and daily limits, handy for helping players and testing.
Call yourself back, if you want Off by default. With SelfRecall on, typing !recall in chat takes you to your newest tombstone, under the same limits.
Fair counting If the teleport doesn't happen (the player was already in a portal, say), it doesn't count.
Nobody gets yanked The fallen player is asked first. Switch AskFirst off to bring them right away.
Crouch to trigger, if you want With RequireCrouch on, only a crouched open counts, so friends can loot your tombstone without asking you each time.

Every number is a setting.


Install

You need a Valheim dedicated server with BepInEx on it (BepInExPack for Valheim).

  1. Download Hearthbound-<version>.zip from Releases.

  2. Unzip it. Inside is a plugins/Hearthbound folder.

  3. Copy the Hearthbound folder into your server's BepInEx/plugins folder, so you end up with:

    <server>/BepInEx/plugins/Hearthbound/Hearthbound.dll
    
  4. Start the server. In the server log you should see:

    Hearthbound 1.0.0 loaded
    

Don't run it alongside another mod that does something on tombstone emotes or opens, such as ServersideQoL's PhoenixPersons: both would react.


Settings

Settings live in BepInEx/config/com.cocopuff2u.hearthbound.cfg. The file appears after the first start. Edit it any time: Hearthbound picks up the change a second after you save, and says Settings reloaded in the log.

Setting Default What it does
Enabled true Let players bring fallen friends back to their tombstones.
RequireCrouch false The rescuer has to crouch while opening the tombstone. Off: just opening a friend's tombstone is enough.
CooldownMinutes 10 Minutes before the same player can be brought back again. 0 = no cooldown.
MaxPerDay 3 Times one player can be brought back in 24 hours. 0 = no limit.
MaxMinutesSinceDeath 30 Only for tombstones at most this many minutes old. 0 = any age.
MinDistance 30 Nothing happens if the fallen player is already this close to their tombstone (meters).
AskFirst true The fallen player is asked first and accepts by crouching; doing nothing says no. Off: they're brought right away.
AcceptSeconds 20 How long the fallen player has to accept, with AskFirst on.
AcceptByCrouch true The fallen player can accept by crouching.
AcceptCommand !yes Or by typing this in chat. Empty = off.
DeclineCommand !no Typing this in chat says no right away. Empty = off.
CountdownSeconds 3 Seconds of "taking you there in 3..." before the teleport. 0 = right away.
DailyResetTime (empty) When daily limits start over, as a time on the server's clock, like 00:00 or 06:00. Empty: each use counts for 24 hours from when it happened.
ShowHint true With RequireCrouch on: opening a friend's tombstone without crouching shows how to bring them back.
AnnounceToAll false Tell everyone on the server when someone is brought back.
RescuerCooldownMinutes 0 Minutes before the same player can bring someone back again. 0 = no cooldown.
RescuerMaxPerDay 6 Times one player can bring others back in 24 hours. 0 = no limit.
AdminsNoLimits true Cooldowns and daily limits don't apply when the rescuer or the fallen player is a server admin.
AllowInDungeons true Allow bringing players to a tombstone inside a dungeon, crypt, cave or other interior.
BossRadius 0 No bringing players to a tombstone this close to a boss (meters). 0 = off; 80 keeps rescues out of every boss arena.
BossLocations every boss Which bosses BossRadius keeps rescues away from, by the game's name for each boss's place. Remove one to allow rescues near that boss. See the table below.
SelfRecall false Players can call themselves back to their newest tombstone by typing RecallCommand in chat. Same cooldown, daily limit, age and places rules as being brought back.
RecallCommand !recall What to type in chat. Not starting with /, which the game keeps to itself.
LogEachRez true A log line each time someone is brought back, or turned away.

Boss names

BossLocations uses the game's own names for each boss's place:

Name Boss
Eikthyrnir Eikthyr
GDKing The Elder
Bonemass Bonemass
Dragonqueen Moder
GoblinKing Yagluth
Mistlands_DvergrBossEntrance1 The Seeker Queen (her arena is right above the entrance)
FaderLocation Fader
DN_Bossroom The Deep North boss

Messages

Every message players see is in the [Messages] section, so you can reword or translate them. They can use {rescuer}, {player}, {minutes}, {seconds}, {left} (like "2 more today", or nothing with no daily limit), and {yes} / {no} (the chat commands). Leave one empty to not show it.

MessagePlace picks where they show: Center (default; big, middle of the screen) or TopLeft (small, out of the way of an open tombstone).

Message Default
Brought {rescuer} brought you back to your tombstone
Done {player} is on the way. {left}
Announce {rescuer} brought {player} back to their tombstone
Hint Crouch and open this tombstone to bring {player} here
Ask {rescuer} can bring you to your tombstone. Crouch or type {yes} to accept
Countdown Taking you to your tombstone in {seconds}...
AskSent Asked {player}...
Declined {player} didn't accept
Cooldown {player} can be brought back again in {minutes} min
NoneLeft {player} has been brought back too many times today
Offline {player} isn't online
NotBack {player} hasn't respawned yet
TooLate This tombstone is too old to bring {player} back
AlreadyThere {player} is already close by
Dungeon {player} can't be brought into a dungeon
Boss {player} can't be brought this close to a boss
RescuerCooldown You can bring someone back again in {minutes} min
RescuerNoneLeft You've brought back as many players as you can today
Recalled Back to your tombstone. {left}
NoTombstone You don't have a tombstone

Good to know

  • Ores and metals come along. The game's own teleport doesn't check what you carry, the way portals do. Right after a death there's usually nothing in the bag, and the time limit keeps it that way; if this matters on your server, keep MaxMinutesSinceDeath short.
  • The tombstone has to have something in it. An empty tombstone can't be opened (the game removes it).
  • The daily count is kept in BepInEx/config/hearthbound.uses. Delete the file to reset everyone's count.

How it works (for the curious)

When a player opens a container, their game takes it over and marks it "in use", and that change is sent to the server like every other object update. Hearthbound watches for that on tombstones only: it sees who opened whose tombstone, reads whether the opener was crouching (also part of the player's normal updates), and moves the fallen player with the game's own teleport message, the one the goto console command uses. Chat also passes through the server on its way to other players, which is how !recall is heard.

It does nothing between rescues except one quick check on each object update and each message the server passes on: is this a tombstone that just opened, or a chat line someone is waiting for? That's a couple of number comparisons for everything else. The self-test measures it on a real server, with and without Hearthbound hooked in.


Building from source

./build.sh --managed "<Valheim dedicated server>/valheim_server_Data/Managed"

Needs the .NET SDK (8 or later). The zip lands in dist/.

License

MIT