Skip to content

GrantItem

Referee: place an item directly into a member's inventory.

Full documentation: GrantItem. Wire type: grant_item.

Legal session modes: battle, encounter, exploring, game_over, town, victory

JSON Schema

{
  "description": "Referee: place an item directly into a member's inventory.\n\nReferee commands are legal in every mode, terminal modes included, and are\nlogged and replayed like any other.\n\nModes:\n    `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n    - `session.command.unknown_member` \u2014 `character_id` names no party member.\n    - `session.command.unknown_item` \u2014 `item_id` names no item in the session's\n      [`effective_equipment`][osrlib.crawl.session.GameSession.effective_equipment]\n      catalog: neither a shipped id nor one the adventure bundles.\n\nEvents:\n    [`ItemAcquiredEvent`][osrlib.crawl.events.ItemAcquiredEvent] with the\n    granted items.",
  "properties": {
    "command_type": {
      "const": "grant_item",
      "default": "grant_item",
      "title": "Command Type",
      "type": "string"
    },
    "source": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source"
    },
    "character_id": {
      "title": "Character Id",
      "type": "string"
    },
    "item_id": {
      "title": "Item Id",
      "type": "string"
    },
    "quantity": {
      "default": 1,
      "minimum": 1,
      "title": "Quantity",
      "type": "integer"
    }
  },
  "required": [
    "character_id",
    "item_id"
  ],
  "title": "GrantItem",
  "type": "object"
}