BubbleBar

版本 v0.1.0·更新於 2026-09-15

See remaining magic barrier capacity and refill on recast!

截圖 共 1 張

模組介紹 作者原文

BubbleBar

There are two things I dislike about the Staff of Protection's magic barrier:

  • It gives you no way of knowing how much capacity is left (e.g. how close is it to breaking)
  • When you re-cast the spell, it replenishes the time remaining, but not the capacity! So a barrier with 10 HP left now lasts for 3 minutes, but still is going to break after 10 HP. (Frankly, this "feels" like a bug, to me)

So I made BubbleBar! Now you can see the capacity remaining of you and your allies' barriers, and you can replenish upon a re-cast.

More Details

  • You can see how much barrier capacity is left. You get a bar (and a number) on your own HUD, underneath stamina/eitr/adrenaline. Allies with a barrier get a bar under their health bar too (the one you see when you look at them).
  • Recasting the barrier refills it. In vanilla Valheim, recasting only resets the time remaining before the barrier dissipates. With this mod, a recast puts it back to its full capacity, whatever that is (depending on the caster's Blood Magic skill).

If you feel that the recast/refill is too powerful an addition, you can turn it off with RestoreOnRefresh (in config settings), and you just get the visible capacity.

Does this work in multiplayer?

It does, with some minor caveats:

  • The refill works for you no matter who cast the barrier, even if the other players aren't running this mod. The barrier is applied on the game of whoever receives it, so if you have the mod, your barrier refills (same for your own Skeletts or tamed creatures).
  • Refilling another player's barrier requires they have the mod installed, because the effect of the refill happens on the game of whoever receives the cast.
  • Seeing another player's bar requires they have the mod installed, because only their game knows how much of their barrier is left, so they need the mod installed to 'share' that data to you.

Known Bugs

  • There MIGHT be some wonky behavior if you wander far enough away from one of your Skeletts that another player's game takes over running it. That one is vanilla Valheim, not this mod, but you're more likely to notice it now that there's a bar showing the capacity of a barrier.
  • The bars are copied from the game's own HUD, so mods that heavily rearrange the HUD might put the bar somewhere silly. The position is adjustable in the config.
  • Multiplayer hasn't been tested much yet! Work in progress.

Config

When you first run the mod, the config file BepInEx/config/pandincus.bubblebar.cfg will appear. Can be edited in the file, but I recommend the BepInEx ConfigurationManager (F1 key). Changes apply immediately.

| Setting | Default | Meaning |

|---|---|---|

| General.Enabled | true | Master switch. false is completely vanilla: no bars, no refill. |

| Barrier.RestoreOnRefresh | true | Recasting the barrier refills it, rather than only resetting its timer. |

| Bars.ShowOwnBar | true | Show your barrier's bar on your own HUD. |

| Bars.ShowOwnBarNumber | true | Show the capacity number atop your own bar, like stamina and eitr have. |

| Bars.ShowAllyBars | true | Show the bars under your allies' health bars. |

| Bars.BarColor | #168DF5 | The color of the bar. |

| Multiplayer.ShowOthersBarriers | true | Whether other players' barriers (and their Skeletts') show a bar on your screen (assuming they have the mod installed). |

| Diagnostics.LogBarrierEvents | false | Writes a line to the log every time a barrier refills. Handy for checking it's working. |

There are also a few dials for moving and resizing your own bar (OwnBarWidth, OwnBarThickness, OwnBarOffsetX, OwnBarOffsetY) and the ally bars (AllyBarOffsetY), in case another mod has your HUD laid out differently.

Future Work

  • More testing, any bugfixing, and maybe an option to change the barrier bar's color as it empties (e.g. blue to red).

Requirements

  • BepInExPack Valheim

Developing

Build instructions, tooling and tests are in the

repo README.

This was built through a combination of code-diving and usage of Clau

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
BubbleBar-0.1.0.zip
檔案大小
31.5 KiB