FloatingItems
Dropped items float on water instead of sinking - using the game's own buoyancy, just like wood.
模組介紹 作者原文
Valheim Floating Items
BepInEx mod for Valheim that makes dropped
items float on water instead of sinking to the bottom - lose your ore or your
sword over the side of the boat and you can still fish it out.
Unofficial mod. This is a fan-made mod, not affiliated with or endorsed by
Iron Gate. It marks your game as modded (the game shows this in the main menu),
as Iron Gate asks mod authors to do.
What it does
- Every dropped item floats on water (and on tar), bobbing on the surface the
same way wood does in the vanilla game.
- Items that already float in the game keep their own behaviour, and fish are
left alone - they still swim away when released.
- Works for items added by other mods too.
Built on the game's own buoyancy
The mod has no physics of its own. Valheim already has a buoyancy component
(Floating) - it is what keeps wood on the surface. The mod adds that
component to every item as it appears in the world and copies its settings
(float height, force, damping, splash effect) from Wood, so everything floats
exactly like wood does.
Items that are already lying on the bottom come up after the world is loaded
again, because the game creates them anew.
Configuration
BepInEx\config\com.ab5olutezer0.valheim.floatingitems.cfg:
| Setting | Default | Description |
|---|---|---|
| ExcludedItems | (empty) | Comma-separated prefab names of items that should keep sinking, e.g. Coins, IronScrap. Applies to items dropped after the change. |
Requirements
- Valheim (tested on 1.0.15)
- BepInEx 5.4.x
Installation (players)
- Install BepInEx for Valheim if you haven't already (see link above, or
use r2modman).
- Download FloatingItems.dll from the
latest release.
- Drop it into \BepInEx\plugins\FloatingItems\.
- Launch the game and throw something into the sea.
In multiplayer, buoyancy is applied by whoever owns the item (usually the
player closest to it), so everyone who wants floating items should have the
mod installed.
Building from source
Requires the.NET 8 SDK (or newer)
and a local Valheim install with BepInEx installed.
git clone
cd valheim-floating-items
dotnet build -c Release -p:ValheimPath="C:\Path\To\Valheim"
If you don't pass -p:ValheimPath, the build looks for a VALHEIM_PATH
environment variable, then falls back to the default Steam location
(C:\Program Files (x86)\Steam\steamapps\common\Valheim).
The build automatically copies the built DLL into
\BepInEx\plugins\FloatingItems\ for quick in-game testing.
Notes on how it works (and a few gotchas found along the way)
- The component is added in a prefix to ItemDrop.Awake: the game caches it
there (it is also used to tell whether an item is stuck in tar), so it has
to exist before Awake runs. Patching instances instead of prefabs also
covers items registered by other mods at any time.
- Water finds the object to push through its rigidbody and takes a single
IWaterInteractable from it. Objects that already have one (floating items,
fish) are skipped - adding a second would break them.
- The template's surface ripple (m_surfaceEffects) is not copied: it is a
child object of the Wood prefab, shared by all copies, and switching it on
and off from many items would toggle the template itself. The splash effect
is just a list of prefabs to spawn, so it is shared safely.
Support
All my mods are free and will stay free. If you enjoy them and want to say
thanks, you can leave a voluntary tip via PayPal - it doesn't
unlock anything, it just helps me keep making mods.
License
MIT - see LICENSE.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: