/Tiled-map-processor

script to extract data from tiled_map_result.json in comfortable for further processing format.

Primary LanguagePython

Tiled-map-processor

script to extract data from tiled_map_result.json in comfortable for further processing format.
(script for processing data from https://www.mapeditor.org/ files)

Usage example

The minimal

Tiledmp has one reserved keyword tiles, since it will be the name for json key, containing data about tiles
in resulting file.

tiledmp input.json output.json tiles=layer1,layer2
Here there is only one option - tiles and it will contain data about tiles, extracted from layer1 and layer2.
You should know there is no limit for number of layers. You can pass as many as you wish, but you should pass at least one.
And tiles as key will have value, represented in form of list, containing tuples.
For example:(0,64,32), where 0 is tile code, and next values are x and y coordinates.

Extracting object layers

tiledmp input.json output.json tiles=world bodies=land(x,y,width,height)

In this example tiles will store data related to tiles that are stored in world layer.
Also output.json will contain list connected to bodies key with list that stores data extracted from land layer.