PlanBuildDupeFix

v1.0.1·Updated 2026-09-28

Server-side fix for PlanBuild on dedicated servers: a portal or sign plan built by the server no longer stays behind to be built again, so the plan totem cannot stamp out endless portals. Stacked copi

About this mod Author’s original text

PlanBuildDupeFix

A server-side fix for PlanBuild on dedicated servers.

Portal and sign plans built by the server are built once and disappear, as they should, instead of being built

over and over.

The bug

To build a plan, PlanBuild places the real piece, writes its text (a portal's tag, a sign's text) and only then

removes the plan. The materials live in the plan and go away with it.

The game signs that text with the local platform user, and a dedicated server has none, so writing the text fails.

The real piece is already standing, but the plan is never removed and still holds its materials. A plan totem

builds it again 3 seconds later, and again, and again: an endless stack of portals in one spot. Every copy torn down

with a hammer gives back a third of the cost.

It happens whenever the server owns the plan — for example with server-side simulation mods, which hand objects to

the server once their owner walks away. On our server one portal plan turned into 107 portals in six and a half

minutes. Signs in blueprints have the same problem.

What this mod does

  • Text without a platform user. When there is no platform user (a dedicated server), portal tags and sign texts

are written without an author instead of failing. PlanBuild then finishes the build and removes the plan.

Where a platform user exists (every client), the game's own code runs unchanged.

  • Safety net. If building a plan still fails for any other reason, the plan is removed, so the build cannot be

repeated. The materials of such a plan are lost, which is better than endless copies.

  • Cleanup. When the world loads, portals that have no creator and stand two or more at one spot are removed.

These are the copies left by the bug: portals placed by players always have a creator. The plan they came from

stays and now builds once. Can be turned off in the config.

  • XPortal list. XPortal recognises portals by the piece

name, so it lists a portal plan as a portal too, and after the plan is built the unnamed entry stays in everyone's

target list until someone joins. Within 2 seconds the server removes such entries: plans, and entries whose object

was removed. Can be turned off in the config.

Installation

Server only. Players do not need it, and it does not check versions, so clients without it connect as usual.

  • Mod manager: install it on the server.
  • Manual: put PlanBuildDupeFix.dll into BepInEx/plugins on the server.

Config

BepInEx/config/qua8ion.valheim.planbuilddupefix.cfg

  • [Cleanup] RemoveStackedPortalCopies (default true) — remove stacked portal copies when the world loads.
  • [Cleanup] CleanXPortalList (default true) — keep PlanBuild plans and removed objects out of the XPortal list.

Log

  • On start: Portal and sign text is set without a platform user; a plan whose build fails is removed; stacked portal copies are removed on world load; plans are kept out of the XPortal list.
  • When a plan is built by the server: Set portal text without a platform user (N so far) (the first 20, then every hundredth).
  • Cleanup: Removed N portal copies without a creator stacked at (x, y, z).
  • XPortal list: Removed from the XPortal list: it is a plan (portal_wood_planned) or …: its object was removed.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_ValheimMathiasDecrock-PlanBuild

File & checksum

Filename
PlanBuildDupeFix-1.0.1.zip
File size
31.4 KiB