AdventureXpAwardEvent
The delve paid out: what the party earned and what each survivor takes.
Full documentation: AdventureXpAwardEvent. Wire type: adventure_xp_award.
Default visibility: player
Message codes: session.xp.adventure_award
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who is allowed to see an event.\n\nEvery event has one of these two values, and the split exists because B/X keeps some rolls behind the\nreferee's screen. Filter a log on it before you show anything to a player, or call\n`GameSession.view`, which builds the player's and the referee's\nviews for you. A narrator playing referee reads both.\n\nThe values are the lowercase strings and they serialize into every event, so a renamed value is a\n`schema_version` bump.\n\nExamples:\n ```python\n from osrlib.core.events import DamageDealtEvent, HitPointsReportedEvent, Visibility\n\n log = [\n DamageDealtEvent(target_id=\"monster-0001\", amount=5),\n HitPointsReportedEvent(target_id=\"monster-0001\", current_hp=2, max_hp=7),\n ]\n shown = [event.code for event in log if event.visibility is Visibility.PLAYER]\n assert shown == [\"combat.damage.dealt\"] # the goblin's remaining hit points stay hidden\n ```",
"enum": [
"player",
"referee"
],
"title": "Visibility",
"type": "string"
}
},
"description": "The delve paid out: what the party earned and what each survivor takes.\n\nEmitted by `TravelToTown` under the default\nruleset, where experience is awarded for making it back. Each survivor's own\n`XpAwardedEvent` follows it, and a level\ngained follows that.\n\nTreasure counts by what the party carried out compared with what it carried in,\nso goods still lying in the dungeon are worth nothing yet. A party that lost\neveryone awards nothing, because nobody came back to spend it.",
"properties": {
"code": {
"default": "session.xp.adventure_award",
"title": "Code",
"type": "string",
"description": "The message code, always `session.xp.adventure_award`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the award is the point of coming back."
},
"event_type": {
"const": "adventure_xp_award",
"default": "adventure_xp_award",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `adventure_xp_award`."
},
"monster_xp": {
"title": "Monster Xp",
"type": "integer",
"description": "What the defeated creatures were worth, added up across the whole delve."
},
"treasure_xp": {
"title": "Treasure Xp",
"type": "integer",
"description": "What the recovered treasure was worth, one experience point per gold piece of value gained\nsince the party left town, and never less than zero."
},
"share": {
"title": "Share",
"type": "integer",
"description": "What each survivor receives: the total divided by the number of survivors, rounded down."
},
"survivors": {
"items": {
"type": "string"
},
"title": "Survivors",
"type": "array",
"description": "The members who made it back, in marching order. The dead count toward the treasure that\ncame home but take no share."
}
},
"required": [
"monster_xp",
"treasure_xp",
"share",
"survivors"
],
"title": "AdventureXpAwardEvent",
"type": "object"
}