import_dd2vtt
Rebuilds a Universal VTT (.dd2vtt) export on an open battle map, recreating walls, doors, windows, lights, ambient light, and an optional trace; preview first, then confirm to apply edits.
Instructions
Rebuild a Universal VTT export (.dd2vtt) on the open map.
Without confirm it only reads the file and reports what it would do.
Show the user, then call again with confirm=true. It recreates:
- walls from line_of_sight, rejoined through each doorway so doors mount;
- portals at their exported width: closed ones (a VTT's doors) as
portal_asset, open ones (its windows) as window_asset. The export has
no door/window field, so a map that had them reversed comes in
reversed; compare with the trace;
- lights (colour, range, intensity, shadows) and the ambient light;
- the export's image as a trace under the map (trace=false to skip).
It never picks art: `blockers` lists each sight-blocking object outline
(objects_line_of_sight) as center, rotation, length and width in
woxels. Place a matching blocking object on each with place_objects.
The map must be the export's size (`tiles`); resize=true resizes it
first. A region export is cropped to its region. Build on a new map:
portals mount on the nearest wall, existing walls included.
wall_color: hex tint for the walls, matched to the trace. Empty takes
Dungeondraft's default wall tint, a dark grey, so light walls such as
sandstone come out dark. Set it here: changing it later means redrawing
the walls and re-adding their doors.
One checkpoint, "import_dd2vtt", precedes the edits:
rollback_checkpoint("import_dd2vtt") undoes them, except a resize, the
ambient light and the trace. Hide the trace with
set_trace_image(clear=true) before the final save_map.
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": {
"path": "<path>"
},
"name": "import_dd2vtt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| trace | No | ||
| walls | No | ||
| lights | No | ||
| resize | No | ||
| ambient | No | ||
| confirm | No | ||
| portals | No | ||
| wall_asset | No | ||
| wall_color | No | ||
| portal_asset | No | res://textures/portals/door_01.png | |
| window_asset | No | res://textures/portals/window_02.png |