ca11bbd4c0
- 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.
155 lines
5.4 KiB
Markdown
155 lines
5.4 KiB
Markdown
# Commands Reference
|
|
|
|
All commands are subcommands of `/minigame`.
|
|
|
|
## Definition Management
|
|
|
|
### `/minigame list`
|
|
|
|
Lists registered minigames and basic runtime state.
|
|
|
|
### `/minigame create <pack> <id> <name>`
|
|
|
|
Creates a new minigame definition with default settings and saves it **into the named
|
|
asset pack** (`<pack>/Server/Minigames/<id>.json`). The pack must exist and be writable
|
|
(not a read-only/zipped pack). Because the definition lives in an asset pack, it is
|
|
reloaded by the normal asset scan on every server start.
|
|
|
|
```text
|
|
/minigame create KingOfHillAssetPack Beach_Race "Beach Race"
|
|
```
|
|
|
|
Ids may only contain letters, numbers, `_` and `-`.
|
|
|
|
### `/minigame info <id>`
|
|
|
|
Shows the loaded definition and runtime status for a minigame.
|
|
|
|
### `/minigame edit <id> <property> <value>`
|
|
|
|
Edits a simple definition property and saves it back into its asset pack.
|
|
Supported properties: `name`, `description`, `enabled`. Use the Hytale asset
|
|
editor for everything else.
|
|
|
|
```text
|
|
/minigame edit Beach_Race name Beach Race Deluxe
|
|
/minigame edit Beach_Race enabled true
|
|
```
|
|
|
|
### `/minigame enable <id>` / `/minigame disable <id>`
|
|
|
|
Sets `Enabled` and persists the definition to its asset pack. Disabling prevents new
|
|
queue joins and starts but does not stop an already running runtime.
|
|
|
|
### `/minigame validate <id>`
|
|
|
|
Runs definition validation (player counts, round length, countdown, overtime/sudden-death
|
|
timer settings).
|
|
|
|
### `/minigame delete <id>`
|
|
|
|
Ends any running runtimes, removes the definition from the asset store, and deletes its
|
|
file from its asset pack. Definitions in read-only packs cannot be deleted.
|
|
|
|
## Runtime Management
|
|
|
|
### `/minigame start <id>`
|
|
|
|
Starts a queued runtime for the given minigame as an **admin start**: the min-player
|
|
pregame check is skipped, so the game runs even with an empty or short queue.
|
|
The selected map comes from `MapSelectionMode`: highest vote for `VOTE`, random
|
|
discovered map for `RANDOM`.
|
|
|
|
A start is refused (with a message) when:
|
|
|
|
- the definition has a `WorldId` and you are in a different world, or
|
|
- no trigger volume sets the game's phase to `ACTIVE` (see *Lifecycle contract*
|
|
in `architecture.md`).
|
|
|
|
### `/minigame stop <id> [reason]`
|
|
|
|
Stops all active runtimes for the minigame ID.
|
|
|
|
### `/minigame reset <id>`
|
|
|
|
Resets all active runtimes for the minigame ID.
|
|
|
|
## Map Commands
|
|
|
|
### `/minigame maps <id>`
|
|
|
|
Lists maps discovered from trigger volumes in the sender's current world. Run this command
|
|
as a player in the world containing the tagged volumes.
|
|
|
|
### `/minigame vote <id> <mapId>`
|
|
|
|
Casts or updates the sender's vote. Only players who are in the queue may vote.
|
|
|
|
## Player Commands
|
|
|
|
### `/minigame join <id> [player]`
|
|
|
|
Adds the command sender, or the optional player target, to the minigame queue.
|
|
Fails when the queue is full (`MaxPlayers`) or the minigame is disabled.
|
|
|
|
### `/minigame leave [player]`
|
|
|
|
Removes the player from every queue and from their current game. Leaving a game restores
|
|
the player's saved inventory; if nobody is left in the runtime, it ends.
|
|
|
|
### `/minigame spectate <id> [player]`
|
|
|
|
Joins a running game as a spectator (requires `AllowSpectators: true` in the definition)
|
|
and teleports the spectator to the game's MainArena volume when one is visible from
|
|
their world. Spectators are excluded from rankings and the scoreboard.
|
|
|
|
## Volume Workflow
|
|
|
|
The old custom minigame volume system was removed. Use Hytale's trigger-volume editor for
|
|
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.
|