User Tools

Site Tools


en:tutorials:tools:tmx_to_orx

This is an old revision of the document!


Using the TMX to ORX Converter

1. Get a copy of Tiled Map Editor here http://www.mapeditor.org/

2. Get a copy of Tiled TMX to ORX Config Converter Tool http://orx-project.org/images/fbfiles/files/TiledToOrx-aa539a81521f36a566c840fd899f7e3c.zip

3. Get your tiles image and check what your tile dimension is. I'm using a few tiles from Mushroom Stew and these are each 32 x 32 pixels:

4. Run Tiled. The following program will load:

4. Make sure orthogonal is set, your map size, and the width & height of the tiles.

5. Select Map > New Tileset

6. Give the name as “Tiles” (without quotes). This will be used for naming the config graphics entries automatically later on.

7. Browse to your tile set image.

8. Ensure the tiles dimensions are correct (32×32 in this case). Leave the rest default and click OK.

9. You MUST name each tile in your tile set by right-clicking on a tile and selecting “Tile Properties”.

10. The name of the tile property MUST be “name” (without quotes) and the value can be whatever you want to call it. For example if you set:

name="name" value="CornerLedge"

the converter will create a:

[CornerLedge@SomeNameGraphic]

So name each and every tile.

11. Next step, every tile position on the map MUST be filled. The converter doesn't support null tile placements. So in all your blank areas, paint your empty tile. (If this annoys people, let me know and I can build in null tile support).

12. Save your .tmx file with File > Save As

13. Load the converter tool. It will look like this:

14. Start by browsing to your .tmx file. The ini save position will be automatically set as a default.

15. Click “Preview” to see what the converter will produce. This will not save anything or populate your clipboard. If you are not happy with the results or names of objects, go back to Tiled and make adjustments.

16. If you are happy with the output, you can choose the “Output to ORX Config” radio button and click “Convert”. This will save out to an INI file.

17. If you would rather copy the data to the clipboard, select the “Send to Clipboard” radio button and click “Convert”. You can then paste into your ORX project file(s).

Hopefully you should get something like the following:

[TilesGraphic]
Texture		= Tiles_grass_set.png
Pivot		= top left
TextureSize		= (32, 32, 0)
 
[LP@TilesGraphic]
TextureCorner		= (0, 0, 0)
 
[GR1@TilesGraphic]
TextureCorner		= (32, 0, 0)
 
[GR2@TilesGraphic]
TextureCorner		= (64, 0, 0)
 
[GR3@TilesGraphic]
TextureCorner		= (96, 0, 0)
 
[RP@TilesGraphic]
TextureCorner		= (128, 0, 0)
 
[B1@TilesGraphic]
TextureCorner		= (0, 32, 0)
 
[LIR@TilesGraphic]
TextureCorner		= (32, 32, 0)
 
[MIR@TilesGraphic]
TextureCorner		= (64, 32, 0)
 
[RIR@TilesGraphic]
TextureCorner		= (96, 32, 0)
 
[B2@TilesGraphic]
TextureCorner		= (128, 32, 0)
 
[GBL@TilesGraphic]
TextureCorner		= (0, 64, 0)
 
[BLIR@TilesGraphic]
TextureCorner		= (32, 64, 0)
 
[I@TilesGraphic]
TextureCorner		= (64, 64, 0)
 
[BRIR@TilesGraphic]
TextureCorner		= (96, 64, 0)
 
[GBR@TilesGraphic]
TextureCorner		= (128, 64, 0)
 
[TilesMap]
Map		= GR3 #RP #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #LP #GR1 #GR2 #RP #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #LIR #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #LP #GR1 #GR2 #GR3 #RP #B1 #B1 #B1 #LIR #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #LIR #MIR #RIR #B1 #B1 #B1 #B1 #LIR #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #LIR #I #RIR #B1 #B1 #B1 #B1 #LIR #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #RIR #B1 #B1 #B1 #LIR #I #RIR #B1 #B1 #B1 #B1 #LIR #RIR #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #BRIR #GBR #GR3 #GBL #BLIR #I #BRIR #GBR #GR1 #GR2 #GBL #BLIR #BRIR #GBR #GR1 #GR2 #GR3 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 #B1 

Any problems, let me know at: [email protected]

en/tutorials/tools/tmx_to_orx.1480915526.txt.gz · Last modified: 2017/05/30 00:50 (7 years ago) (external edit)