Preview a native TMX write
tiled_preview_write_tmxPreview and write Tiled maps as TMX files, matching Tiled 1.12.2 byte-for-byte for restricted finite orthogonal maps with external tilesets and CSV tile layers.
Instructions
Serializes one restricted-profile project .tmj map to TMX bytes matching Tiled 1.12.2's own writer byte for byte — finite orthogonal maps, external tileset references, CSV tile layers, and top-level tile/object layers the serializer fully understands; embedded tilesets, image and group layers, custom properties, template instances, unknown members, and floats whose six-significant-digit rendering would lose precision all fail closed. Tileset references and GIDs carry verbatim, so the .tmx target must live in the source map's directory and must be a new file. Returns an expiring fileExport change set whose producer is the native serializer; apply re-serializes under the pinned source revision and fails closed unless the bytes exactly match the approved content hash. No Tiled CLI is involved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| targetPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| projectFilePath | No | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| expectedMapRevision | Yes | SHA-256 revision returned by a read or preview |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |