Create or replace an item template
dos2_put_item_templateCreates or replaces a campaign item template for quest items, notes, books, weapons, and armor, saving it to the GM's Creatures and Items panel with a backup for undo.
Instructions
Creates a saved item template in the campaign (the Game Master's "Creatures and Items" panel), or replaces the one with the same name. Use it for quest items, readable notes and books, and custom weapons or armor the GM hands out.
Writes Eggs.lsf. The previous file is backed up first; undo with dos2_restore. Fails with an error while the game process is running unless allow_running=true.
Returns created (true for a new template), a summary of the template and the backup id. For NPC templates use
dos2_put_npc_template; to give an NPC template items, pass them in its items parameter instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaign": "<campaign>",
"name": "<name>"
},
"name": "dos2_put_item_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | What to start from. A built-in sample: "quest" (plain item, default), "weapon", "weapon_generated" (has generated properties, required for boosts) or "armor"; or "Campaign:Name" of an existing item template. | quest |
| book | No | Text shown when the item is read as a book or note. | |
| name | Yes | Item template name. An existing item template with this name is replaced. | |
| level | No | Item level. Omit to keep the base's. | |
| amount | No | Stack size. | |
| boosts | No | Generated-property boosts, e.g. ["Boost_Weapon_Damage_Bonus_Large"]. Only valid with a base that has item generation, such as weapon_generated; otherwise the call fails. | |
| rarity | No | One of Common, Uncommon, Rare, Epic, Legendary, Divine, Unique. | |
| campaign | Yes | The campaign to work on: its name, its folder name, its UUID, or a unique part of any of them. dos2_status lists the campaigns. | |
| stats_id | No | Stats entry, e.g. WPN_Axe_2H or LOOT_Ore_A_BlackRock_A. Omit to keep the base's. | |
| description | No | Custom description shown in the item tooltip. | |
| template_id | No | Root template GUID of the item (its model). Omit to keep the base's. | |
| allow_running | No | Keep false. Set true only after the user has confirmed that the running game sits in the main menu: a write into a campaign that is loaded in the game gets lost or damages it. |