Create or replace a vignette
dos2_put_vignetteCreate or replace an illustrated story card for a GM campaign, optionally adding a player vote, and save it with a backup for easy undo.
Instructions
Creates a vignette (an illustrated story card the Game Master shows to players, optionally with a vote), or replaces an existing one. The vignette to replace is found by key if given, otherwise by an equal title; otherwise a new one is created.
Writes Vignettes.lsf and, with image, copies the picture into the campaign's Vignettes/Illustrations. 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. Fails with an error if the image file does not exist. Returns created, the vignette's uuid, the image
name and size, and the backup id. Read existing vignettes with dos2_vignettes.
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>",
"title": "<title>",
"text": "<text>"
},
"name": "dos2_put_vignette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Stable identifier of your choice. The vignette's UUID is derived from it, so the same key always addresses the same vignette even after its title changes. | |
| text | Yes | The story text shown on the card. | |
| frame | No | File name of the border decoration. Keep the default unless you know another stock frame. | GM_Border_Deco_01_A.png |
| image | No | Absolute path to your own PNG (square, transparent background works best). It is copied into the campaign. Omit to use stock_image. | |
| title | Yes | Vignette title. Without key, an existing vignette with the same title is replaced. | |
| canvas | No | File name of the paper background. Keep the default unless you know another stock canvas. | GM_paperVersion_01.png |
| folder | No | Folder the vignette is filed under in the GM's resources list. Default none. | |
| answers | No | Answer options offered to the players for a vote. Omit for a vignette without a vote. | |
| 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. | |
| question | No | The question shown above the answers. Default empty. | |
| stock_image | No | File name of one of the game's stock vignette pictures, used when image is omitted. | GM_Vignette_Beach_Generic_A.png |
| 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. |