Create a scene from an image
create_sceneBuild a complete Foundry VTT scene from a map image: uploads the file, sizes the scene, sets the grid, adds walls, lights and tokens, then files it in a folder with a thumbnail.
Instructions
Makes a scene from a map image: uploads it if it's a local file (or uses a Foundry data path), sizes the scene to the image, sets the grid, adds walls, lights and tokens, files it in a folder and makes the thumbnail. Grid distance and units default to the game system's; token vision and fog exploration are on.
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": {
"name": "<name>",
"image": "<image>"
},
"name": "create_scene"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Any other scene fields, merged last (e.g. darkness, backgroundColor) | |
| name | Yes | ||
| image | Yes | Local image path on this server, or a path inside Foundry data | |
| walls | No | Wall data: {c:[x1,y1,x2,y2], door?:1, move?, sight?, light?, sound?} | |
| dryRun | No | Report what would happen without changing anything | |
| folder | No | Folder path, e.g. "Session2/Maps". Missing folders are created. | |
| lights | No | ||
| tokens | No | ||
| gridSize | No | Pixels per square in the image | |
| gridUnits | No | e.g. "m" or "ft"; defaults to the game system's | |
| uploadDir | No | Where a local image is uploaded | assets/scenes/maps |
| onDuplicate | No | When a document with the same name is already in the target folder: skip it (default), replace it, or create another | skip |
| gridDistance | No | Distance per square; defaults to the game system's |