
Odins Latch
You left the door open again. Odin shuts the doors you opened when it matters: an enemy close, nightfall or a raid at your base. Never on a friend or a tame in the doorway. Client-side. From the makers of Odin's Dusk Horn.Odin's Latch
You left the door open again. The trolls noticed. Odin noticed first.
- Danger shuts the door. An enemy near it, nightfall, or a raid at your base: the doors you opened swing shut, the same as if you'd pressed the key yourself.
- It stays open for your own. Not while you, a friend or your wolf is in the doorway. Not in dungeons. Not on doors you never touched.
- One short remark from Odin when he shuts one, because he has opinions. Never the same one twice running.
No keys, no items, nothing to build. Open the door, go about your business, and let Odin worry about what's coming through it.
When Odin shuts the door
Odin watches every door you open with your own hands this session. Once one of these
is true, he waits CloseDelay (2 seconds) and shuts it:
- An enemy is close. Something within
EnemyRadius(30 metres) of the door that is your enemy by the game's own rules, and awake: alerted, chasing something, or out hunting players the way raiders do. Animals only count while they're attacking, so a grazing deer won't lock you out. It reads the game's own idea of who your enemies are, not a built-in list, so modded creatures count and tamed ones never do. - It's night. The same night the game uses for its sky and its spawns, plus the
last
DuskMinutes(2) before it. Minutes are minutes of the game's clock as you play. - The Dusk Horn sounds. With Odin's Dusk Horn installed, its horn shuts the door too, a little before the clock would.
- A raid is on. A raid or other event whose area covers the door.
Turn on WalkAway and he also waits until you're WalkAwayDistance (10 metres) away,
so the door doesn't shut while you're still pottering about outside. Turn on
AlwaysClose and he shuts the doors you open in daylight too: a plain door closer.
When he leaves it open
- Someone is in the doorway: you, another player or a tamed creature within
DoorwayRadius(2.5 metres) of the door. He waits until it's clear. - The door is in a dungeon, or it's one of a location's own doors (crypts, villages, towers). Doors you built count everywhere, even at a ruin's edge.
- The door needs a key, or can't be shut once open.
- You didn't open it this session, or you shut it yourself since.
- It's behind a ward you can't use, or in
Exclude.
Client-side only
Only you need it. It shuts doors through the game's own door use, exactly as the use key does, so the door shuts for everyone the normal way: no new items, no network messages, no world data. Works in single-player, on dedicated servers and with friends who don't have it. Which doors you opened isn't saved; it starts fresh each session.
Configuration
Settings live in BepInEx/config/hevyh2o.valheim.odinslatch.cfg. If you have a
Configuration Manager mod installed, you can also change them in game (usually F1);
this mod doesn't need one.
| Setting | Default | Controls |
|---|---|---|
Enabled |
true | Master switch. |
CloseDelay |
2 | Seconds Odin waits once there's a reason, 0 to 30. 0 is straight away. |
DoorwayRadius |
2.5 | Metres from the door that count as the doorway, 0 to 6. Nobody in it, or no shutting. 0 turns the check off. |
Exclude |
empty | Doors to leave alone, by prefab name (wood_door) or shown name, separated by commas. |
CloseNearEnemies |
true | Shut the door when an awake enemy is near it. |
EnemyRadius |
30 | How near, in metres from the door, 5 to 80. |
CloseAtNight |
true | Shut the door at night. |
DuskMinutes |
2 | Minutes before nightfall that already count as night, 0 to 6. 0 is night only. |
FollowDuskHorn |
true | Shut the door when Odin's Dusk Horn sounds. Does nothing without it. |
CloseInRaids |
true | Shut the door during a raid that covers it. |
WalkAway |
false | Also wait until you've walked away from the door. |
WalkAwayDistance |
10 | How far away, in metres, 3 to 50. |
AlwaysClose |
false | Shut the doors you open in daylight too, danger or not. |
ShowRemarks |
true | Odin says a word when he shuts a door. |
RemarkCooldown |
30 | Seconds between remarks, 0 to 300. |
DebugLog |
false | Write each door, and why it was shut or kept open, to the BepInEx log. |
Things to know
- Only your doors. Doors you open with the use key, this session. Odin doesn't go round shutting the whole base, and he doesn't touch a door a friend opened.
- He shuts it the way you would. The door swings, makes its usual noise and counts in your stats as a door closed. On a server, the game passes the request to whichever player's game looks after that door, exactly as when you press the key.
- Doors only shut while they're loaded. Walk far enough that the game unloads your base and Odin can't reach the door either. Neither, to be fair, can you.
- It's a latch, not a lock. Enemies can still break the door, and the walls. Odin shuts it; holding it is your job.
- Not a plain auto-close. If you only want doors to shut behind you, Rhenn's AutoCloseDoors or Landoria's AutoCloseDoors do that well. Odin's Latch shuts them when it matters, and leaves them open the rest of the day.
- Your eyes only. The remarks are yours alone. The door shutting isn't: that everyone sees. Works in single-player and multiplayer, and nobody else needs the mod.
- Found a bug or have an idea? Tell Odin in
Odin's Tavern. The
ravens read every note; your
BepInEx\LogOutput.loghelps them read faster.
Also from Odin's tavern
Odin's Second Hand: bow out and an enemy close, Odin swaps in your best melee weapon for it, and hands the bow back once it's gone. One hand for the axe, the other for the door.
Odin's Free Refills: no stamina costs while the coast is clear, normal costs once a threat is near. Run home for free; the door will be shut when you get there.
Odin's Wanted Posters: look at a creature and press E for its health, weaknesses and drops. Read the poster through the window, not the open door.
Odin's Almanac: press K for a forecast of the next weather changes in your biome. Storm coming? Odin can't shut the sky, only the door.
Odin's Saga: sleep or log out and Odin reads you the saga of your day; press J for a lifetime of deeds. No skald has ever sung of a door left open. Odin would like to keep it that way.
Odin's Hearth: press N at home for your comfort level and the cheapest piece to build next. The fire is warmer with the door shut.
Odin's Pantry: press P for your foods, what you could cook right now, and Odin's pick for your biome. A shut door keeps the Greydwarfs out of the honey.
Odin's Raven Returns: after you die, a raven guards your grave; press H to see where it is and what killed you. For the night you were out when the door shut.
Odin's Drunk Cam: drink a mead and the world sways; the more meads, the more it sways. Three meads in, nobody finds the latch. Odin finds it for you.
Odin's Weapon Memories: every weapon remembers what it has done and earns a name from it. Doors don't earn names. Odin has suggested a few anyway.
Odin's Stone Whispers: Odin whispers when a Rock or Mysterious Rock is near; press 9 and he turns your gaze to it. Stones are patient. Trolls at an open door are not.
Odin's Dusk Horn: a low horn before nightfall, and press Home for the time to dark and the way to your bed. With both installed, the horn is also the door's cue.
Odin's Knot: log out and Odin asks what you were doing; log back in and he reads it back. Press ' to retie it. If the answer was "left the door open", Odin already knows.