
TownPortal
Open a blue wood portal back to your bed. Allies can follow. A return field stays for 15 minutes. Mysterious Tomes drop in Meadows and Black Forest chests, or from Haldor after the Elder.Town Portal
Find a ruined old book, restore it at a workbench, and use it to open a portal home from anywhere in the world.
The Tome of Town Portal opens a temporary portal back to the bed you have claimed. Friends can follow you through, and a return gate at your bed takes everyone back to where you opened it. It doesn't join the normal portal network, and it follows the same cargo rules as a wood portal.
More details and pictures: valtownportal.sprekn.com
Needs BepInEx and Jötunn. In multiplayer, every player and the server need the mod installed.
Features
- A way home. With the tome anywhere in your inventory, press Left Alt + H. On a controller, hold L2 and click the right stick. A blue-lit wood portal opens beside you.
- Bring your friends. Anyone can walk through your portal. They arrive at your bed, not their own, and they don't need a tome.
- A way back. A blue return gate appears at your bed. Press E on it to go back to the portal.
- Fair limits. A portal lasts 15 minutes, and the tome needs 5 minutes to rest before you can open another one. Ore, metal bars and anything else a wood portal won't take are refused here as well. World settings that turn off portals, or block them during boss fights, apply to the tome too.
- Something to find. Mysterious Tomes turn up in Meadows and Black Forest chests, and Haldor sells them once the Elder is dead.
- Matches the game's look. Both books use pixel-style textures like Valheim's own items. The finished tome is warm brown leather with glowing cyan runes. The Mysterious Tome is the same book, dusty and worn.
- Works on existing worlds. You don't need a new world.
Getting the tome
1. Find a Mysterious Tome
- Chests: about 1 in 4 loot chests in the Meadows and Black Forest also have one. It's added on top of the normal loot, so nothing else is replaced.
- Haldor: sells one for 250 coins after the Elder is dead. If you find one in a chest before that, you can still use it.
Each chest gets one chance the first time it loads with the mod installed, even chests you've already looted. Barrels and chests that players built don't count.
2. Restore it at a workbench
Craft the Tome of Town Portal at a level 1 workbench:
| Ingredient | Amount |
|---|---|
| Mysterious Tome | 1 |
| Surtling core | 10 |
| Greydwarf eye | 25 |
| Leather scraps | 15 |
| Deer hide | 5 |
You keep the finished tome. Opening a portal doesn't use it up, and you don't need to equip it.
How it works
- Carry the Tome of Town Portal and press Left Alt + H (or L2 + right stick click). The portal opens on the nearest clear spot beside you. It won't open in open water.
- Walk through. You arrive at your claimed bed, or at the starting stones if you haven't claimed one.
- Anyone else can press E on the return gate to go back to the portal, and come home again as often as they like while it's open.
- When you press E on the return gate, it says Return and close. You go back and both ends close. They don't wait for anyone, so send your friends through first.
- If nobody closes it, the portal and return gate disappear after 15 minutes. The timer runs in real time, so sleeping doesn't shorten it, and logging out doesn't close it early.
While the portal is open, the map shows a marker labeled "[name]'s town portal". The marker is hidden while the person who opened it is offline, but the portal stays open until its time runs out.
Opening a new portal replaces your old one.
The portal uses the game's own wood portal model, loaded from your game when you play. No Valheim files are included in this package.
Settings
Settings are in BepInEx/config/com.townportal.mod.cfg, which is created the first time you start the game with the mod. If you play on a server, use the same settings on the server and on every player's PC. Restart the game after changing the cooldown or duration.
| Setting | Default | What it does |
|---|---|---|
| Open | Left Alt + H | Key that opens a portal |
| CooldownSeconds | 300 | Rest time before you can open another portal |
| DurationSeconds | 900 | How long a portal stays open |
| MysteriousTomeDropChance | 0.25 | Chance that a chest has a Mysterious Tome |
| HaldorPrice | 250 | What Haldor charges for a Mysterious Tome |
| HaldorRequiresElder | true | Haldor only sells it after the Elder is dead |
| SearchRadius | 6 | How far from you, in meters, the portal can open |
| PortalYawOffset | 0 | Set to 180 if the portal frame faces the wrong way |
| LogChestPrefabs | false | Writes chest names to the log, for troubleshooting |
Console commands
With devcommands turned on:
| Command | What it does |
|---|---|
spawn TownPortal_MysteriousTome 1 |
Drops a Mysterious Tome at your feet |
spawn TownPortal_Tome 1 |
Drops a finished Tome of Town Portal |
townportal_clear |
Removes every town portal, return gate and map marker, and resets the timers. Save the world afterwards. |
Known limitations
- There is no PvP lock yet. Anyone who reaches your portal can follow you home until it closes.
- The mod's own text is English only.