AwardXP
Referee: give one character experience points, apart from the XP the session awards.
Full documentation: AwardXP. Wire type: award_xp.
Legal session modes: battle, encounter, exploring, game_over, town, victory
JSON Schema
{
"description": "Referee: give one character experience points, apart from the XP the session awards.\n\nUse it for a quest reward or for any other XP you grant. This command is legal in\nevery mode, `game_over` and `victory` included, so you can grant an adventure's rewards after the\nsession has ended. The class's prime-requisite bonus or penalty applies to the award,\nand the award can raise the character a level.\n\nModes:\n `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n - `session.command.unknown_member` - `character_id` matches no party member.\n\nEvents:\n `XpAwardedEvent` with the award, the\n adjusted award, and the level after. When the award reaches the next level, a\n `CharacterLeveledUpEvent`\n follows with the levels, the hit points gained, and the new title.",
"properties": {
"command_type": {
"const": "award_xp",
"default": "award_xp",
"title": "Command Type",
"type": "string",
"description": "The name that identifies the command class in serialized data. Each command class fixes\nit to a distinct snake_case string, like `\"move_party\"` or `\"open_door\"`, and constructing\nthe class sets it, so you never pass it yourself.\n`parse_command` and the\n`AnyCommand` union use it to rebuild the right class\nfrom a serialized mapping. A class's value never changes between releases."
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source",
"description": "Who or what issued the command on whose behalf: an authored trigger or quest id, or the\nname of one of your game's systems. The engine never reads it, so a command with a\n`source` does exactly what the same command without one does. The session logs and\nreplays it with the command, so the log alone shows why something happened. Leave it\n`None` when there's nothing to record. An empty string fails validation when the command\nis constructed."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The member who receives the experience, by\n`MemberView.id`. A command you issue yourself has a\nmember id here, and the session refuses any other value with `session.command.unknown_member`.\nA consequence or a reward in an adventure document has a party selector instead,\n`\"@party\"` for every living member or `\"@first\"` for the first living member, because the\nsession assigns member ids when it starts. The trigger and quest interpreter replaces the selector\nwith member ids before it issues the command."
},
"amount": {
"minimum": 0,
"title": "Amount",
"type": "integer",
"description": "The award before the class's prime-requisite adjustment. B/X grants at most one level\nper award. XP that would raise the character two levels stops one point short of the\nsecond level, and the rest is lost. Send another award to raise the character further."
}
},
"required": [
"character_id",
"amount"
],
"title": "AwardXP",
"type": "object"
}