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
+56 -4
View File
@@ -22,6 +22,50 @@ Overlapping volumes are valid. Runtime routing uses the selected `MinigameId`, `
## Common Patterns
### Template Spawning
Use `/triggervolume minigametemplate` to place a starter set of normal Hytale trigger
volumes at your current position:
```text
/triggervolume minigametemplate core_lifecycle --MinigameId=MyGame --MapId=Arena01
```
Use `/triggervolume minigametemplates` for the builder UI version. It remembers the
builder's `MinigameId`, `MapId`, and optional `VariantId`, then lists every loaded
template as a one-click spawn action.
Use `/triggervolume templategroup <pack> <groupName> <templateId> <name>` to turn a
configured trigger-volume group in the current world into a reusable template asset.
The exporter stores member positions relative to the group origin and rewrites
minigame/map/variant tags to `Template`.
Templates are assets in `Server/MinigameVolumeTemplates/` and can be edited in the
asset editor. Template volume ids should use `Template_{VolumePurpose}`. When spawned,
`Template` is replaced with `MinigameId_MapId` plus optional `VariantId`, and tags with
`MinigameId=Template`, `MapId=Template`, and `VariantId=Template` are replaced with the
provided command values.
Built-in templates:
- `core_lifecycle`
- `solo_arena`
- `team_arena`
- `race`
- `capture_point`
- `item_spawn`
- `npc_spawn`
- `waiting_area`
- `join_late_spectator`
- `timed_heal_pack`
- `checkpoint`
- `deathzone`
- `map_vote_pad`
- `score_zone`
- `objective_progress`
- `team_assignment_pad`
- `player_activation_spawn`
### Start Zone
Use a normal trigger volume at an entrance, sign, NPC, or lobby pad.
@@ -70,11 +114,18 @@ Use Hytale's normal volume behavior for the area and guard attached effects with
- Condition: `MinigamePhase`
- Field: `Phase = ACTIVE`
### Team Spawns
### Player And Team Spawns
Use normal trigger volumes as spawn markers. The volume position is the teleport destination.
Tag each team spawn volume with:
Tag shared all-player spawn volumes with:
- `MinigameId=<your minigame>`
- `MapId=<map id>`
- optional `VariantId=<variant id>`
- `SpawnRole=PlayerSpawn`
Tag each team-specific spawn volume with:
- `MinigameId=<your minigame>`
- `MapId=<map id>`
@@ -87,10 +138,11 @@ Tag each team spawn volume with:
1. The effect's explicit `DestinationId`.
2. The player's stored checkpoint from `SetSpawnPoint`.
3. A random matching team spawn volume for the player's `TeamId`.
4. A random shared `PlayerSpawn` volume with no `TeamId`.
This means checkpoint-based games can still override spawns per player, while team arena games can rely on tagged team spawn volumes.
This means checkpoint-based games can still override spawns per player, team arena games can rely on tagged team spawn volumes, and solo/FFA games can rely on a pool of shared `PlayerSpawn` volumes.
Player deaths during a minigame automatically use the same destination order. `RespawnPlayer.DestinationId` accepts coordinate strings, such as `100,64,200` or `world_name,100,64,200`; `SetSpawnPoint` uses separate `X`, `Y`, and `Z` fields. Team-spawn fallback is resolved from tagged spawn volumes.
Player deaths during a minigame automatically use the same destination order. `RespawnPlayer.DestinationId` accepts coordinate strings, such as `100,64,200` or `world_name,100,64,200`; `SetSpawnPoint` uses separate `X`, `Y`, and `Z` fields. Spawn fallback is resolved from tagged spawn volumes.
### Counters