How do I import a .tmx from Tiled?

Get help using Construct 3!

Post » Tue Sep 05, 2017 3:21 am

When I hit the button in the timemap bar to "Load tilemap from .tmx file" (I've created one in Tiled), then in the dialog box's first field I select my .tmx file, I get the error:

Missing image on tileset
Construct 3 requires an image to be defined in the tileset

Anyone know what this is having a problem with?

Perhaps part of the issue is that I'm getting confused by the terminology. In Tiled, I created a map (a set of tiles arranged to make a playable game space) and that's what's saved as the .tmx. In order to make that, I made a tileset (saved as a .tsx) that has all the tiles I'm building with in it. In Construct, I create a tilemap object. Is the "tilemap" the equivalent of the map in Tiled, or the tileset? Best I can tell, the tilemap is the map, and the tilemap source image is the tileset? Does that sound right? Figured if I'm mixed up here, it might help me understand what's not working.
B
10
S
2
Posts: 13
Reputation: 824

Post » Fri Nov 10, 2017 6:42 am

Did you solve this problem? I also had the same issue (using .tmx from Tiled.)

Previously had no issues with Construct 2.
B
51
S
23
G
19
Posts: 169
Reputation: 13,750

Post » Fri Nov 10, 2017 7:58 am

Solved for my case.

It looks like C3 now looks for the <image> tag in the .tmx file, even if it may not be used right now? To add this, I clicked on 'Embed Tileset' in Tiled (small icon below the tileset window/tab in Tiled) and exported to *.tmx again. It now works to import *.tmx to C3 with this change. I imagine the <image> tag is not being used, because the C3 UI requires that you also load the tileset *.png image along with the *.tmx file when loading into a Tilemap.

Here's the .tmx file with 'Embed Tileset' active in Tiled, note the <image source = ...> tag is now included. My previous *.tmx version without 'Embed Tileset' active did not include the <image> tag.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map SYSTEM "http://mapeditor.org/dtd/1.0/map.dtd">
<map version="1.0" tiledversion="1.0.3" orientation="orthogonal" renderorder="right-down" width="24" height="40" tilewidth="32" tileheight="32" nextobjectid="1">
<tileset firstgid="1" name="GrassTilemap" tilewidth="32" tileheight="32" tilecount="48" columns="4">
<image source="../Tilemaps/EpicGrassTileMap/GrassTilemap.png" width="128" height="384"/>
</tileset>
<layer name="Tile Layer 1" width="24" height="40">
<data encoding="base64" compression="zlib">
eJztzjEKwCAMQFFdPISbS8FawfufrhEUOihViNv/8BCERI0hIiIiIo2iuBX3BHG1s8rCbs5XSTyf+75nJvwYzZeFvZ2fWJnd4ZrRveYb2v8GcM4L9kEGOg==
</data>
</layer>
</map>
B
51
S
23
G
19
Posts: 169
Reputation: 13,750

Post » Sat Nov 11, 2017 2:32 am

Thanks for your help, Mikal! That worked!
B
10
S
2
Posts: 13
Reputation: 824


Return to How do I...?

Who is online

Users browsing this forum: netdzynr and 0 guests