SellTreasure
Sell gems and jewellery in town at their full value (zero time).
Full documentation: SellTreasure. Wire type: sell_treasure.
Legal session modes: town
JSON Schema
{
"description": "Sell gems and jewellery in town at their full value (zero time).\n\nThe party must be in town. Each entry is a valuable's instance id, and the\ngold goes into the purse of the member who carries it. A valuable sells for its full\n`value_gp`, so its sale price equals its XP value (1 gp for 1 XP). The OSE SRD prices\ntreasure but gives no rate at which a town buys it, so osrlib uses full value. The SRD\ngives magic items no fixed sale value, so the session refuses to sell them.\n\nModes:\n `town`\n\nRejections:\n - `session.command.wrong_mode` - the party is not in town.\n - `town.sell.no_fixed_value` - an entry is a magic item, which has no fixed\n price.\n - `exploration.item.not_carried` - no member carries a valuable with that\n instance id.\n\nEvents:\n One `TreasureSoldEvent` for each member\n whose valuables sold, with the value in gold pieces added to their purse.",
"properties": {
"command_type": {
"const": "sell_treasure",
"default": "sell_treasure",
"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."
},
"item_ids": {
"items": {
"type": "string"
},
"minItems": 1,
"title": "Item Ids",
"type": "array",
"description": "The gems and jewellery to sell, by the per-instance ids they have in\n`MemberView.inventory`. The value of each one goes\nto the member who carries it, so one command can pay several purses. Magic items have no\nfixed price, and the session refuses them with `town.sell.no_fixed_value`."
}
},
"required": [
"item_ids"
],
"title": "SellTreasure",
"type": "object"
}