NpcPartySpawnedEvent
An NPC adventuring party was rolled up and put on the board.
Full documentation: NpcPartySpawnedEvent. Wire type: npc_party_spawned.
Default visibility: referee
Message codes: encounter.npc_party.spawned
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": "An NPC adventuring party was rolled up and put on the board.\n\nEmitted by the referee's\n`SpawnNpcParty` and by a wandering roll\nthat comes up adventurers, before the encounter opens.\n\nIt's referee visibility and contains the whole roster. What the party sees is the\n`EncounterStartedEvent`, which names\nthem as adventurers and gives a count. Their classes and levels are something to\nfind out by talking or by fighting.",
"properties": {
"code": {
"default": "encounter.npc_party.spawned",
"title": "Code",
"type": "string",
"description": "The message code, always `encounter.npc_party.spawned`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "referee",
"description": "Referee visibility: the roster is what the party doesn't get to read off a sheet."
},
"event_type": {
"const": "npc_party_spawned",
"default": "npc_party_spawned",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `npc_party_spawned`."
},
"party_kind": {
"title": "Party Kind",
"type": "string",
"description": "Which table the party was rolled from: `\"basic\"` or `\"expert\"`."
},
"npc_ids": {
"items": {
"type": "string"
},
"title": "Npc Ids",
"type": "array",
"description": "The session ids of its members, in roster order. The other three tuples line up with this\none."
},
"class_ids": {
"items": {
"type": "string"
},
"title": "Class Ids",
"type": "array",
"description": "Each member's class, as a class catalog id."
},
"levels": {
"items": {
"type": "integer"
},
"title": "Levels",
"type": "array",
"description": "Each member's level."
},
"alignment": {
"title": "Alignment",
"type": "string",
"description": "The party's alignment, as a lowercase `Alignment` value.\nIt decides how they are played more than how they roll."
}
},
"required": [
"party_kind",
"npc_ids",
"class_ids",
"levels",
"alignment"
],
"title": "NpcPartySpawnedEvent",
"type": "object"
}