McPortalMetal
Carry ore and bars through portals. Client-side: works on an unmodified server and changes nothing for anyone else.
模組介紹 作者原文
McPortalMetal
Carry ore and bars through portals.
Client-side. It works on a server that does not have the mod, and it changes
nothing for anyone else playing there.
Why it works without the server
The portal decides on your own machine. TeleportWorld.Teleport asks
Humanoid.IsTeleportable, which walks your inventory looking for an item
flagged as non-teleportable. If nothing objects, that same client calls
player.TeleportTo itself.
The server never re-validates the inventory. It only sees your character move,
and you already own your own character, so the move is accepted like any other
step you take. No RPC asks permission, and there is no server-side check to
fail.
That also means the effect is strictly yours: no other player's inventory is
consulted, and nothing about the world or the server is written.
How it does it
The restriction is cleared on the item definitions, not by intercepting the
portal's question.
That matters because the portal is not the only thing reading the flag. The
inventory grid draws its red no-teleport badge straight from
m_shared.m_teleportable, and the item tooltip appends its warning from the
same field. A mod that only answers the portal leaves the interface insisting
your ore cannot travel while it quietly does — which reads as a broken mod, and
gets people to drop their ore before stepping through. Clearing the flag at the
source keeps the badge, the tooltip and the portal all telling the same story.
What is left alone
- allowAllItems portals and the TeleportAll global key keep working
exactly as the game intends. This mod never overrides them.
- Items the game never allows through (tool tier 1000 and above are refused
even with TeleportAll set) are skipped. That is the game saying "never"
rather than "not by default".
- Turning the mod off puts every flag back, immediately, without a restart.
Uninstalling leaves no trace.
Configuration
BepInEx/config/joaorodrigues.valheim.mcportalmetal.cfg, written on first launch.
| Setting | Default | What it does |
| --- | ---: | --- |
| Enabled | true | Off restores the stock restriction straight away. |
| BlockedItems | (empty) | Items to keep restricted, comma-separated prefab names. Empty means everything may pass. |
BlockedItems uses prefab names as the console uses them, matched
case-insensitively. To keep the late-game grind intact while freeing the rest:
BlockedItems = FlametalOre, BlackMetalScrap
Both settings apply the moment you change them.
Installation
Install with a mod manager, or drop McPortalMetal.dll into BepInEx/plugins.
Requires BepInEx for Valheim.
Install it on your own game, not on a dedicated server. The plugin is scoped
to the game client and will not load on valheim_server.exe at all — no log
line, no config file. If you are hosting from your own game rather than a
dedicated server, that is the client, so it loads and applies to your character
as normal.
A note on shared servers
Ore through portals is a balance rule most servers keep on purpose. This is
client-side, so it affects only you and breaks nothing for anyone else — but on
someone else's server it is still the kind of thing worth asking the admin
about first. If you want it for everyone, the game already has a supported way:
an admin can set the TeleportAll global key, which this mod deliberately
leaves working.
Source
MIT licensed. Built from the game's own decompiled code.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: