49bbd2b871
- Implemented LeaveMinigameQueueEffect to handle player removal from queues and runtime. - Added OpenMinigameQueueUIEffect to manage the opening of the minigame queue UI. - Introduced StartPlayerTimerEffect and StopPlayerTimerEffect for managing player timers and scoring. - Enhanced PlaceBlocksEffect with options for filling volumes and hollow placements. - Updated SpawnItemEffect to fix codec handling for item IDs. - Added MountPlayerEffect and DismountPlayerEffect for player interactions with NPCs. - Improved StartQueuedMinigameEffect to check player counts before starting games. - Added localization entries for new effects and UI elements. - Updated manifest to include HyUI as a dependency.
5.2 KiB
5.2 KiB
King of the Hill — Complete Reference
All volumes and the definition file in one place. Use this as a checklist when setting up your world.
Definition File
Path: src/main/resources/Server/Minigames/King_Of_The_Hill.json
{
"Id": "King_Of_The_Hill",
"Name": "King of the Hill",
"Enabled": true,
"MinPlayers": 2,
"MaxPlayers": 16,
"TeamMode": "SOLO",
"WinCondition": "HIGHEST_SCORE",
"RoundLengthSeconds": 120,
"TotalRounds": 3,
"CountdownSeconds": 10,
"AllowPvp": true,
"RequiredGameMode": "Adventure",
"ShowHud": true,
"ShowScore": true,
"ShowTime": true,
"ShowRound": true
}
Volume Checklist
| # | Volume Name | Type | Tags | Conditions | Effects |
|---|---|---|---|---|---|
| 1 | Arena Boundary | Enter | MinigameId=King_Of_The_Hill MapId=Hillside MapRole=MainArena |
— | — |
| 2 | Queue Pad | Enter | MinigameId=King_Of_The_Hill |
— | JoinMinigameQueue → StartQueuedMinigame |
| 3 | Starting Signal | Tag Added | MinigameId=King_Of_The_Hill MapId=Hillside SignalPhaseStart=STARTING |
— | SetMinigamePhase ACTIVE |
| 4 | Spawn Zone | Enter | MinigameId=King_Of_The_Hill MapId=Hillside |
PlayerInMinigame + MinigamePhase=ACTIVE |
SetPlayerStatus ACTIVE → SetSpawnPoint |
| 5 | Capture Zone A | TICK (1s) | MinigameId=King_Of_The_Hill MapId=Hillside |
PlayerInMinigame + CurrentRound=EQUAL 1 |
ModifyPlayerScore ADD 1 |
| 6 | Capture Zone B | TICK (1s) | MinigameId=King_Of_The_Hill MapId=Hillside |
PlayerInMinigame + CurrentRound=EQUAL 2 |
ModifyPlayerScore ADD 1 |
| 7 | Capture Zone C | TICK (1s) | MinigameId=King_Of_The_Hill MapId=Hillside |
PlayerInMinigame + CurrentRound=EQUAL 3 |
ModifyPlayerScore ADD 1 |
| 8 | Round 2 Signal | Tag Added | MinigameId=King_Of_The_Hill MapId=Hillside SignalRoundStart=2 |
— | SendMinigameMessage round_2_start ALL |
| 9 | Round 3 Signal | Tag Added | MinigameId=King_Of_The_Hill MapId=Hillside SignalRoundStart=3 |
— | SendMinigameMessage round_3_start ALL |
| 10 | End Announcement | Tag Added | MinigameId=King_Of_The_Hill MapId=Hillside SignalPhaseStart=ENDING |
— | SendMinigameMessage game_over ALL (optional) |
| 11 | Arena Reset | Tag Added | MinigameId=King_Of_The_Hill MapId=Hillside SignalPhaseStart=RESETTING |
— | (block restore effects) (optional) |
The game ends automatically when Round 3's timer expires — no end-game timer volume is needed.
Volume Detail — Queue Pad (Auto-Start)
Tags:
MinigameId = King_Of_The_Hill
Effects:
JoinMinigameQueue MinigameId=King_Of_The_Hill
StartQueuedMinigame MinigameId=King_Of_The_Hill
StartQueuedMinigame is a no-op until MinPlayers (2) are in the queue AND no runtime is already running.
Volume Detail — Starting Signal
Tags:
MinigameId = King_Of_The_Hill
MapId = Hillside
SignalPhaseStart = STARTING
Effects:
SetMinigamePhase MinigameId=King_Of_The_Hill Phase=ACTIVE
Fires after the countdown completes. The system runs the CountdownSeconds countdown
automatically during WAITING_FOR_PLAYERS — no timer volume required.
Volume Detail — Spawn Zone
Tags:
MinigameId = King_Of_The_Hill
MapId = Hillside
Conditions:
PlayerInMinigame MinigameId=King_Of_The_Hill
MinigamePhase MinigameId=King_Of_The_Hill Phase=ACTIVE
Effects:
SetPlayerStatus MinigameId=King_Of_The_Hill Status=ACTIVE
SetSpawnPoint MinigameId=King_Of_The_Hill DestinationId=<X,Y,Z>
Replace <X,Y,Z> with the world coordinates of your spawn area.
Volume Detail — Capture Zone A (copy pattern for B and C)
Tags:
MinigameId = King_Of_The_Hill
MapId = Hillside
Conditions:
PlayerInMinigame MinigameId=King_Of_The_Hill
CurrentRound MinigameId=King_Of_The_Hill Compare=EQUAL Round=1
Effects:
ModifyPlayerScore MinigameId=King_Of_The_Hill Operation=ADD Amount=1
Change Round=1 to Round=2 and Round=3 for Zones B and C.
Common Mistakes
| Symptom | Likely Cause |
|---|---|
| HUD never appears | SetPlayerStatus ACTIVE is not firing — check that the spawn zone has both PlayerInMinigame and MinigamePhase=ACTIVE conditions. |
| Score never changes | Capture zone tick interval is not set, or the CurrentRound condition does not match the active round. Verify the Round value matches the round number (1, 2, or 3). |
| Game never starts | Queue pad must have both JoinMinigameQueue AND StartQueuedMinigame. The starting signal volume must have SignalPhaseStart=STARTING with SetMinigamePhase ACTIVE effect. |
| Game never ends | Rounds do not auto-end if OvertimeEnabled or SuddenDeathEnabled are set in the definition. Verify neither is enabled. |
| Volume conditions blocked | Wrong MinigameId value — ensure every volume and every condition/effect field uses exactly King_Of_The_Hill (case-sensitive, underscores not spaces). |
| Players not activating | Phase was never set to ACTIVE — verify the auto-start signal volume (SignalPhaseStart=WAITING_FOR_PLAYERS) is present and fires SetMinigamePhase ACTIVE. |
| Game starts with 1 player | MinPlayers in the definition is set to 1. Change to 2 if you need two players. |