IdentifyItem
Referee: identify a magic item without the party having to use it.
Full documentation: IdentifyItem. Wire type: identify_item.
Legal session modes: battle, encounter, exploring, game_over, town, victory
JSON Schema
{
"description": "Referee: identify a magic item without the party having to use it.\n\nUse it when you identify an item some other way, like a sage's fee or a\n*detect magic* that osrlib doesn't resolve. Using an item with\n`UseItem` identifies it as well. This command is\nlegal in every mode, `game_over` and `victory` included, and the session logs and replays it\nlike any other command.\n\nIdentifying an item tells the party what it is. After it, player-visible events can show the\nitem's name, not only its instance id. A cursed item also has its curse revealed, and the\nbearer can't take it off until *remove curse*. An item that's already identified, with any\ncurse already revealed, emits no event, and the command still succeeds.\n\nModes:\n `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n - `session.command.unknown_member` - `character_id` matches no party member.\n - `session.command.unknown_item` - the member carries no magic item with\n that instance id.\n\nEvents:\n `ItemIdentifiedEvent` the first time. For a\n cursed item, a `CurseRevealedEvent` follows.\n None for an item that's already identified and revealed.",
"properties": {
"command_type": {
"const": "identify_item",
"default": "identify_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 carrying the item, by\n`MemberView.id`. A dead member's items can be\nidentified too."
},
"item_id": {
"title": "Item Id",
"type": "string",
"description": "The magic item to identify, by its per-instance id. The id is in\n`MemberView.inventory`, which shows the player\na masked name until the item is identified. The referee view has the true name. A mundane\nitem has nothing to identify, and the session refuses it with `session.command.unknown_item`."
}
},
"required": [
"character_id",
"item_id"
],
"title": "IdentifyItem",
"type": "object"
}