mapeditor/tiled-to-godot-export

Name error and wrong path

Zetogit opened this issue · 5 comments

Hey, here are the 2 issues I reported in the comments of the video:
*When exporting the tilemap as .tscn file, Tiled adds a dot "." in front of the file name (ex: MyMap..tscn), which gives errors when importing the scene in Godot. I just had to remove it to make it work.
Is it normal that the name has an extra dot? I'm not sure if it's okay to remove it.

*The other problem is the path in the files. I paid attention to the forward slash when I typed in the projectRoot but the path in the exported files isn't correct.
All my files are located in a "Level" directory (at the root of the Godot project), but the path in the .tres file is "res://Urban tileset.png" instead of "res://Level/Urban tileset.png".
Same error in the .tscn, the path is "res://Urban tileset.tres".
The consequence is that Godot thinks the files are in the root whereas they are in the directory "Level". Then Godot doesn't find them.

I'm using windows 10 by the way. I managed to export my maps anyway but I'm not sure if I did something wrong, I just hope that my message will be useful for your eventual updates or even other people experiencing the same issue as me.
Kind regards.

bjorn commented
  • When exporting the tilemap as .tscn file, Tiled adds a dot "." in front of the file name (ex: MyMap..tscn), which gives errors when importing the scene in Godot. I just had to remove it to make it work.
    Is it normal that the name has an extra dot? I'm not sure if it's okay to remove it.

That sounds like an issue with Tiled rather than this plugin. Do you see the same problem with other exports? I'll see if I can reproduce it and potentially find a workaround.

The path problem does sound like something that needs to be resolved in this plugin.

  • When exporting the tilemap as .tscn file, Tiled adds a dot "." in front of the file name (ex: MyMap..tscn), which gives errors when importing the scene in Godot. I just had to remove it to make it work.
    Is it normal that the name has an extra dot? I'm not sure if it's okay to remove it.

That sounds like an issue with Tiled rather than this plugin. Do you see the same problem with other exports? I'll see if I can reproduce it and potentially find a workaround.

The path problem does sound like something that needs to be resolved in this plugin.

Yes I have the same problem when exporting as .tmx or .tsx, it's actually the "export as" feature that adds the extra dot. The "export as image" doesn't do that. Other than that, Tiled and the plugin are both very good tools! ;)

Just to add confirmation here in my side, running snapshot of Tiled(1.4.2/2021.02.15) and using the plugin,
that when selecting save as type when exporting gives "untitled..tmx",
it seems like the default filename given is "file_name.", selecting a type adds ".file_type" which returns "file_name..file_type" in the text field.

Can anyone @mapeditor/tiled-extension-maintainers reproduce this issue? I've tried this locally several times with the latest version of the plugin and Tiled and I cannot.

I think this may no longer be an issue.

The file path issue has been resolved and I cannot reproduce this issue. Please re-open a new issue if you see similar issues in the future. @Zetogit