ShieldBubble
Configurable shield generator radius (meters). Changes both the math and the visual dome effect.Shield Bubble
What it does
A Valheim mod (BepInEx 5) that pins the shield generator radius to a fixed value in
meters, set in a config file (BepInEx/config/dr0per.shieldbubble.cfg). In vanilla 1.0 the
radius scales with fuel (empty shield ≈ 10 m → full ≈ 30 m); this mod locks it to whatever
value you choose.
The fixed value is applied consistently to the radius math and to both visual layers (the dome and the image effect), so what you see always grows or shrinks together with the real radius — no manual tweaking of anything graphical.
Requirements
- Valheim 1.0+.
- BepInEx 5 for Valheim. The standard Thunderstore pack
(
denikson-BepInExPack_Valheim) works; the AzumattDev/BepInExv5-ltsfork is also compatible. Install the pack like a standard BepInEx 5: unzip it into the game folder → launch the game.
Installation
- Download the mod (zip) from Thunderstore.
- Copy
ShieldBubble.dllinto theBepInEx/plugins/folder. - Launch the game;
BepInEx/config/dr0per.shieldbubble.cfgis created with the default value (Radius = 30).
Multiplayer / Dedicated server
- The SERVER's config wins. In multiplayer, the server applies its own config to all connected clients, and a live config change on the server reaches the clients in < 1 s, with no restarts.
- No idle network traffic. A client is sent the config once, right after it connects, and the server speaks again only when its own config actually changes (one packet per client, retried twice over the next 2 s, then silence). While nothing changes, nothing is sent: no periodic config push, no repeating log lines.
- The mod is REQUIRED on the server AND on every client. (A dedicated server with its own BepInEx install works the same way: it is the one that holds the config and enforces it on the clients.)
- Enforcement: if the server has
Enabled = true, a client without the mod is disconnected after ~10 s; the server leaves a warning in its log with the player's name. - If the server has
Enabled = false, there is no enforcement and no config sync: each machine just uses its own local config. - Singleplayer uses that machine's local config.
- The reference cfg is the SERVER's (
BepInEx/config/dr0per.shieldbubble.cfgon the server machine): editing a client's config in multiplayer does not affect its shield (the server's value wins).
What the log shows
Server (BepInExLog.txt):
| Message | Meaning |
|---|---|
mod ack from 'Alice' (uid=7) → pushed config (radius=30 m, enabled=True) |
a client that has the mod joined and was given the server's config |
config changed → pushed to 'Alice' (uid=7): radius=45 m, enabled=True |
the server's config changed and was sent to that client — this line only ever appears on a change |
peer 'Alice' (uid=7) waiting for mod ack |
the client has not reported the mod yet |
kicking 'Alice' (uid=7): missing mod (no ack after 10 s) |
the client was disconnected for not having the mod |
Client:
| Message | Meaning |
|---|---|
config from server: radius=30 m, enabled=True |
the server's config was received and is being applied |
server lost connection: reset client sync (will re-ack on reconnect) |
the connection dropped; the mod re-syncs by itself on reconnect |
no server config received after 15 s: is the server missing the mod, or is Enabled=false? Using local config. |
the server has no mod (or has it disabled); this client falls back to its own config |
Configuration
BepInEx/config/dr0per.shieldbubble.cfg:
[Shield]
# Shield generator radius in meters (1-500).
Radius = 30
# Enable the mod.
Enabled = true
Reference values: vanilla 10 (empty)–30 (full); 5 = tiny, 30 = vanilla max, 100 = "castle", 500 = huge (for large radii the distance at which the effect is visible is extended automatically, so the dome can be seen from far away).
- Fuel still controls ON/OFF, color and particles; as long as there is fuel, the radius is the fixed configured value.
- Live editing: save the
.cfgand the change applies in < 1 s, with the dome growing or shrinking in front of you.
Notes & limitations
- The radius is fixed as long as there is fuel: it does not interpolate between 10 and 30 the way fuel does in vanilla; the configured value is applied from the first frame with fuel.
- At 0 fuel the shield is off (radius 0), just like in vanilla.
- Disabling live (
Enabled = false) keeps the last applied radius until the shield disappears and comes back; to return to the vanilla scale (10–30 depending on fuel), reload the world. - A live multiplayer change is delivered with a short retry burst (3 packets, ~1 s apart). Only if all three were lost does one client keep the previous radius; it re-syncs automatically the moment it reconnects.
- If Valve renames an internal field in a future version, the mod detects it, logs a warning, and stays inactive — no game crash.
Changelog
1.1.1
- The server no longer re-sends the config on a timer. It used to push it to every connected client every 10 s, changed or not; a client now receives it once when it joins and the server speaks again only when its own config actually changes (delivered with a short 3-packet retry, then silence). A server with an untouched config now sends nothing at all, and its log stops repeating itself.
- A client that misses its first config push recovers in about 1 s instead of up to 10 s.
- Live config changes still reach clients in under a second; nothing else about the sync changed, and 1.1.0 clients keep working against a 1.1.1 server (same protocol).
1.1.0
- Multiplayer sync fixed on dedicated servers: clients now really do receive the server's config, and the "mod required" check actually runs. The handshake used to travel on the player character's network channel, which the game silently drops when that character is outside the server's simulation distance — the normal case on a dedicated server, so clients kept their own local radius and no client was ever checked. It now runs on the game's peer-level RPC channel (the one the game uses to spawn objects), which does not depend on the character being nearby.
- Enforcement: with
Enabled = truea client without the mod is disconnected after ~10 s and the server log names the player; withEnabled = falsethere is neither sync nor enforcement. - Rejoining after a dropped connection no longer gets a legitimate client kicked.
- Step-by-step logging on both sides, so a sync issue can be read directly from the logs.
1.0.0
- First release: pins the shield generator radius to a fixed value in meters (
Shield/Radius, 1–500 m), withShield/Enabledto switch the mod on and off. - The value is applied to the radius math and to both visual layers (dome mesh scale plus the image effect's draw distance), so the dome you see always matches the real radius.
- Live editing: save the
.cfgand the change applies in under a second, the dome growing or shrinking in place — no world reload. - Fuel keeps controlling on/off, colour and particles; at 0 fuel the shield is off, as in vanilla.
- Introduced the server-authoritative config and the "mod required on clients" rule, both of which were finished and fixed in 1.1.0.
Note: an internal 1.0.1 build existed during development (build/test tooling and package icon only, no behaviour change); it was never published and its number was folded back into 1.0.0.
Credits
- BepInEx — BepInEx team, MIT license.
- 0Harmony / HarmonyX — patching engine (bundled with BepInEx 5).
