Skip to content

GiveItems

Hand items and coins from one party member to another.

Full documentation: GiveItems. Wire type: give_items.

Legal session modes: encounter, exploring, town

JSON Schema

{
  "$defs": {
    "Coins": {
      "description": "A fixed pile of coins, like generated treasure, the contents of a chest, or a pile dropped on the floor.\n\nFrozen, unlike the `CoinPurse` a character carries.\n`generate_treasure` returns its coins in this\nform, and a dungeon feature contains its coins this way until someone picks them up. To\ngive the coins to a character, add each denomination to their purse.",
      "properties": {
        "pp": {
          "default": 0,
          "minimum": 0,
          "title": "Pp",
          "type": "integer",
          "description": "Platinum pieces, worth 5 gp each."
        },
        "gp": {
          "default": 0,
          "minimum": 0,
          "title": "Gp",
          "type": "integer",
          "description": "Gold pieces."
        },
        "ep": {
          "default": 0,
          "minimum": 0,
          "title": "Ep",
          "type": "integer",
          "description": "Electrum pieces, worth half a gold piece each."
        },
        "sp": {
          "default": 0,
          "minimum": 0,
          "title": "Sp",
          "type": "integer",
          "description": "Silver pieces, ten to the gold piece."
        },
        "cp": {
          "default": 0,
          "minimum": 0,
          "title": "Cp",
          "type": "integer",
          "description": "Copper pieces, a hundred to the gold piece."
        }
      },
      "title": "Coins",
      "type": "object"
    }
  },
  "description": "Hand items and coins from one party member to another.\n\nUse it to spread the load across the party, or to put an item in the hands of the\nmember who can use it. `character_id` is the giver, and `recipient_id` is the member\nwho takes the goods. A magic item that was equipped releases its effects and arrives\nunequipped in the recipient's pack. Both members must be alive and able to act.\n\nIt's legal in town, while exploring, and during an encounter. In town and while\nexploring, it takes no game time. During an encounter, it uses up the encounter round,\nand the monsters then act on their reaction to the party, as for a\n`Wait`. While monsters pursue the party, that round is a\nround of the pursuit. The party stands together outside a battle, so any member can\nreach any other.\n\nIn a battle, a member hands over one item as their declaration for the round: a\n`BattleDeclaration` with\n`action=\"give_item\"`. The session refuses this command in battle.\n\nModes:\n    `town`, `exploring`, `encounter`\n\nRejections:\n    - `session.command.wrong_mode` - a battle is underway, or the session has ended.\n    - `session.command.unknown_member` - `character_id` or `recipient_id` matches\n      no party member.\n    - `session.command.member_incapacitated` - the giver or the recipient can't\n      act.\n    - `exploration.give.same_member` - the giver and the recipient are the same member.\n    - `items.curse.stuck` - a cursed item whose curse has been revealed can't be\n      handed over.\n    - `exploration.item.not_carried` - the giver doesn't carry one of the items, or\n      enough of the coins.\n\nEvents:\n    `EffectReleasedEvent`s for the effects of\n    an equipped magic item, then an\n    `ItemsGivenEvent` with what changed hands.\n    In an encounter, the encounter round's events follow. During a pursuit, a\n    `PursuitEvent` round follows instead.",
  "properties": {
    "command_type": {
      "const": "give_items",
      "default": "give_items",
      "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 handing the goods over, by\n`MemberView.id`. The session refuses the recipient's id\nhere with `exploration.give.same_member`."
    },
    "recipient_id": {
      "title": "Recipient Id",
      "type": "string",
      "description": "The member taking the goods, by\n`MemberView.id`. Both members have to be alive and able\nto act."
    },
    "item_ids": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Item Ids",
      "type": "array",
      "description": "What changes hands, one unit per entry, so repeat an id to give more than one. Name items\nthe same way as in `DropItems.item_ids`: a\ncatalog id for a mundane item, and a per-instance id for a magic item, a gem, or a piece\nof jewellery. As there, the session refuses a per-instance id named twice with\n`exploration.item.not_carried`. A magic item that was equipped releases its effects and\narrives unequipped in the recipient's pack."
    },
    "coins": {
      "$ref": "#/$defs/Coins",
      "default": {
        "pp": 0,
        "gp": 0,
        "ep": 0,
        "sp": 0,
        "cp": 0
      },
      "description": "Coins to hand over, by denomination. The default hands over none. Coins move from the\ngiver's purse to the recipient's, which is how a party evens out the weight after it takes\na lot of treasure."
    }
  },
  "required": [
    "character_id",
    "recipient_id"
  ],
  "title": "GiveItems",
  "type": "object"
}