Merki
The server decides who is on the map, and death is public.
- Why
- How it actually works, and why it has to be the server
- Scope: the map does not have to show the whole world
- Death marks
- Installing
- Settings
- Multiplayer
- Licence
Everyone is on everyone's map, and the server is the one that decides. When somebody dies, their grave shows up on your map too.
The name is Old Norse merki: a mark, a sign, a banner. That is what it puts on the map: where everyone is, and where somebody fell.
Why
Valheim already has position sharing. It is a checkbox on the map, and every player answers it for themselves.
The problem is not that people hide. It is that hiding is indistinguishable from everything else. Someone who unticks that box does not vanish with an announcement - they just are not on the map, which looks exactly like being out of range, or dead, or logged off, or standing somewhere nobody has explored yet. On a server where the whole point is playing together, the one piece of information that tells you whether to go and look for somebody is a setting each person can silently turn off, and nobody else can see the state of.
Merki moves that decision to the server. Not by asking nicely - by taking the answer out of the client's hands, at the place the game stores it.
How it actually works, and why it has to be the server
Worth writing down, because it decides the shape of the whole mod.
A client reports in to the server every two seconds with its position and a flag saying whether it is sharing that position. The position is sent every time regardless of the flag - the server needs it for other reasons and does not care what the checkbox says. The server stores both, and then builds the list it broadcasts to everybody, copying each player's position into that list only if their flag says yes.
So the hiding happens on the server, using a fact the client supplied. Merki overwrites that fact the moment it arrives. The client is never consulted again, and there is nothing to work around: unticking the box still sets a bool, that bool still travels, and the server still throws it away.
This is also why a client-side version of this mod is not a weaker version. It could not force anybody onto the map, because the list a client receives carries no map position for a player who is hidden. The one thing a client does get is the world around it: the game streams everything in the few zones near you, other players included, so somebody close enough to see is on your connection either way. Past that, the player list is the only thing carrying a position, and the server writes it.
Merki leaves each player's own answer to the checkbox alone. The server's rule is applied on top of it and never saved over it, so a server that turns the rule off, or drops the mod, hands everyone back the choice they had made.
Scope: the map does not have to show the whole world
Because the server is deciding, it can decide per person. Two settings, off by default, which combine:
- Range - only players within so many metres appear on your map.
- SameBiome - only players in the same biome as you.
With both off, the server broadcasts its own untouched player list and Merki is only doing the forcing. With either on, the list is built once per recipient, which is the honest cost of the feature: the same list has to say different things to different people, so it cannot be one broadcast any more.
The reason to do this on the server rather than letting each client hide what is too far away: a rule the server states and does not enforce is exactly the thing this mod exists to stop being. If every position is on the wire, anybody running their own build sees the whole server and the scope is decoration.
Two limits worth knowing before picking a number. Positions are reported every two seconds and the list goes out every two seconds, so the edge lags by a few seconds of travel: a few steps on foot, tens of metres on a mount or a ship. And a Range smaller than the area the game streams around you hides nearby players from the map, not from your connection.
Death marks
The game already pins your own death on your own map. Merki puts it on the other players' maps as well, with the name of whoever died under the gravestone, and clears it after half an hour at most. You are never sent your own; the game's pin is already there.
That half is reported by the client that died, because a server never runs player death code. It is why this mod asks for everybody to have it rather than just the host: a player without Merki is still forced onto the map, but their deaths go unannounced, which is a hole in a feature rather than an absence of one, and invisible from the other side.
The report goes to the server, not to everybody, and the server passes it on under the same rule as the map. A player whose position is private sends no mark, and with Range or SameBiome set, only the players who would see them on the map get their grave.
Only a player's latest death is shown. Dying again moves their gravestone instead of adding a second one, because two graves for the same person make a map you have to read twice to learn one thing. If the new spot is outside what you would be shown, the old gravestone is simply taken off your map rather than left pointing at a body that is no longer there. That tells you they died again, but not where.
The name is the pin's own label, so it shows where every pin name in the game shows: on the large map once you are zoomed in far enough. The minimap never draws pin names, so it does not draw these either.
The server remembers each mark until it expires, so somebody who logs in after the death, or reconnects, still gets it. That is the case the feature is for: the friend who joins ten minutes later to help is the one who most needs to know where to go. They get the time that is left, not a fresh half hour, because the clock starts at the death and runs on the server. Whether they are in scope is measured once, from where they first stand in the world, since before that the server does not know where they are. For a brand-new character that means where the valkyrie sets them down, not the spot hundreds of metres out where the ride starts. A mark that expired while they were away is never sent.
A death is reported over the dying player's own connection to the server, and the server takes the name from that connection's character rather than from the message. So nobody can report a death for somebody else, and a gravestone only ever comes from the server.
None of it is saved. Marks live in the server's memory, so restarting the server forgets them all, which costs at most half an hour of gravestones.
Installing
Needs BepInEx. Nothing else. Through a mod manager it is one install. By hand, put
Merki.dll in BepInEx/plugins/Merki/.
Then start the game once and quit. That first run writes the config file. It does not exist before the mod has loaded, which is the usual reason people think it is broken.
Settings
The file is BepInEx/config/ezomic.valheim.merki.cfg. Every setting has a comment above
it, so the file explains itself.
Note that changing a default in a new version does nothing on a machine that has already run the mod. BepInEx writes every entry on first run and the saved value wins.
Multiplayer
Everyone needs it. With Core installed, the server refuses a client that does not have it, at the same build. Without Core nothing checks.
The server needs it most of all. A client with Merki on a server without it changes nothing: it waits for the server to state the rule, and a server without Merki never does.
If Core is installed, this mod registers with its version gate and the host's settings apply to everyone connected to it, and your own values come back the moment you disconnect. The one exception is Verbose, which stays yours. That matters more here than in most of these mods: a visibility rule each player sets for themselves is precisely what Merki replaces.
Without Core the mod still runs, and it degrades unevenly rather than politely. The forced visibility holds, because the server decides it out of data a client cannot withhold. The death marks do not, because anybody who joins without Merki never sends one.
Licence
MIT. See LICENSE.
Coming next
Written, not released yet. This is what the next version of Merki will carry as 0.1.0, and it can still change.
First version. Built and deployed; never run in a game.
Everyone connected to the server is on everyone's map, and cannot take themselves off it. The checkbox on the map is greyed out rather than left to tick itself back on a frame after you click it, because a checkbox that undoes your click reads as a bug and a greyed one reads as a rule.
Two optional limits on top of that, both off: a range in metres, and same-biome-only. With either set, the server builds a separate player list per recipient instead of broadcasting one - which is the reason they are off by default rather than merely a taste.
Deaths are pinned on the other players' maps, not just the dead player's own, labelled with their name and expiring after thirty minutes. The server passes each death on under the same rule as the map, so a private position sends no mark and Range and SameBiome decide who gets one.
Each player's own answer to the map checkbox is never saved over. The server applies its rule on top, so turning the rule off, or removing the mod, gives everyone back the choice they had made. A client with Merki on a server without it forces nothing and greys out nothing.
Renamed from Beacon to Merki before it ever ran, with the GUID following to
ezomic.valheim.merki. Nothing needs carrying over: no config file with the old name was
ever written anywhere.
Builds against Valheim 1.0: the per-recipient player list writes the server-assigned display name and the PlayFab id in the order 1.0 reads them.
Death marks are remembered by the server, one per player, so somebody who joins or reconnects after a death still gets the gravestone, for the time that is left rather than a fresh half hour. A second death moves a player's mark instead of adding another, you are never sent your own, and the dead player's name sits under the gravestone on the large map. DeathMarkMinutes now runs from 1 to 30, and the option to keep a mark for the whole session is gone. A server restart forgets every mark.
A second death now also reaches the players who only had the first: if the new spot is out of their Range or biome, the old gravestone is taken off their map instead of staying for up to half an hour. A brand-new character's scope is measured where the valkyrie sets it down, not where the ride starts. Reports and marks travel over each player's own connection to the server, which takes the name from that player's character, so no client can report a death for somebody else or send a gravestone that did not come from the server. Switching DeathMarks or Enabled off now drops the marks the server was holding and the pins already drawn.
Every setting · 8
All of it lives in one file, written on first run with each description beside its default. The file is the source of truth; edit it there.
BepInEx/config/ezomic.valheim.merki.cfg
server On a server, the host's value applies to everyone while they are connected; your own file is left alone and counts again when you leave. yours Keys and personal settings stay as you set them, on any server.
Death 2
| Setting | What it does | Default | Whose |
|---|---|---|---|
| DeathMarks | Put a gravestone on the other players' maps when a player dies, at the spot they died, with their name under it on the large map. Yours is already marked by the game, so you are never sent your own. Only a player's latest death is shown: dying again moves their gravestone rather than adding a second, or takes it off your map if the new spot is one you would not be shown. The server remembers each mark until it expires, so a player who joins or reconnects later still gets it, with only the time that is left. It follows the same rule as the map: a player whose position is private sends no mark, and Range and SameBiome decide who receives one, measured from where you are when the death happens, or where you first stand if you join afterwards - for a new character, where the valkyrie puts you down, not where it picks you up. Nothing is saved: a restarted server has forgotten every mark, and your own map drops them when you log out. | true | server |
| DeathMarkMinutes | - | 30 | server |
Merki 2
| Setting | What it does | Default | Whose |
|---|---|---|---|
| Enabled | Off leaves the plugin loaded and changing nothing. Not 'unloaded' - a plugin cannot unload itself. | true | server |
| Verbose | Write what was forced and what was hidden to BepInEx/LogOutput.log. Off unless something looks wrong; on a busy server it is chatty. | false | yours |
Visibility 4
| Setting | What it does | Default | Whose |
|---|---|---|---|
| ForcePublic | Everyone is on everyone's map, whether they like it or not. The server overwrites the 'share position' flag each client sends, so unticking the box on the map does nothing - the box is not where the answer is kept. Each player's own choice is kept as it was, not overwritten, so off restores vanilla, where each player chooses. | true | server |
| LockMapToggle | Grey out the 'share position' checkbox on the map so it reads honestly. This changes nothing about who can see whom; it only stops a player believing they are hidden. Requires ForcePublic. | true | server |
| Range | How far away another player can be and still appear on your map, in metres. 0 means the whole world, which is the usual answer and the cheapest - at 0 the server sends its own untouched player list. A number here makes the map a local thing: you see who is near you and nobody else. Height is ignored, so a cave below you still counts as near. Measured from where each player last reported in. The game reports positions every two seconds and the list goes out every two seconds, so the edge lags by a few seconds of travel: a few steps on foot, tens of metres on a mount or a ship. Also a map rule, not an invisibility one - a player close enough for the game to stream them to you is on your connection anyway, so a very small Range hides them from the map only. | 0 | server |
| SameBiome | Only show players who are in the same biome as you. Combines with Range - both have to pass. Note that a crypt or a cave reads as the biome on the surface above it, because that is where the game says its coordinates are; a player underground is therefore still in the Swamp. | false | server |
Discussion
Nothing said yet.
Sign in or make an account to join in.