Skip to content

ItemsDroppedEvent

Items or coins were dropped, onto the party's cell or behind it as bait.

Full documentation: ItemsDroppedEvent. Wire type: items_dropped.

Default visibility: player

Message codes: exploration.item.dropped

JSON Schema

{
  "$defs": {
    "Visibility": {
      "description": "Who is allowed to see an event.\n\nEvery event has one of these two values, and the split exists because B/X keeps some rolls behind the\nreferee's screen. Filter a log on it before you show anything to a player, or call\n`GameSession.view`, which builds the player's and the referee's\nviews for you. A narrator playing referee reads both.\n\nThe values are the lowercase strings and they serialize into every event, so a renamed value is a\n`schema_version` bump.\n\nExamples:\n    ```python\n    from osrlib.core.events import DamageDealtEvent, HitPointsReportedEvent, Visibility\n\n    log = [\n        DamageDealtEvent(target_id=\"monster-0001\", amount=5),\n        HitPointsReportedEvent(target_id=\"monster-0001\", current_hp=2, max_hp=7),\n    ]\n    shown = [event.code for event in log if event.visibility is Visibility.PLAYER]\n    assert shown == [\"combat.damage.dealt\"]  # the goblin's remaining hit points stay hidden\n    ```",
      "enum": [
        "player",
        "referee"
      ],
      "title": "Visibility",
      "type": "string"
    }
  },
  "description": "Items or coins were dropped, onto the party's cell or behind it as bait.\n\nEmitted by `DropItems`, and by\n`Evade` when the party throws treasure or food to\na pursuer to buy time.\n\nWhat lands on a cell goes into that cell's drop pile, which\n`TakeTreasure` can pick back up. What is\nscattered during a flight is gone.",
  "properties": {
    "code": {
      "default": "exploration.item.dropped",
      "title": "Code",
      "type": "string",
      "description": "The message code, always `exploration.item.dropped`."
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player",
      "description": "Player visibility: the party knows what it let go of."
    },
    "event_type": {
      "const": "items_dropped",
      "default": "items_dropped",
      "title": "Event Type",
      "type": "string",
      "description": "The wire discriminator, `items_dropped`."
    },
    "character_id": {
      "title": "Character Id",
      "type": "string",
      "description": "The member who dropped them."
    },
    "item_ids": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Item Ids",
      "type": "array",
      "description": "What was dropped, in the same id form the acquisition used: catalog ids for mundane gear,\ninstance ids for valuables and magic items."
    },
    "coins_gp_value": {
      "default": 0,
      "title": "Coins Gp Value",
      "type": "integer",
      "description": "The coins dropped, as their value in gold pieces."
    }
  },
  "required": [
    "character_id"
  ],
  "title": "ItemsDroppedEvent",
  "type": "object"
}