Add new minigame volume templates and corresponding tests

- Introduced various minigame volume templates including map vote pad, NPC spawn, objective progress, player activation spawn, race, score zone, solo arena, team arena, team assignment pad, timed heal pack, and waiting area.
- Each template includes specific configurations for positions, shapes, effects, and tags relevant to their functionality.
- Implemented unit tests for minigame volume template export and spawn functionalities to ensure correct behavior and tag rewriting.
- Added tests for minigame map discovery service to validate player respawn logic based on team assignments.
- Enhanced minigame queue service tests to cover player join midgame scenarios.
- Created a data store test for saving and loading player defaults in the minigame template builder.
This commit is contained in:
2026-06-21 13:04:16 -07:00
parent cefe008cae
commit ca11bbd4c0
38 changed files with 2655 additions and 23 deletions
+43
View File
@@ -109,3 +109,46 @@ The old custom minigame volume system was removed. Use Hytale's trigger-volume e
volume placement and attach the minigame trigger effects and conditions there.
`/triggervolume clone` and `/triggervolume clonegroup` (injected by this plugin) help
duplicate configured volumes between maps.
### `/triggervolume minigametemplate <templateName> <flags>`
Spawns an asset-backed minigame trigger-volume template as normal trigger volumes
relative to the command sender's position.
Supported forms:
```text
/triggervolume minigametemplate core_lifecycle --MinigameId=Fishing --MapId=Lake
/triggervolume minigametemplate team_arena --MinigameId=Battle--MapId=Castle--VariantId=Night
```
`MinigameId` and `MapId` are required. `VariantId` is optional. Spawned volume names
replace the template prefix, so `Template_MainArena` becomes
`Fishing_Lake_MainArena` or `Battle_Castle_Night_MainArena`.
The command fails before creating anything when any target volume or group name already
exists. Spawned volumes are normal Hytale trigger volumes and can be moved, resized, and
edited in the trigger-volume editor.
### `/triggervolume minigametemplates`
Opens the builder UI for template spawning. Builders can enter `MinigameId`, `MapId`,
and optional `VariantId` once, then click any loaded template to spawn it at their
current position. The variables are saved per player under the plugin data directory and
are reused until the builder changes them.
### `/triggervolume templategroup <pack> <groupName> <templateId> <name>`
Exports an existing trigger-volume group in the world as a new `MinigameVolumeTemplate`
asset in `<pack>/Server/MinigameVolumeTemplates/<templateId>.json`.
The group origin becomes the template origin. Member volumes are stored at positions
relative to that origin, their ids are rewritten to `Template_<Purpose>`, and
`MinigameId`, `MapId`, and `VariantId` tags are rewritten to `Template`.
```text
/triggervolume templategroup MyAssetPack Battle_Castle core_battle "Core Battle"
```
The new template appears after the next asset reload/server restart and can be spawned
with `/triggervolume minigametemplate` or the template builder UI.