User Tools

Site Tools


en:tutorials:tools:tmx_to_orx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:tutorials:tools:tmx_to_orx [2015/10/30 13:32 (6 years ago)]
74.203.194.21 ↷ Links adapted because of a move operation
en:tutorials:tools:tmx_to_orx [2021/07/12 18:58 (5 months ago)] (current)
sausage online version
Line 1: Line 1:
-====== Using the TMX to ORX Converter ======+====== Using the TiledToOrx ​Converter ====== 
 + 
 +<WRAP center round box 90%> 
 +Source code for the converter can be found here: https://​gitlab.com/​sausagejohnson/​tiledtoorx 
 +</​WRAP>​ 
  
 1. Get a copy of Tiled Map Editor here [[http://​www.mapeditor.org/​]] 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.zip]]+2. Get the latest version ​of the TiledToOrx ​Config Converter Tool[[https://gitlab.com/sausagejohnson/tiledtoorx/raw/master/​TiledToOrx.zip|TiledToOrx Download]] or use the [[https://​tiledtoorx.alienabductionunit.com|Online Version]].
  
 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: 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:
Line 13: Line 18:
 {{ tutorials:​community:​sausage:​tiled-new-map.png |}} {{ tutorials:​community:​sausage:​tiled-new-map.png |}}
  
-4. Make sure orthogonal is set, your map size, and the width & height of the tiles.+5. Make sure orthogonal is set, your map size, and the width & height of the tiles.
  
-5. Select Map > New Tileset+6. 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. 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 (32x32 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"​. +
- +
-{{ tutorials:​community:​sausage:​naming-tiles.png |}} +
- +
-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: +
- +
-<code ini> +
-name="​name"​ value="​CornerLedge"​ +
-</​code>​ +
- +
-the converter will create a: +
- +
-<code ini> +
-[[email protected]+
-</​code>​+
  
-So name each and every tile.+8. Browse to your tile set image.
  
-11Next 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).+9Ensure ​the tiles dimensions are correct (32x32 ​in this case)Leave the rest default ​and click OK.
  
 {{ tutorials:​community:​sausage:​map-populated.png |}} {{ tutorials:​community:​sausage:​map-populated.png |}}
  
  
-12. Save your .tmx file with File > Save As+10. Save your .tmx file with File > Save As
  
-13. Load the converter tool. It will look like this:+11. Load the converter tool. It will look something ​like this:
  
 {{ tutorials:​community:​sausage:​tmx-to-orx-interface.png |}} {{ tutorials:​community:​sausage:​tmx-to-orx-interface.png |}}
  
-14. Start by browsing to your .tmx file. The ini save position will be automatically set as a default.+12. Start by browsing to your .tmx file.
  
-15Click "​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.+13The lower pane will always show the current converted output
  
-16If you are happy with the outputyou can choose ​the "​Output to ORX Config"​ radio button and click "​Convert"​. This will save out to an INI file.+14From this point on, the converter ​will watch the original TMX file for changes. Any further work in Tiled will be automatically updated in the converter output pane.
  
-17If 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).+15Click "Copy to Clipboard"​ to copy the entire contents ​to the clipboard. To copy part of the output, select the range with the mouse, then click the button. You can then paste the content ​into your Orx config ​file(s).
  
 Hopefully you should get something like the following: Hopefully you should get something like the following:
Line 68: Line 53:
 TextureSize = (32, 32, 0) TextureSize = (32, 32, 0)
  
-[LP@TilesGraphic] +[Tiles1@TilesGraphic] 
-TextureCorner = (0, 0, 0)+TextureOrigin = (0, 0, 0)
  
-[GR1@TilesGraphic] +[Tiles2@TilesGraphic] 
-TextureCorner = (32, 0, 0)+TextureOrigin = (32, 0, 0)
  
-[GR2@TilesGraphic] +[Tiles3@TilesGraphic] 
-TextureCorner = (64, 0, 0)+TextureOrigin = (64, 0, 0)
  
-[GR3@TilesGraphic] +[Tiles4@TilesGraphic] 
-TextureCorner = (96, 0, 0)+TextureOrigin = (96, 0, 0)
  
-[RP@TilesGraphic] +[Tiles5@TilesGraphic] 
-TextureCorner = (128, 0, 0)+TextureOrigin = (128, 0, 0)
  
-[B1@TilesGraphic] +[Tiles6@TilesGraphic] 
-TextureCorner = (0, 32, 0)+TextureOrigin = (0, 32, 0)
  
-[LIR@TilesGraphic] +[Tiles7@TilesGraphic] 
-TextureCorner = (32, 32, 0)+TextureOrigin = (32, 32, 0)
  
-[MIR@TilesGraphic] +[Tiles8@TilesGraphic] 
-TextureCorner = (64, 32, 0)+TextureOrigin = (64, 32, 0)
  
-[RIR@TilesGraphic] +[Tiles9@TilesGraphic] 
-TextureCorner = (96, 32, 0)+TextureOrigin = (96, 32, 0)
  
-[B2@TilesGraphic] +[Tiles10@TilesGraphic] 
-TextureCorner = (128, 32, 0)+TextureOrigin = (128, 32, 0)
  
-[GBL@TilesGraphic] +[Tiles11@TilesGraphic] 
-TextureCorner = (0, 64, 0)+TextureOrigin = (0, 64, 0)
  
-[BLIR@TilesGraphic] +[Tiles12@TilesGraphic] 
-TextureCorner = (32, 64, 0)+TextureOrigin = (32, 64, 0)
  
-[I@TilesGraphic] +[Tiles13@TilesGraphic] 
-TextureCorner = (64, 64, 0)+TextureOrigin = (64, 64, 0)
  
-[BRIR@TilesGraphic] +[Tiles14@TilesGraphic] 
-TextureCorner = (96, 64, 0)+TextureOrigin = (96, 64, 0)
  
-[GBR@TilesGraphic] +[Tiles15@TilesGraphic] 
-TextureCorner = (128, 64, 0)+TextureOrigin = (128, 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1 #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 +Map = ​Tiles1 ​#Tiles1 ​#Tiles12 (etc etc)
 </​code>​ </​code>​
  
-Any problems, let me know at: [email protected] 
  
en/tutorials/tools/tmx_to_orx.1446237136.txt.gz · Last modified: 2017/05/30 00:50 (5 years ago) (external edit)