Valheim
Install with App

Details

Latest version
1.0.40
Last Updated
First Uploaded
Downloads
124
Likes
0
Size
276KB
Dependants
ADDatHost Valheim hosting
30% off

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.

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.
  • Know whose gate it is. Each return gate shows its owner's name when you hover it, and a small floating name when you are close, so you can tell gates apart in a busy base.
  • Home can be your Runic Spawn Point. The finished tome also teaches you a respawn stone. Claim one and the portal takes you there instead of your bed. See below.
  • Fair limits. By default a portal lasts 15 minutes, and the tome needs 5 minutes to rest before you can open another one. A server can change both. 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 (by default) 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.

Runic Spawn Point

Runic Spawn Point used to be a separate mod. It is now part of Town Portal.

  • Unlocked by the tome. The first time the finished Tome of Town Portal is in your inventory, you learn the Runic Spawn Point and get the usual "new piece" message. The Mysterious Tome doesn't count. Once learned, it stays learned for that character, even if you put the tome away.
  • Build it anywhere. Find it in the Hammer under Furniture. It costs the same as a bed and needs no roof.
  • Claim it. Press E on the stone to make it your spawn point. Shift + E releases it. When you die, you wake up beside it, however far away it is.
  • Sails with you. Build it on a ValheimRAFT boat and you respawn on deck wherever the boat has gone, and get put back on the deck if you land in the water.
  • Town Portal opens to it first. With a stone claimed, your portal goes to the stone. If the stone is gone, it goes to your bed, and then to the starting stones.
  • On your map. Your claimed stone shows on the map as "Your spawn point" with the bed icon, even while it sails around on a boat. Only you see it, and it isn't saved into your map. Turn it off with ShowSpawnPointPin.
  • Can count as a base. If the server turns on RunicSpawnPointIsBase, each stone keeps monsters from spawning right next to it, the same way a workbench does. It doesn't give comfort. It's off by default, and it doesn't apply to stones on a boat.
  • Lost track of it? Type townportal_spawnpoint in the console (F5) to see where your stone is, whether it's loaded, and whether it's on a boat. townportal_spawnpoint clear drops your claim.

If you still have the old Runic Spawn Point mod installed, remove it. Stones you already built and claimed keep working.

How it works

  1. 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. Put away the hammer or other build tool first.
  2. Walk through. You arrive at your claimed bed, or at the starting stones if you haven't claimed one.
  3. 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.
  4. 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.
  5. 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.

On a server, the gameplay settings come from the server. When you join, the server's values replace yours for as long as you're connected, and changes an admin makes on the server reach everyone right away. You don't have to copy the file to every PC or restart anything. In single player your own file is used. The settings marked "This PC" are yours to set however you like.

Setting Default Who sets it What it does
Open Left Alt + H This PC The key that opens a portal. The tome's tooltip shows whatever you pick.
ShowGateNames true This PC Shows the owner's name floating above return gates.
ShowSpawnPointPin true This PC Shows your claimed Runic Spawn Point on the map as "Your spawn point".
CooldownSeconds 300 Server How long the tome rests before you can open another portal.
DurationSeconds 900 Server How long a portal and its return gate stay open.
MysteriousTomeDropChance 0.25 Server Chance, from 0 to 1, that a Meadows or Black Forest chest also has a Mysterious Tome.
HaldorPrice 250 Server What Haldor charges for a Mysterious Tome.
HaldorRequiresElder true Server Haldor only sells the tome after the Elder is dead.
SearchRadius 6 Server How far from you, in meters, the portal can open.
PortalYawOffset 0 Server Turns the portal. Set it to 180 if the frame faces the wrong way.
RunicSpawnPointIsBase false Server Makes every Runic Spawn Point count as a player base, so monsters don't spawn close to it. No comfort.
RunicSpawnPointBaseRadius 10 Server How far that base area reaches, in meters.
ServerLookupTimeout 10 This PC Runic Spawn Point. Seconds to wait for the server to say where your stone is.
AreaLoadTimeout 45 This PC Runic Spawn Point. Seconds to wait for the area and the boat to load when you respawn.
ResnapSeconds 5 This PC Runic Spawn Point. How long after a respawn you get put back on deck if you fall off.
VerboseLog false This PC Runic Spawn Point. Logs every respawn step, for troubleshooting.
LogChestPrefabs false This PC Writes chest names to the log, for troubleshooting.

Console commands

Anyone can use these:

Command What it does
townportal_spawnpoint Shows where your Runic Spawn Point is, whether it's loaded, and whether it's on a boat or on land.
townportal_spawnpoint clear Clears your claim and releases your stones, so you respawn at your bed again.

Server admins (listed in adminlist.txt) can also name another player:

Command What it does
townportal_spawnpoint <player name> Shows every Runic Spawn Point stone that player owns.
townportal_spawnpoint clear <player name> Releases that player's stones. If they're online, their claim clears right away.

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_spawnstone Places a Runic Spawn Point stone in front of you, standing on the ground
townportal_clear Removes every town portal, return gate and map marker, and resets the timers. On a server, only admins can run it. 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.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.