ValheimBattleRoyale
Server-authoritative Battle Royale safe zones for Valheim with shrinking circles, synchronized timers, map overlays and configurable zone damage.Valheim Battle Royale
Battle Royale system for Valheim with server-controlled matches, shrinking safe zones, synchronized map circles, outside-zone damage, automatic PvP and an in-game HUD.
Requirements
- BepInEx for Valheim
- The mod must be installed on the server and on every participating client.
- The server and every participating client must run 1.0.4. The new RPC protocol is incompatible with 1.0.3.
Install ValheimBattleRoyale.dll into:
BepInEx/plugins/
Replace the previous DLL rather than keeping multiple versions installed. The configuration file is generated at BepInEx/config/com.xtasy.ValheimBattleRoyale.cfg.
The server waits for each client's 1.0.4 state acknowledgement before sending zone damage to that client. Clients with an incompatible or missing mod cannot participate correctly.
Main Features
- Server-controlled Battle Royale state
- Match start countdown
- Automatic PvP during the match
- Restoration of the previous PvP setting when the match ends
- Current and next safe zones
- Smooth zone shrinking
- Safe-zone circles on the large map and minimap
- Server-authorized outside-zone damage
- Damage that bypasses armor, blocking and elemental resistance
- Cosmetic fire effect outside the zone
- Valheim TextMeshPro / Norse Bold HUD
- English and Russian localization
- Administrator hotkey and console commands
- Runtime configuration reload
- Snapshot retries and reconnect recovery
- Rate-limited RPC, zone, HUD and damage diagnostics
Match Flow
- Create the initial safe zone.
- Press
F7or usebr start. - The configured start countdown begins.
- When the countdown finishes, the match becomes active and PvP is forced ON for every player.
- Assign the NEXT safe zone.
- After
WaitBeforeShrink, the current zone begins shrinking toward NEXT. - Players outside the effective current zone receive
OutsideDamage. - When shrinking finishes, NEXT becomes CURRENT.
- Assign another NEXT zone and repeat.
- Press
F7again or usebr stopto stop the match. - Each client restores the player's PvP setting from before the match.
NEXT may also be assigned before the match starts. In that case, its waiting timer starts when the match becomes active. Stopping during a shrink freezes CURRENT at its effective center and radius and retains NEXT for a later restart.
PvP
PvP is not forced during the start countdown.
When the Battle Royale becomes active, the mod captures the local player's current PvP setting and enables PvP if necessary. Attempts to disable PvP through SetPVP are blocked while the match is running. Repeated PvP notifications are suppressed.
Players who join an already active match also receive PvP after synchronizing the Battle Royale state.
When the match stops, the captured PvP setting is restored: players who already had PvP enabled keep it enabled; players who had it disabled return to that setting.
Safe Zones
The system uses two zones:
CURRENT— active safe zone.NEXT— destination of the next shrink.
The current zone is shown in green and the next zone in yellow.
Both are rendered on the world map and minimap.
Initial Zone
On the large map:
Shift + Left Click
If no CURRENT zone exists, this creates the initial zone using InitialRadius.
Console alternatives:
br zone <x> <z> [radius]
br here [radius]
Next Zone
If CURRENT already exists:
Shift + Left Click
creates NEXT.
Without an explicit radius:
NextRadius = CurrentRadius × NextRadiusMultiplier
The automatic radius is bounded by MinimumRadius, with that minimum capped at the current radius to avoid enlarging a zone. Explicit radii are handled separately; when RequireNextZoneInsideCurrent is enabled, the complete NEXT circle must fit inside CURRENT.
Console alternatives:
br next <x> <z> [radius]
br nexthere [radius]
Move NEXT
During the waiting phase, PlaceZoneHotkey (default: Shift + Left Click) moves an existing NEXT zone while preserving its radius and restarting the waiting timer.
NEXT cannot be moved while shrinking is in progress.
Cancel
Ctrl + Left Click
cancels NEXT when one exists. If there is no NEXT zone, it cancels the current/start zone.
Console:
br cancelnext
Cancellation is blocked during active shrinking.
Zone Shrinking
After NEXT is assigned, the mod waits for:
WaitBeforeShrink = 300
Then CURRENT smoothly interpolates toward NEXT over:
ShrinkDuration = 180
Both the center and radius change during the shrink.
Clients use the server-provided waiting and shrink durations rather than their local timing settings. Match timers use real elapsed time, independently of changes to world time. Clients estimate server time from received snapshots; timing can differ slightly due to network delivery latency.
When the transition completes, NEXT becomes CURRENT.
Outside-Zone Damage
Default configuration:
OutsideDamage = 10
DamageInterval = 2
With these values, an outside player loses 10 HP every 2 seconds.
The server checks connected peers and their character ZDOs, including players outside its loaded scene, to determine who is outside the effective CURRENT zone. It sends the authorized damage to the owning client, which applies the health change according to Valheim's ownership model.
Damage commands identify the character, match, zone revision and tick. Duplicate, expired and outdated commands are rejected. The client acknowledges the execution result and health before/after the tick. A character whose ZDO or ownership is not ready is skipped with a diagnostic message rather than receiving damage based on an approximate position.
No zone damage is applied during the match start countdown or after the match has stopped.
Battle Royale zone damage bypasses:
- armor
- blocking
- fire resistance
- elemental resistance
The visible burning effect is cosmetic and is not the source of the damage.
Both nonlethal and lethal ticks directly reduce HP, bypassing ordinary damage filters, including armor, blocking, dodge and resistance. A lethal tick sets HP to zero and invokes the standard CheckDeath / Player.OnDeath pipeline for death, tombstone and respawn handling. The direct HP change also bypasses god-mode damage filtering. Mods that intercept only ordinary Character.Damage hits will not see these ticks as normal hits.
HUD
The HUD uses Valheim's native TextMeshPro font asset:
Valheim-Norsebold
It displays:
- match start countdown
- time until shrinking
- active shrink countdown
- outside-safe-zone warning
The main status block is positioned below the minimap, with a fallback position and bounds that keep it on screen. If Norse Bold is not yet available, the HUD uses the default TMP font where available and retries loading the native font. Missing HUD elements are recreated.
Before the first snapshot arrives, the HUD displays a synchronization indicator. An active match with no pending NEXT zone is in Idle: it shows match status but no zone countdown. Set ShowHud = true in the local client's configuration to display the HUD.
Localization
Supported automatically:
- English
- Russian
English is used as the fallback for unsupported languages.
Controls
All administrator shortcuts are configurable in the BepInEx configuration file. The defaults are shown below.
| Control | Action |
|---|---|
F7 |
Start/stop Battle Royale |
PlaceZoneHotkey (default: Shift + Left Click) on map |
Create initial/NEXT zone or move NEXT |
CancelZoneHotkey (default: Ctrl + Left Click) on map |
Cancel NEXT/current zone |
Administrative actions are validated by the server.
Customizing Map Shortcuts
Edit the [Controls] section in the BepInEx configuration file:
[Controls]
StartHotkey = F7
PlaceZoneHotkey = Mouse0 + LeftShift
CancelZoneHotkey = Mouse0 + LeftControl
StartHotkey starts or stops the match. PlaceZoneHotkey creates or moves zones on the large map. CancelZoneHotkey cancels the pending NEXT zone or, when no NEXT exists, the current/start zone.
The bindings use BepInEx KeyboardShortcut syntax. The order and formatting of the serialized keys may differ from the examples. Use the values generated by BepInEx as a reference.
Mouse button names:
| Key | Mouse button |
|---|---|
Mouse0 |
Left mouse button |
Mouse1 |
Right mouse button |
Mouse2 |
Middle mouse button (wheel click) |
Mouse3 |
Additional mouse button (if available) |
Mouse4 |
Additional mouse button (if available) |
For example, Mouse0 + LeftShift means holding the left Shift key while clicking the left mouse button. Mouse1 + LeftControl means holding left Ctrl while clicking the right mouse button.
Shortcut settings can be reloaded at runtime through the mod's configuration reload mechanism. Map shortcuts are intended for the large world map, not the minimap.
Console Commands
br start
br stop
br toggle
br status
br zone <x> <z> [radius]
br next <x> <z> [radius]
br here [radius]
br nexthere [radius]
br cancelnext
br start
Starts the match countdown. A current safe zone must already exist.
br stop
Stops the Battle Royale and restores each local player's previous PvP setting. CURRENT is frozen at its effective center/radius if shrinking was active.
br toggle
Starts or stops the match depending on the current state.
br status
Displays match/zone state, synchronized timing and damage values, snapshot availability, state revision and time since the last received client snapshot.
br zone <x> <z> [radius]
Creates or changes CURRENT.
br here [radius]
Creates CURRENT centered on the administrator.
br next <x> <z> [radius]
Creates NEXT.
br nexthere [radius]
Creates NEXT centered on the administrator.
br cancelnext
Cancels the pending NEXT zone. Cancellation is rejected while shrinking is active.
Default Configuration
[Controls]
StartHotkey = F7
PlaceZoneHotkey = Mouse0 + LeftShift
CancelZoneHotkey = Mouse0 + LeftControl
[Match]
StartCountdown = 10
[Zone]
InitialRadius = 3000
NextRadiusMultiplier = 0.5
MinimumRadius = 25
WaitBeforeShrink = 300
ShrinkDuration = 180
RequireNextZoneInsideCurrent = true
[Damage]
OutsideDamage = 10
DamageInterval = 2
[UI]
ShowHud = true
[Diagnostics]
Enabled = true
SummaryInterval = 30
Configuration
StartHotkey
Administrator hotkey used to start or stop the match.
PlaceZoneHotkey
Configurable keyboard/mouse shortcut for creating or moving zones on the large map. Default: left Shift + left click.
CancelZoneHotkey
Configurable keyboard/mouse shortcut for cancelling the NEXT or current/start zone on the large map. Default: left Ctrl + left click.
StartCountdown
Seconds between starting the Battle Royale and the match becoming active.
InitialRadius
Radius used for the initial safe zone.
NextRadiusMultiplier
Multiplier used to calculate NEXT when no explicit radius is supplied.
MinimumRadius
Minimum automatically calculated safe-zone radius.
WaitBeforeShrink
Seconds between assigning NEXT and beginning the shrink.
ShrinkDuration
Duration of the CURRENT → NEXT transition.
RequireNextZoneInsideCurrent
When enabled, the complete NEXT zone must fit inside CURRENT.
OutsideDamage
HP removed per outside-zone damage tick.
DamageInterval
Seconds between outside-zone damage ticks.
ShowHud
Enables or disables the Battle Royale HUD on the local client.
[Diagnostics] Enabled
Enables RPC, zone, HUD and damage summaries. Warnings remain enabled even when summaries are disabled.
[Diagnostics] SummaryInterval
Seconds between repeated diagnostic summaries. Default: 30; supported range: 5–300 seconds. Repeated warnings are limited separately, usually to once every 10 or 30 seconds.
Runtime Configuration Reload
The configuration file is monitored and reloaded while the game is running.
Reloads are applied on the Unity main thread. Gameplay timing and damage values must be changed on the server; clients receive the effective values through state snapshots.
WaitBeforeShrinkchanges apply to an existing waiting phase, measured from its original assignment time.ShrinkDurationis captured when a shrink begins. A reload changes the next shrink without changing an active transition.OutsideDamageandDamageIntervalupdate future damage ticks; a tick already scheduled may retain its previous deadline.StartCountdownaffects future match starts.- Radius calculation settings affect future zone assignments.
- Local controls, HUD visibility and diagnostic settings can be changed without restarting the game.
Server Authority
The server controls or authorizes:
- match state
- current and next zones
- zone phases
- synchronized timing
- administrator requests
- outside-zone detection
- outside-zone damage
Clients render synchronized UI/map information and apply server-authorized player-owned health changes. State and damage RPCs are accepted only from the server peer. Server state snapshots are sent every 5 seconds; clients retry snapshot requests every 3 seconds while waiting for initial state or resynchronization.
The server uses client-replicated ZDO positions, and the owning client executes HP changes. Damage acknowledgements provide diagnostics; they are not an independent anti-cheat guarantee.
Diagnostics and Troubleshooting
Keep [Diagnostics] Enabled = true during multiplayer testing. Logs are written through BepInEx to BepInEx/LogOutput.log and use the [BR104 server] or [BR104 client] prefix.
| Symptom | What to check |
|---|---|
| Missing HUD timer | Check ShowHud, HUD summaries, font availability and State RX. A countdown appears during Starting, Waiting or Shrinking, not Idle. |
| No outside-zone damage | Check server Damage TX, client Damage RX and server Damage ACK. Look for missing character ZDO/owner, state-mismatch, character-not-ready, health-unchanged or death-error. |
| Incompatible or disconnected client | Check State ACK, No recent state ACK, and Damage deferred. Confirm that both server and client run 1.0.4. |
| Repeated PvP changes | Check Prevented disabling PvP and Suppressed repeated PvP notification messages to identify repeated attempts. |
For a multiplayer issue, collect the full server log and the affected clients' logs from the same test. Compare peer IDs, character IDs, match IDs, zone revisions and damage sequence numbers.
Validation
The 1.0.4 Release build completed with zero errors and warnings using the available local Valheim, BepInEx and Harmony libraries. The compiled state serializer passed 210 checks covering roundtrips, server parameters, invalid values and truncated packets.
Live gameplay, HUD rendering, installation of Harmony patches in the running game, interactions with other mods and the 10-player multiplayer test have not been run as part of this validation.
Version
1.0.4
