[SOLVED] .tmx doesn't get converted to .xnb

Hello again,

When I use the Tiled Map inporter and processor it should convert, as far as my understanding goes, the .tmx map file to a .xnb file.

But I only get a tmx file and not in a .xnb

do I have to change something to get it in the right format or am I just stupid again?

Here is a screenshot of the error I get when starting:


I checked the folder and there is only the map.tmx file

Regarding to your post here:

You have set the build option of your “map.tmx” file to “copy”, but this will just copy the file (untouched) to the output directory.
You need to set the build option to “Build” to actually create a .xnb file.

Regarding to the other post you received a “NullReferenceException” in the “TiledMapTilesetImporter”, when trying to build the map.tmx file, so it seems that some important object inside the TiledMapTilesetImporter need to be instantiated first.

I don’t know what your map.tmx file contains, but maybe there is something missing whereby this important object can’t be created.

But i’m just speculating, as I don’t know the TiledMapTilesetImporter class.

Ok so that what the other guy in the other post told me wouldn’t work.

I changed it back and made a new map where everything(that I found) should be like the platformer demo map.

When I try to use mine it doesn’t work but when I add the one that came with the demo it works somehow.

Here are the two maps:
https://mega.nz/#!wd8FEQZZ!fgn4Psk-c4-k_GUfgI6gZ4bNYs0zN-abfRilJNegs10
Hope you can use them

Okay, just want to mention again that I have no experience with MonoGame.Extended, but I compared your tmx files with Notepad++ and saw that the map version and tiledversion differ.

Demo test-map.tmx:

<map version="1.0" tiledversion="1.1.5">

Your map.tmx:

<map version="1.2" tiledversion="1.2.0">

You could try to edit those values and see if it builds.

Other than that I think that someone with knowledge of this library should take a look and tell you what went wrong.

I tried it but sadly changed nothing. Also tried creating a map using v1.1.5.

But I found out that it has something to do with the tileset. When I import the tileset from the test into my game it works but when I try mine it stops working. So I checked the demo tiles and they all where in One so I threw mine in one file as well and somehow it works :+1:

1 Like

Nice to hear. So when building you are getting a xnb file now?

Yep it builds the xnb now and don’t throw an error that it can’t find the file.

1 Like