-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua export embeds all tiles with custom properties when an object is placed #2120
Comments
Right, this has actually nothing to do with placing an object. For what may now be just historical reasons, the Lua export always exports tilesets as embedded. But when not embedding the tileset, the Lua export would end up referring to the external tileset, which is currently never in Lua format, because you can only export to Lua, you can't save to Lua. This would not be very helpful, though as a user you could export the tileset to Lua as well and just replace the extension. Alternatively, when exporting a map that refers to external tilesets, it could somehow refer to those tilesets by their exported location. That means you'd need to export your tileset first, and then Tiled would need to remember (and possibly store) the last export location. Trying to export a map with external tilesets that haven't been exported yet should then probably yield a warning. |
Okay but shouldn't there be a way to disable it ? I still don't like having the tileset embedded in every map. |
@bjorn Any updates on this? I'm slowly reaching my deadline on a project I'm working on and seeing every map contain +350kB extra just because they got the tileset embedded in them is not pretty. |
@squishyu Ah, since my last comment I made change 86c82f8, which will make the behavior I suggested above easier to implement. So, my idea would be to reference the exported Lua file when set and fall back to the original tileset file name if not. Or would it be better to just always use the original tileset file name, since it would be more reliable? |
I've decided to include the export filename in addition, when available, rather than replacing the original filename property. This change will be available in a new development snapshot later today. @squishyu Good luck finishing your project! And if you haven't already, please consider supporting Tiled as well. ❤️ |
How to reproduce the issue:
What I expected to happen:
Since I don't need any of the tile properties, plus I had the "Embed tilesets" option disabled in the preferences I shouldn't see them in the Lua file.
What actually happened:
The customized tiles got included in the .lua map file. (They didn't get included in the .tmx file and they didn't even appear when I tried exporting the map as .json)
This can make the map files several times bigger than they need to be.
Info
The text was updated successfully, but these errors were encountered: