ImmortalPortals
Make the original wooden/stone portal immune to all damage (monsters, fire, snowstorms, volcanic ash, support collapse), and can still be dismantled by the construction hammer. Immortal Portals: vanilla wood/stone portals are immune to all damage (monsters, fire, snow, ash, support loss) yet still removable with the build hammer.
About this mod Machine translation
Immortal Portals
A tiny Valheim mod: the two vanilla portals (wood and stone) become immune to all damage — monsters, players, fire, snow, ash and support collapse can no longer destroy them. The build hammer still removes them normally.
Localization: English / Simplified Chinese / Traditional Chinese
Features
- Both vanilla portals protected: portal_wood (Portal) and portal_stone (Stone portal).
- Immune to every damage path:
- monster and player attacks, projectiles, fire, AoE explosions;
- environmental wear: support collapse, Deep North heavy snow, Ashlands ash and lava, persistent events.
- Build hammer still works: removal uses a separate code path, so you can always dismantle your portal and get the materials back.
- Applies immediately to existing saves: no health changes, no save data touched.
- Modded portal variants (anything using the vanilla TeleportWorld component) are protected too — configurable.
How It Works
All damage to a buildable piece funnels into WearNTear.ApplyDamage (attack damage via RPC_Damage, environmental wear via UpdateWear). The mod Harmony-patches that single method and skips it for portals. Hammer removal goes through WearNTear.Remove → RPC_Remove → Destroy, which never touches ApplyDamage, so it keeps working.
Configuration
File: BepInEx/config/trigger.valheim.immortalportals.cfg (ConfigurationManager supported).
| Section | Key | Default | Description |
|---|---|---|---|
| General | Enabled | true | Master switch |
| General | ProtectWoodPortal | true | Protect the wooden portal (portal_wood) |
| General | ProtectStonePortal | true | Protect the stone portal (portal_stone) |
| General | ProtectOtherPortals | true | Protect other portals using the vanilla TeleportWorld component (modded variants) |
| General | DebugLog | false | Log blocked damage (troubleshooting) |
Installation
- Install BepInExPack for Valheim.
- Drop ImmortalPortals.dll into BepInEx/plugins/ImmortalPortals.
Multiplayer
Damage is decided by the object's owner (host / dedicated server). Install the mod on the server to guarantee protection; clients should install it too so every player sees the same behavior.
Build
cd ImmortalPortals
dotnet build.\ImmortalPortals.csproj -c Release
Output: BepInEx/plugins/ImmortalPortals/ImmortalPortals.dll (output path is preconfigured).
Repository
Simplified Chinese
A small Valheim mod: the original two portals (wooden door/stone door) are immune to all damage - monsters, players, fire, snowstorms, volcanic ash and support collapse can no longer destroy them; construction hammer demolition is still available.
- Two original portals are fully covered: portal_wood (portal) and portal_stone (stone portal).
- Immune to all damage paths:
- Monster and player attacks, projectiles, fire, AoE explosions;
- Environmental wear and tear: unsupported collapse, deep north snowstorm, volcanic ash and magma, long-lasting events.
- The construction hammer can still be dismantled: disassembly follows an independent code path, and the portal can be dismantled and materials recycled at any time.
- The old archive will take effect immediately: the blood volume will not be changed, and the archive data will not be written.
- Modded portal variants (using original TeleportWorld components) are also protected and configurable.
Principle: All damage taken by the building is eventually aggregated into WearNTear.ApplyDamage (attack damage via RPC_Damage, environmental wear via UpdateWear). This module only intercepts this method with Harmony and directly skips the portal; the construction hammer removes the WearNTear.Remove → RPC_Remove → Destroy method and does not go through this method, so it is not affected.
| Configuration items | Default | Description |
|---|---|---|
| Enabled | true | Master switch |
| ProtectWoodPortal | true | Protect Wooden Portal |
| ProtectStonePortal | true | Protect Stone Portal |
| ProtectOtherPortals | true | Protect other portal variants that use the original Tele …
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: