You are viewing a potentially older version of this package. View all versions.
Xtasy-ValheimBattleRoyale-1.0.3 icon

ValheimBattleRoyale

Server-authoritative Battle Royale safe zones for Valheim with shrinking circles, synchronized timers, map overlays and configurable zone damage.

By Xtasy
Date uploaded 20 hours ago
Version 1.0.3
Download link Xtasy-ValheimBattleRoyale-1.0.3.zip
Downloads 11
Dependency string Xtasy-ValheimBattleRoyale-1.0.3

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2350

README

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.
  • All participants should use the same mod version.

Install ValheimBattleRoyale.dll into:

BepInEx/plugins/

Main Features

  • Server-controlled Battle Royale state
  • Match start countdown
  • Automatic PvP during the match
  • Automatic PvP disable 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

Match Flow

  1. Create the initial safe zone.
  2. Press F7 or use br start.
  3. The configured start countdown begins.
  4. When the countdown finishes, the match becomes active and PvP is forced ON for every player.
  5. Assign the NEXT safe zone.
  6. After WaitBeforeShrink, the current zone begins shrinking toward NEXT.
  7. Players outside the effective current zone receive OutsideDamage.
  8. When shrinking finishes, NEXT becomes CURRENT.
  9. Assign another NEXT zone and repeat.
  10. Press F7 again or use br stop to stop the match.
  11. PvP is automatically switched OFF for players whose PvP was forced by the Battle Royale.

PvP

PvP is not forced during the start countdown.

When the Battle Royale becomes active, every client continuously applies:

PvP = ON

This prevents normal players from disabling PvP through the Valheim interface while the match is running.

Players who join an already active match also receive PvP after synchronizing the Battle Royale state.

When the match stops, the mod automatically switches PvP OFF again for players whose PvP state was forced by the Battle Royale.

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 radius will not go below MinimumRadius.

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.

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 determines which players are outside the safe zone and authorizes the damage. The authorized damage is delivered to the owning client to work correctly with Valheim's player ownership model.

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.

Lethal zone damage uses Valheim's normal damage/death pipeline.

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.

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. Forced PvP is automatically switched off on clients.

br toggle

Starts or stops the match depending on the current state.

br status

Displays the current Battle Royale state.

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.

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

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.

Runtime Configuration Reload

The configuration file is monitored and reloaded while the game is running.

Values such as zone timings and outside damage can therefore be adjusted without rebuilding the plugin.

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.

Version

1.0.3

CHANGELOG

Changelog

1.0.3

Fixed

  • Fixed a compilation error caused by a leftover reference to the removed shift variable.
  • Removed the unused _shiftWasDown field after migrating map controls to configurable shortcuts.

1.0.2

Changed

  • Added mouse button explanations to the configuration descriptions for zone placement and cancellation.
  • Documented Mouse0 (left click), Mouse1 (right click), and Mouse2 (middle/wheel click).

1.0.1

Added

  • Added configurable PlaceZoneHotkey and CancelZoneHotkey shortcuts.
  • Added support for changing the modifier and mouse button used for zone placement and cancellation.
  • Zone control shortcuts now use BepInEx KeyboardShortcut settings and support runtime configuration reload.

Changed

  • Replaced hardcoded Shift/Ctrl + left-click zone controls with configurable bindings.

1.0.0

Added

  • Server-controlled Battle Royale match system.
  • Configurable match start countdown.
  • Automatic PvP for all players when the match starts.
  • Automatic PvP disable when the match stops.
  • PvP is continuously enforced while a Battle Royale match is active.
  • Late joiners automatically enter PvP after receiving the active match state.
  • Initial and next safe zones.
  • Configurable initial radius, next-zone multiplier and minimum radius.
  • Configurable delay before shrinking and shrink duration.
  • Optional requirement that the next zone fits completely inside the current zone.
  • Smooth synchronized interpolation of safe-zone center and radius.
  • Current and next safe-zone circles on the world map and minimap.
  • Administrator map controls for creating, moving and cancelling zones.
  • Server-authorized outside-zone damage for remote players.
  • Zone damage bypasses armor, blocking and elemental resistances.
  • Normal Valheim death handling for lethal zone damage.
  • Cosmetic burning effect outside the safe zone.
  • TextMeshPro HUD using Valheim's native Valheim-Norsebold font asset.
  • Automatic English and Russian localization.
  • HUD countdowns for match start, waiting phase and active shrinking.
  • Outside-safe-zone warning.
  • Runtime configuration reload.
  • Server-side validation of administrator Battle Royale requests.
  • Console commands for match and zone administration.

Fixed

  • Fixed outside-zone damage not reducing health for remote/non-host players.
  • Fixed lethal direct HP removal causing errors in Valheim's death pipeline.
  • Fixed compatibility with Valheim builds where GetServerPeerID() is private.
  • Fixed inconsistent Russian HUD glyphs caused by IMGUI font fallback.
  • Fixed inconsistent title/timer font sizes.
  • Removed deprecated TextMeshPro enableWordWrapping usage.