62 lines
1.2 KiB
Markdown
62 lines
1.2 KiB
Markdown
# Getting Started
|
|
|
|
## 1. Build and run
|
|
|
|
```bash
|
|
gradlew.bat shadowJar
|
|
gradlew.bat runServer
|
|
```
|
|
|
|
## 2. Create a minigame asset
|
|
|
|
Create `src/main/resources/Server/Minigames/My_Game.json`:
|
|
|
|
```json
|
|
{
|
|
"Id": "My_Game",
|
|
"Name": "My Game",
|
|
"Description": "A quick test minigame.",
|
|
"Enabled": true,
|
|
"MinPlayers": 1,
|
|
"MaxPlayers": 4,
|
|
"TeamMode": "SOLO",
|
|
"WinCondition": "HIGHEST_SCORE",
|
|
"RoundLengthSeconds": 120,
|
|
"CountdownSeconds": 5
|
|
}
|
|
```
|
|
|
|
The filename and `Id` should match.
|
|
|
|
## 3. Confirm the asset loaded
|
|
|
|
```text
|
|
/minigame list
|
|
/minigame info My_Game
|
|
/minigame validate My_Game
|
|
```
|
|
|
|
## 4. Add trigger-volume logic
|
|
|
|
Use the Hytale trigger-volume editor:
|
|
|
|
1. Create a normal trigger volume.
|
|
2. Add the `StartMinigame` effect.
|
|
3. Set `MinigameId` to `My_Game` from the dropdown.
|
|
|
|
To make the volume award score:
|
|
|
|
1. Add the `PlayerInMinigame` condition.
|
|
2. Add the `ModifyPlayerScore` effect.
|
|
3. Set `Operation = ADD` and `Amount = 1`.
|
|
|
|
## 5. Start from commands when needed
|
|
|
|
```text
|
|
/minigame enable My_Game
|
|
/minigame join My_Game
|
|
/minigame start My_Game
|
|
```
|
|
|
|
Command starts are useful for testing. Production interaction should normally come from Hytale trigger volumes.
|