Repository navigation
Conversation
|
Thank you, this is a feature people have asked about, and the live testing you did (undo, checkpoints, save and reopen, VTT export, revised bytes) is exactly what this needs. It's really two features, and I'd like to take them separately:
Same note as on #16: I'll port |
|
I'm leaving this PR open for the pack-builder half ( |
Carry forward the pack-builder half of upstream #17 on top of 1.4.2. Publish with O_CREAT|O_EXCL into Dungeondraft's configured asset folder only, add one companion tool (no Assets.UpdateTree refresh), and cover no-clobber and path limits in offline tests. Co-authored-by: arhidavid <arhidavid@users.noreply.github.com>
Problem and behavior
Dungeondraft can turn a loose PNG dropped onto a map into a normal embedded object, but the MCP does not expose that workflow.
import_imagenow uses the nativeObjectTool.EmbedObjectmechanism, with explicit centre and dimensions in woxels, rotation, sorting, layer, snapping and optional light blocking. Transparency is preserved, and saved maps contain the image bytes. These are exportable objects, not traces; an asset pack is not required.For optional reuse,
create_image_packwrites native packs with searchable names and tags, andrefresh_asset_packsrescans newly written archives through the native Assets window. Existingprepare_map_with_packsincludes the chosen pack in a map copy. No separate mod is introduced: this extends the existing bridge.Implementation
pack.json, plus native tags and sets. Tags are normalized before checking the reserved Colorable tag.Validation
On Windows with Python 3.12, battlemap-mcp 1.4.1, Dungeondraft 1.2.0.1 and Godot 3.4.2:
server/tools/gate.pypassed: formatting, lint, bridge/contract/lifecycle/engine checks, types and tests.tools/release.py check, release-tool lint/format checks andgit diff --checkpassed.Limits and operational notes
Documentation
Adds
docs/image-import.md. The public tool reference and asset-pack workflow pages at https://knownframe.com/battlemap-mcp/docs/ need matching updates for these three tools and the optional pack workflow.