place_object
Places an object (prop) on the current battle map (Dungeondraft), returning its new element ID; supports positioning, rotation, layer sorting, colour, and optional light in one undo step.
Instructions
Place an object (prop) on the current map. Returns the new element id.
If you place a colourable asset WITHOUT a colour, the response comes back
with `colorable: true` and `mask_fraction`, and its note says whether the
object is a flat red shape or just has red accents.
Colour is baked at placement, so the fix is to delete it and place it
again with `color`. Choose one that suits the object (a blue banner, a
green tablecloth); if nothing fits better, Dungeondraft's own default is
#6b3834.
asset: an Objects asset path from list_assets(category='Objects').
x, y: woxel coordinates; defaults to map center. rotation: degrees.
sorting: 0=over, 1=under. snap: 'none', 'grid' or 'auto'; see get_snap_settings.
Two different tints, do not confuse them:
color: '#rrggbb', Dungeondraft's own colourable-asset colour — the same
thing the app's colour picker sets. Only assets carrying the colourable
attribute respond to it (including colorable carpets and crystals). On any
other asset it is stored and never renders.
modulate: retained for compatibility, but nonempty values are refused because
Dungeondraft does not preserve this tint when saving and reopening.
layer: which layer the object is drawn on — a VALUE, a multiple of 100 from
-500 to 900 (also 1100, Above Lights, when get_status.unofficial_patch is
loaded), not a menu index. 100 is the default and where most objects
belong. Raise it to put something ON a surface: a floor pattern sits on
100, so a mug placed on 100 can be buried by it, while 200 puts the mug
above. `sorting` only reorders siblings within one layer and cannot do
this. The response reports the layer the object actually landed on.
light: {color, energy, range, shadows, asset} as in add_light, made at the
object's position in the same undo step: a lantern and its glow. The
reply carries `light_id`.
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": {
"asset": "<asset>"
},
"name": "place_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| snap | No | ||
| asset | Yes | ||
| color | No | ||
| layer | No | ||
| light | No | ||
| scale | No | ||
| sorting | No | ||
| modulate | No | ||
| rotation | No | ||
| block_light | No |