Jump to content

3 Screenshots

  • 10.5k
  • 428
  • 82.05 kB

About Player Base PVP Zones

Introduction

Automatically manages PVP zones for player bases, legacy shelters and tugboats.

Background/Compatibility

Player Base PVP Zones is meant for hybrid PVP servers that want to allow online raiding. It is meant to complement Dynamic PVP which only provides zones for monuments and events.

Zone Manager is a hard requirement in order to implement moving zones for tugboats, as it doesn't officially support this feature.

A PVE mod is required to make this useful. I only tested with True PVE for various reasons. Others have reported success with SimplePVE.

Features

  • Manages its own Zone Manager zones and maps them as True PVE exclusion zones
    • (Re)creates zones on plugin load and cleans them up on unload
  • Provides tool cupboard based zones:
    •  Configurable creation & deletion delays
    •  Automatic resizing to always encompass the base as building blocks are added/destroyed, with configurable delay
    •  Configurable minimum total base and per-building-block buffer sizes
  • Provides legacy shelter based zones:
    • Configurable zone size
  • Provides tugboat based zones:
    •  Configurable zone size
    •  Zone moves with the tugboat
  • Optional support for visible zone spheres:
    •  Configurable sphere darkness
    •  Option to globally network tugboats to prevent spheres from disappearing
  • Optional support for language file based zone creation/deletion and entry/exit notifications
  • Configurable PVP expiration delay on player exit from zones
  • Optional support for toggling zones on and off via a permission-controlled command

Zone Toggling Notes

In order for players to toggle zones, they must have the `PlayerBasePvpZones.toggleZones` Oxide permission, or be in an Oxide group that has that permission.

The `/pbpz toggle` command will attempt to toggle a zone if the player is doing one of the following:

  • Looking at and authorized to a Tool Cupboard within interaction range
  • Within building privilege of a Legacy Shelter
  • Mounted to the steering wheel of a Tugboat

If a zone creation/deletion timer is in effect, toggling will cancel it; otherwise, PBPZ will act as if the associated entity (TC/shelter/tugboat) just (de)spawned, applying any appropriate delays.

Besides standard zone creation/deletion delays, exploitation of the toggle feature can be discouraged by configuring timed toggle lockouts that are triggered by toggling and/or by damage being done to building blocks, Tool Cupboards, Shelters, or Tugboats.

Admins can bypass the standard creation/deletion delays by reloading the plugin after running the toggle command.

Admins can also toggle Tool Cupboard zones for other players by temporarily authorizing on the TC, and of course anyone with permission can toggle any Tugboat zone.

Admin toggling of other players' shelter zones is currently not supported (if someone really needs it, I can implement it).

Permissions

  • `PlayerBasePvpZones.toggleZones` controls whether a player/group can use the `/pbpz toggle` command

Commands

  • `/pbpz` in chat supports the following sub-commands:
    • `/pbpz help` shows info on currently available sub-commands (if any)
    • `/pbpz toggle` attempts to toggle a zone on or off

Configuration

Default configuration:

{
  "Zone creation delay in seconds (excludes tugboat)": 60.0,
  "Zone creation delay notifications (owner only, excludes tugboat)": true,
  "Zone deletion delay in seconds": 300.0,
  "Zone deletion delay notifications (all players in zone)": true,
  "Zone creation/deletion notification prefix": "[PBPZ] ",
  "Zone exit PvP delay in seconds (0 for none)": 5.0,
  "Zone sphere darkness (0 to disable, maximum 10)": 0,
  "Zone entry/exit ZoneManager messages": true,
  "Zone TruePVE mappings ruleset name": "exclude",
  "Building settings": {
    "Building update check delay in seconds": 5.0,
    "Building zone overall minimum radius": 16.0,
    "Building zone per-block minimum radius": 16.0
  },
  "Shelter settings": {
    "Shelter zone radius": 8.0
  },
  "Tugboat settings": {
    "Tugboat force global rendering on/off when spheres enabled (null=skip)": null,
    "Tugboat force enable buoyancy when forcing global rendering": false,
    "Tugboat zone radius": 32.0
  },
  "Zone toggle settings": {
    "Zone toggle lockout seconds after damage": 60.0,
    "Zone toggle lockout seconds after toggle": 60.0
  }
}

NOTE: The tugboat rendering options should be left at defaults.

The options are provided for the case that you are running other plugins that force global networking/rendering for tugboats, which can cause spheres to disappear when a tugboat comes back into client render range.This plugin will automatically attempt to synchronize tugboat sphere networking with each tugboat's networking type when (re)creating the spheres.

Developer API

Supported API calls:

bool IsUsingExcludePlayer()
  • Returns whether True PVE 2.2.3+ ExcludePlayer() PVP delay API is being used.
string OnPlayerBasePvpDelayQuery(ulong playerID)
  • Provides the ability to query whether a player has an active PVP delay
    • Returns the triggering zone ID if the referenced player has an active PVP delay
    • Returns an empty string If no PVP delay is active

Hooks:

void OnPlayerBasePvpDelayStart(ulong playerID, string zoneID)
  • Called when PVP exit delay is applied to a player as a result of their exiting a base zone
    • playerID is the ID of the triggering player
    • zoneID is the Zone Manager zone ID whose exit triggered the delay
void OnPlayerBasePvpDelayStop(ulong playerID, string zoneID)
  • Called when PVP exit delay expires from a player
    • playerID is the ID of the triggering player
    • zoneID is the Zone Manager zone ID whose exit triggered the delay

Zone Manager / PVE Plugin Integration

Direct Zone Manager API calls are used to maintain zones for all bases, and indirect True PVE API calls are used to map those zones to the configured True PVE ruleset (`exclude` by default). This will cause True PVE (or other PVE plugins that implement a compatible API) to treat them as PVP areas.

Zone names are broken into categories in case you want other plugins to recognize them separately:

  • `PlayerBasePVP:building` for building block bases
  • `PlayerBasePVP:shelter` for legacy wood shelters
  • `PlayerBasePVP:tugboat` for tugboats

Developer note: Zone IDs are `PlayerBasePVP:` followed by a unique identifier.

Credits

Thanks to the following folks for making this plugin possible:

  • bmgjet (help with / code for tugboat sphere issues)
  • CatMeat & Arainrr (moving Zone Manager zones code examples in Dynamic PVP)
  • Karuza (help with unique entity identifiers & tugboat sphere issues)
  • Kulltero (help with TC/building relationship)
  • WhiteThunder (help with tugboat sphere issues)
  • AFKBank and Mooselips whose bases I took screenshots of on my server during testing 🙂
  • Like 2
  • Love 1

User Feedback

2.2m

Downloads

Total number of downloads.

10.2k

Customers

Total customers served.

147.2k

Files Sold

Total number of files sold.

3.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.