EquipItem
Equip an item from a member's pack: wear armour or a ring, or wield a weapon (takes no game time).
Full documentation: EquipItem. Wire type: equip_item.
Legal session modes: exploring, town
JSON Schema
{
"description": "Equip an item from a member's pack: wear armour or a ring, or wield a weapon (takes no game time).\n\nIt's legal in town and while exploring. A weapon has to be equipped before a member can\nattack with it in battle. The session checks the member's class rules for armour and\nweapons before anything changes. Name a magic item by its instance id, and a mundane\nitem by its catalog id, because mundane items have no per-instance id. A mundane id is\neither a built-in one from `load_equipment` (see the\n[equipment id index](https://mmacy.github.io/osrlib-python/reference/content-ids/equipment/))\nor one the adventure bundles, which isn't in that index.\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 - `session.command.unknown_member` - `character_id` matches no party member.\n - `session.command.member_incapacitated` - the member can't act.\n - `exploration.item.not_carried` - nothing by that id is in the member's pack.\n - `items.equip.armour_forbidden`, `items.equip.armour_not_allowed`,\n `items.equip.shield_forbidden`, `items.equip.weapon_not_allowed`,\n `items.equip.weapon_forbidden` - the member's class may not use it.\n - `items.equip.two_handed_with_shield` - the member would hold a two-handed\n weapon and a shield together.\n - `items.equip.not_equippable` - potions, scrolls, ammunition, and gear with no\n combat use can't be equipped.\n - `items.equip.not_usable` - the member's class can't use the magic item.\n - `items.ring.hands_full` - the member already wears two rings.\n\nEvents:\n Usually none. Equipping a magic item that works while it's worn can attach its\n effects (`EffectAttachedEvent`). Putting\n on a cursed ring identifies it and reveals its curse\n (`ItemIdentifiedEvent`,\n `CurseRevealedEvent`).",
"properties": {
"command_type": {
"const": "equip_item",
"default": "equip_item",
"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 doing the equipping, by\n`MemberView.id`. What they may wear and\nwield depends on their class."
},
"item_id": {
"title": "Item Id",
"type": "string",
"description": "What to equip, which has to be in this member's pack already. Name a magic item by its\nper-instance id, because each one is a distinct object. Name a mundane item by its catalog\nid, because mundane items stack and have no per-instance id. Both ids are in\n`MemberView.inventory`."
}
},
"required": [
"character_id",
"item_id"
],
"title": "EquipItem",
"type": "object"
}