- 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.
3.0 KiB
Examples
These examples describe the current Hytale-native setup: minigame definitions are assets, and world interaction is done with normal Hytale trigger volumes using the minigame trigger condition/effect types.
Simple Start Pad
Definition file: Server/Minigames/Quick_Brawl.json
{
"Id": "Quick_Brawl",
"Name": "Quick Brawl",
"Description": "A short solo score test.",
"Enabled": true,
"MinPlayers": 1,
"MaxPlayers": 8,
"TeamMode": "SOLO",
"WinCondition": "HIGHEST_SCORE",
"RoundLengthSeconds": 120,
"CountdownSeconds": 5,
"AllowPvp": true,
...
}
Editor setup:
- Create a normal Hytale trigger volume at the start pad.
- Add the
StartMinigameeffect. - Set
MinigameIdtoQuick_Brawlusing the asset picker.
Activating Players
Players must be explicitly set to ACTIVE status before the activation lifecycle runs. This is what triggers inventory saving, start item giving, game mode change, and HUD display. Without a SetPlayerStatus ACTIVE effect, none of these happen.
A common pattern is a spawn-room trigger volume that all players enter when the game starts:
- Create a trigger volume covering the spawn area.
- Add
PlayerInMinigameas a condition (MinigameId = Quick_Brawl, leavePlayerIdblank). - Add
SetPlayerStatusas an effect (MinigameId = Quick_Brawl,Status = ACTIVE, leavePlayerIdblank).
The entering player is resolved from the trigger context, so leaving PlayerId blank activates whoever enters the volume.
Score Zone
Definition file: Server/Minigames/Hill_Points.json
{
"Id": "Hill_Points",
"Name": "Hill Points",
"Enabled": true,
"MinPlayers": 1,
"MaxPlayers": 12,
"TeamMode": "SOLO",
"WinCondition": "FIRST_TO_SCORE",
"RoundLengthSeconds": 300
}
Editor setup:
- Create a normal Hytale trigger volume around the scoring area.
- Add
PlayerInMinigameas a condition. - Add
ModifyPlayerScoreas an effect. - Set
MinigameId = Hill_Points,Operation = ADD, andAmount = 1.
If the trigger context already contains the player who entered the volume, leave PlayerId blank.
End When Score Reaches a Target
Condition:
- Type:
PlayerScore MinigameId = Hill_PointsCompare = GREATER_THAN_OR_EQUALValue = 100
Effect:
- Type:
EndMinigame MinigameId = Hill_PointsReason = score_reached
Team Score Zone
Use ModifyTeamScore when the score belongs to a team instead of a player.
Required fields:
MinigameIdTeamIdOperationAmount
Use AssignTeam with BalanceTeams=true to split all players in the started runtime evenly across teams. If no teams already exist, the effect creates team1..teamN from the minigame's TeamCount.
Counter Gate
Increment:
- Effect:
ModifyCounter CounterId = captured_pointsOperation = ADDAmount = 1
Gate:
- Condition:
Counter CounterId = captured_pointsCompare = GREATER_THAN_OR_EQUALValue = 3
Then attach a follow-up effect, such as SetMinigamePhase or EndMinigame.