Skip to content

SpawnNpcParty

Referee: generate a party of NPC adventurers and open an encounter with them.

Full documentation: SpawnNpcParty. Wire type: spawn_npc_party.

Legal session modes: exploring

JSON Schema

{
  "description": "Referee: generate a party of NPC adventurers and open an encounter with them.\n\nAn NPC adventurer is a character the engine generates, with a class, a level, and gear,\nrather than a monster from the catalog. The party must be standing in a dungeon with no\nencounter already open, so the command is legal only in `exploring`. Unlike\n`SpawnMonsters`, it can't add a group to an open\nencounter.\n\nSet `count_fixed` for a band of an exact size, `count_dice` to roll the size, or neither\nto roll the B/X number for `party_kind`. Setting both fails validation.\n\nModes:\n    `exploring`\n\nRejections:\n    - `session.command.wrong_mode` - the party is in town, an encounter or a battle is\n      open, or the session has ended.\n\nEvents:\n    `NpcPartySpawnedEvent`, which lists the\n    NPC party at referee visibility, then the encounter's opening, as for\n    `SpawnMonsters`.",
  "properties": {
    "command_type": {
      "const": "spawn_npc_party",
      "default": "spawn_npc_party",
      "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."
    },
    "party_kind": {
      "enum": [
        "basic",
        "expert"
      ],
      "title": "Party Kind",
      "type": "string",
      "description": "Which table to build the party from: `basic` for low-level adventurers, or `expert` for\nhigher-level ones. Either kind of party's group in the encounter has the label `\"adventurer\"`\nand the plural `\"adventurers\"`."
    },
    "count_dice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Count Dice",
      "description": "How many adventurers, as a dice expression rolled on the session's\n`ENCOUNTER_STREAM`. A malformed expression fails\nvalidation when the command is constructed. A roll below 1 counts as 1. Don't set it\ntogether with `count_fixed`.\n\nWhen both this and `count_fixed` are `None`, the default, the engine rolls the B/X number\nfor `party_kind`: 1d4+4 for `basic` and 1d6+3 for `expert`."
    },
    "count_fixed": {
      "anyOf": [
        {
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Count Fixed",
      "description": "How many adventurers, as an exact number. Use it when the adventure's author chose the\nsize of the band. The session rolls nothing for the size. Don't set it together with\n`count_dice`."
    },
    "distance_feet": {
      "minimum": 0,
      "title": "Distance Feet",
      "type": "integer",
      "description": "How far away the NPC party appears, in feet, on the same terms as\n`SpawnMonsters.distance_feet`."
    }
  },
  "required": [
    "party_kind",
    "distance_feet"
  ],
  "title": "SpawnNpcParty",
  "type": "object"
}