Introduction
Dynamic PVP 4.6.0 is another big release! Let's get into it...
Faster Startup
Startup event creation was actually moved to a coroutine in 4.5.0, allowing Dynamic PVP to start up in the background.
In 4.6.0, I've enhanced this to create zones as quickly as possible. Dynamic throttling will slow things down if server FPS is too low (below 30 FPS, or your configured server FPS limit - whichever is lower), and pauses between event categories will now only occur if debug logging is enabled (the pauses only exist to prevent logging bursts from being too big).
I've also delayed coroutine start by one tick in order to further decouple it from OnServerInitialized()
.
NOTE: It is highly recommended that you use this tweaked version of Zone Manager, which adds a data file write time delay; otherwise it may write the data file hundreds of times at startup: https://umod.org/community/zone-manager/55900-performance-tweaks
New Vanilla Monument Event: Train Tunnel Bunker
It turns out that the Train Tunnel map marker physically connects to the stairwell+dwelling linkage system between a monument/bunker and an underground station. Bunker entrances have their own landmark but no map marker (because the linkage system already has one), so Dynamic PVP was ignoring them. I've provided an exception to this, so now a "Train Tunnel Bunker" monument event will appear in your config file.
Automatic Geometry Calculation for Monument Event Zones
I am proud to announce that I have achieved my personal holy grail for Dynamic PVP: It can now optionally automatically calculate appropriate zone geometry (Size/Radius, Fixed Rotation, Rotation, and Transform Position settings in the config file) for every kind of monument event. I'll cover these in more detail below.
To enable the "auto-geo" feature, set the config file setting "Auto-calculate zone geometry (overwrites existing values)"
to true
for the desired monument event(s).
Note that this is highly efficient: If you enable it for all monument events, startup time should only increase by around 20%.
Note also that geometries are only calculated for enabled events that are present on the current map.
Finally, I should mention that enabling "auto-geo" will cause any existing values to be overwritten in the config file. Please backup your config file before enabling "auto-geo" if you don't want to lose your previous settings.
Train Tunnel, Train Tunnel Dwelling, and Underwater Lab
Train Tunnel and Train Tunnel Dwelling are actually two halves of the linkage system between the surface and an underground Train Tunnel station, which is associated with the Train Tunnel map marker. The "auto-geo" feature will calculate FixedRotation=true bounding boxes around all "prevent building" volumes for each of these, with dimensions large enough to cover any instance on the map if centered on their middle sections.
Underwater Lab works similarly: A FixedRotation=true bounding box is calculated around all "prevent building" volumes for all sections. Custom maps with multiple Underwater Lab monuments will end up with zones large enough to cover any instance. Because these are less finicky than Train Tunnel entrances, they're simply offset from the map marker(s) instead of being centered on a section.
All Other Vanilla Monument and Train Tunnel Section Events
The geometries for these are based on the largest "prevent building" collider volume attached to the monument. All zone parameters are calculated, with FixedRotation=false.
Custom Map Monument Events
Dynamic PVP chooses the closest (ignoring height) custom "prevent building" collider volume engulfing a custom monument marker, breaking any ties by picking the largest one.
All zone parameters are calculated, with FixedRotation=true. Scaling is also accounted for, except that Zone Manager doesn't support non-perfect spheres, so the largest dimension is chosen for the radius.
More Zone Drawing Enhancements
Rotation Fixes
In the process of implementing the "auto-geo" feature, I realized that /dynpvp show
handling of rotation was bugged. I've fixed this by drawing based on raw Zone Manager geometry data.
Range Limit
I also noticed that the addition of Train Tunnel section zones has strained the drawing code, so I've added a range limit. This is controlled by a new "Zone Show Distance" setting in the config file.
The "Show" entry in the language files has been replaced with "Showing" in order to facilitate displaying both the range and the time to the user.