Studio Yotsuba
Back to Node List

Tiled Map JSON Fragment

tiled_map_export

Builds a legacy standalone Tiled map JSON fragment. Use Tile Bundle Export for a complete map, tileset, and atlas bundle.

Reviewed
Guide available

Input Ports

NameTypeDescription
Rule Resolved
resolved
RuleResolved
Required
Finished tile placement to export.

Output Ports

NameTypeDescription
JSON
json
Text
Tiled map JSON text.
Warnings
warnings
Text
Warnings from export.

Parameters

NameTypeDefaultRangeDescription / Options
Path
path
FilePath
——

Optional .json/.tmj save path.

Tileset Source
tileset_source
Text
tiles.tsj—

Tileset source path written into the Tiled map JSON.

Save Mode
save_mode
Enum
Disabled—

Controls when this node writes the JSON file.

  • DisabledDisabled
  • CreateIfMissingCreateIfMissing
  • OverwriteOverwrite

Overview

Exports resolved tile placement (RuleResolved) as Tiled map JSON (.tmj). It is the endpoint for taking a map built in PixPipeline into Tiled or a game engine that can read its format. This is the legacy JSON-fragment route and does not write the image or tileset as one package. Prefer the TiledV1 profile of tile_bundle_export for a validated, complete bundle.

Usage tips

  • Export three matching pieces: tiled_map_export (.tmj) + tiled_tileset_export (.tsj) + the tile-image PNG. The map JSON references the tile-set JSON by filename, so tileset_source must match the actual filename.
  • Connect the resolved output of rule_canvas / rule_render.
  • Rotated tiles are not converted and are reported in warnings, a current limitation.

Related nodes

  • tiled_tileset_export — the tile-set counterpart and almost always required
  • rule_canvas / rule_render — supply resolved data
  • batch_export — exports the tile-image PNG

What this node does

Converts completed placement from RuleRender or TileMapCanvas into map JSON that Tiled can read.

Completed placement means that the actual tile image for every map cell has been chosen. Instead of terrain names and unresolved rules, it produces data close to the tile-index sequence that Tiled expects.

When a destination is specified, the node can also save the result as .tmj or .json.

Key settings

ID Name Description
path Save destination Destination when saving JSON to a file. An empty value outputs only the string.
tileset_source Tile-set reference Filename of the tile-set JSON referenced by the map in Tiled.
save_mode Save mode Whether to save the JSON file and overwrite an existing file.

When to use it

  • To take a tile map built in PixPipeline into Tiled
  • To create a .tmj or .json map file
  • To convert a map into a form that can be edited or inspected in Tiled

Notes

Horizontal and vertical flips are converted to Tiled values. As of P14, rotation data is not converted completely, so any rotations are reported in warnings.

Reference: Tiled JSON Map Format

Back to Node List