Skip to content
LS
All work
Applied CS15 files · 1.6K LOC

PvEvP

Configurable PvE safe-zones carved into a PvP map — an authoritative damage model, computational-geometry containment tests, and a live in-game zone editor.

  • Enforce Script
  • Computational geometry
  • Custom RPC
  • Schema migration
In game

What it does

PvEvP lets a server run PvP everywhere except inside admin-drawn safe zones, where player-vs-player damage, breaching, and lockpicking are all disabled. A five-minute combat-flag timer stops players diving across the border mid-fight to become invulnerable. Admins draw zones live with an in-game map editor; every player sees synced HUD and map indicators.

Engineering

How it's built

  • Authoritative server damage model — the server is the sole source of truth for containment and damage; the client's synced copy is render-only and never trusted.
  • Computational geometry: a zone is a union of circles and polygons, tested with a ray-casting even-odd point-in-polygon algorithm, with axis-snapping for straight edges and centroid label anchors.
  • A custom RPC protocol tunneled through PlayerBase.OnRPC (REQUEST / SYNC / SAVE) to avoid adding a networked entity, with permission-gated saves.
  • Serialization hardening around DayZ's JSON quirks — compact payloads under a ~1KB RPC cap, ref-object arrays, plus legacy-config schema migration and post-load fixup.
  • Non-invasive integration: modded class hooks layered over four other mods via load-order (requiredAddons) instead of editing them.