Skip to content

v1.4.0 - Ecosystem integration (RaidableBases, Convoy, Armored Train, Discord)

Choose a tag to compare

@gjdunga gjdunga released this 16 May 18:43
· 52 commits to main since this release

PVE Damage Guard v1.4.0 - ecosystem integration.

Hooks into the popular Rust PVE/event plugins so rule-matrix contexts switch automatically based on what's happening on the server. Adds Discord webhook output for moderation visibility.

Integrations

RaidableBases (nivex)

Detects raid base domes via OnRaidableBaseStarted/Ended hooks (both v1 and v2 signatures). Proximity-checks victim position against tracked domes; flips context to InRaidableBaseDome (configurable) when inside. Configurable radius override.

Convoy (Adem)

Listens for OnConvoyStart/Stop. Tracked as a server-wide global event flag (the convoy is a moving fleet without a single canonical position). Activates AtPvpEvent context server-wide while convoy is running.

Armored Train (Adem)

Same pattern as Convoy. Supports both OnTrainEventStart/Stop and OnArmoredTrainEventStart/Stop hook signatures for cross-version compatibility.

Discord webhooks

Configurable webhook URL, minimum log level (default Reflects), per-minute rate limit (default 20 to stay under Discord's 30/min cap), message prefix, username override, avatar override. Sliding 1-minute window rate limiter. Async via Oxide webrequest.Enqueue.

New commands

  • /pdg events - lists active entity events (Bradley/Heli/Cargo), RaidableBases domes, global events (Convoy/ArmoredTrain). Shows positions, modes, ages.
  • /pdg webhook - shows Discord webhook status.
  • /pdg webhook test - sends a one-shot test message to verify webhook URL.
  • /pdg webhook on|off - toggle webhook without editing config.

Public API

No new API methods. Existing API methods (API_GetActiveContext, API_IsPvpAt, API_IsAllowed) now respect RaidableBases dome positions and global event flags transparently.

Documentation

Four new integration recipes in docs/integrations/:

Backwards compatibility

All four integrations are optional. PVEDamageGuard runs exactly as in v1.3.0 if none of the integrated plugins are installed and DiscordWebhook.Enabled=false (the default). No breaking changes.

Install

Drop PVEDamageGuard.cs (below) into oxide/plugins/. To enable Discord webhooks, edit oxide/config/PVEDamageGuard.json and set the DiscordWebhook.Url + Enabled=true, then /pdg reload.

License

GPL-3.0