PlanBuildDupeFix

版本 v1.0.1·更新於 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

模組介紹 作者原文

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.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_ValheimMathiasDecrock-PlanBuild

檔案與校驗

檔案名稱
PlanBuildDupeFix-1.0.1.zip
檔案大小
31.4 KiB