Skip to content

RemoveMember

Referee: take a member out of the party for good.

Full documentation: RemoveMember. Wire type: remove_member.

Legal session modes: exploring, town

JSON Schema

{
  "description": "Referee: take a member out of the party for good.\n\nUse it when a character leaves play: one who died too long ago for *raise dead*, a hireling\nwho quits, or a character the player retires. To bring in a replacement, send\n`AddMember` as well. The member can be in any state:\nalive, dead, turned to stone, or asleep. The other members keep their marching order.\n\nName another member in `give_to` to keep what the leaving member carries in the party.\nEvery item and all the coins go to that member: mundane gear, magic items, gems, and\njewellery. Equipped items arrive unequipped in their pack, and an equipped magic item's\neffects end, as with `GiveItems`. A cursed item moves\ntoo, even when its curse is revealed, because the curse holds only its wearer, and the wearer\nhas left. It arrives with its curse hidden again, as *remove curse* leaves an item, so the\nnew owner can drop it or give it away. If they put it on, the curse is revealed again.\nWithout `give_to`, everything the member carries leaves the game with them.\n\nWithout `give_to`, the session refuses to remove a member who carries an item the adventure\ndepends on, because the party might then never open a door or finish a quest. The adventure\ndepends on an item when its catalog id appears in a\n`HasItemCondition` or an\n`ItemAcquiredPattern` anywhere in the adventure.\nThat means the gate of a door, a stair, or a passage, a trigger, or any clause of a quest. The\nsession matches ids the way a `HasItemCondition` does. Mundane items, magic items, and the\nadventure's own items all count, equipped or not. An item counts even when another member\ncarries the same item too. When the session refuses, send the command again and name a\nmember in `give_to` to take everything, the item included.\n\nSome parts of an adventure can't matter again, and they stop protecting their items. A quest\nthat `GameSession.quests` shows as `completed`\nprotects nothing. A trigger protects nothing once it has fired, which means its id is in\n`GameSession.fired_triggers`, unless it's `repeatable`. A quest that is still open protects\nthe items in all its clauses, even an objective that is already complete. A gate always\nprotects its item, because the party can come back to it.\n\nThe session also drops what it tracks about the member. The effects on them end without\nevents, and their death record, their food and water counts, and the record of when they\nlast prepared spells are deleted. An effect the member cast on another member lasts its full\nduration. A light the member carried goes out with them. A burning torch leaves with its\nbearer, and a lantern given to `give_to` arrives unlit. Read\n`GameSession.party_light` afterwards to find\nout whether the party still has light.\n\nThe member's id is retired. The session never gives it to another member, so an old event\nthat names it can't be mistaken for a new member. A replacement that joins with `AddMember`\ngets a new id. The session refuses the old id in later commands with\n`session.command.unknown_member`.\n\nIn a dungeon, the coins and valuables that leave with the member come off\n`treasure_snapshot_cp`, so the\ndeparture doesn't change the experience the party earns for treasure when it comes back to\ntown. With `give_to`, nothing leaves the party, and the snapshot stays as it was.\n\nRemoving a member makes no draws and takes no time. The command is legal only in `town` and\n`exploring`, like `AddMember`. The session never removes the last member who stands, which\nmeans one who is neither dead nor turned to stone, because a party with nobody standing has\nlost the game. To replace a player's last standing character, add the new character with\n`AddMember` first, and then remove the old one.\n\nModes:\n    `town`, `exploring`\n\nRejections:\n    - `session.command.wrong_mode` - an encounter or a battle is open, or the session\n      has ended.\n    - `session.command.unknown_member` - `character_id` or `give_to` matches no party\n      member.\n    - `party.remove.same_member` - `give_to` names the member who leaves.\n    - `session.command.member_incapacitated` - the `give_to` member can't act, because\n      they're dead, asleep, paralysed, or turned to stone.\n    - `party.remove.last_standing` - no member would be left standing. That includes\n      removing the only member.\n    - `party.remove.carries_quest_item` - `give_to` is `None`, and the member carries an\n      item the adventure depends on. The rejection includes the member's id as `character`\n      and the item's catalog id as `item`. When the member carries more than one such item,\n      it names the first in the order that\n      `Inventory.all_instances` lists them.\n\n    The session checks in this order and reports the first that fails.\n\nEvents:\n    With `give_to`, an `EffectReleasedEvent`\n    for each effect of an equipped magic item, then an\n    `ItemsGivenEvent` with what moved, when\n    anything did. Then a `MemberRemovedEvent`\n    with the member's id and name.",
  "properties": {
    "command_type": {
      "const": "remove_member",
      "default": "remove_member",
      "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 leaves, by `MemberView.id`. They can\nbe alive, dead, asleep, or turned to stone."
    },
    "give_to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Give To",
      "description": "The member who takes everything the leaving member carries, by\n`MemberView.id`. Leave it `None` to let it all leave the\ngame with the member. The session refuses `None` when the member carries an item the\nadventure depends on. The member named here has to be able to act."
    }
  },
  "required": [
    "character_id"
  ],
  "title": "RemoveMember",
  "type": "object"
}