Skip to content

ReorderParty

Set the party's marching order.

Full documentation: ReorderParty. Wire type: reorder_party.

Legal session modes: exploring, town

JSON Schema

{
  "description": "Set the party's marching order.\n\nMarching order is the order the members walk in, front first. It determines who a door trap\nsprings on, who reaches into a treasure cache, and who stands in the front rank when a\nfight starts. Pass the new order in `order`, a tuple of every member's id, front first.\nSend this command in town or while exploring. The session refuses it once an encounter or\na battle has begun.\n\nDuring a battle, the order changes only when a member withdraws or retreats alone. That\nmember trades places with the member named in\n`BattleDeclaration.replacement_id`.\nThe new order stays after the battle, until you send this command again.\n\nModes:\n    `town`, `exploring`\n\nRejections:\n    - `session.command.wrong_mode` - an encounter or battle is underway, or the\n      session has ended.\n    - `exploration.party.bad_order` - `order` doesn't list exactly the current\n      members, each once.\n\nEvents:\n    A `PartyReorderedEvent` with the new order.\n    `PlayerView.party` lists the members in the same\n    order.",
  "properties": {
    "command_type": {
      "const": "reorder_party",
      "default": "reorder_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."
    },
    "order": {
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "title": "Order",
      "type": "array",
      "description": "Every current member's id, dead members included, each exactly once, with the front of\nthe marching order first. The ids are the\n`MemberView.id` values in\n`PlayerView.party`. Marching order determines who a\ndoor trap springs on, who reaches into a cache, and who stands in the front rank when a\nfight starts. The session refuses any other list with `exploration.party.bad_order`."
    }
  },
  "required": [
    "order"
  ],
  "title": "ReorderParty",
  "type": "object"
}