CONTENT CONTRACT · VERSION 1
grant_xp
Grant a player experience on the character level or a progress track; levels it reaches announce themselves.
Signature
{ amount: PositiveCount, kind: "grant_xp", player: PlayerRef, track: (ProgressTrackId)? }Fields
| Name | Type | Meaning |
|---|---|---|
amount | PositiveCount | Experience granted. Range: 1…2147483647; Unit: count |
kind | "grant_xp" | Discriminant |
player | PlayerRef | Player that gains the experience. Length: 1…256; Pattern: ^[\s\S]+$ |
track | ProgressTrackId | Progress track it goes to; absent: the character level. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: progress_track |
Validated example
{
"amount": 30,
"kind": "grant_xp",
"player": "p1",
"track": "reference:gardening"
}