A modding tool that converts Lua tables back into Tiled readable JSON files.
Report Bug
·
Request Feature
This is an open-source modding tool for lua based games that use Tiled maps. Tiled is a popular, free, open-source Map Editor used in many games, while it supports exporting for lua it does not have native support for importing lua formats. This modding tool converts lua files back into Tiled readable json files while retaining custom properties and formats. It provides a framework that supports map formats of different games and is easily modifiable.
- Download Lua 5.1 or later source and build it for your system
- Or use an easy installer for Windows that includes the required libraries mentioned above - https://github.com/rjpcomputing/luaforwindows
- Clone this repository or download the source code and extract it.
- From here you may either:
- Build the code yourself
- Run the program from the cmd line with the following command:
lua luaTiledMapConverter.lua
- Or simply run the included LuaTiledMapConverter.bat file
Layout of the UI. You may drag & drop files into the text fields or use the Browse buttons to select files and directories.
The lua or json file(s) you want to convert. Use the browse button to select multiple files.
The output path, can either be a file name or a directory. Choosing a directory is recommended
If Use package names as directories is checked then packages in the file's name are added to export path.
For example, if you have a file called maps.world_1.level_1.lua
then it will be exported to the directory: <export_path>/maps/world_1/level_1.json
The directory where the image files of the map are contained, by default LTMC will try to locate files under the output path Margin and spacing parameters can also be set in this section.
The path used for tilesets in lua format. Make sure to check the game's original lua files to see what path they're using.
Here you may select to export to lua or json format. If you export to json, the program will generate two files:
<map_name>.json
A file containing the map data: tiles, objects, and custom properties. It can be opened and editted with the Tiled Map Editor.
<map_name>_tilesets.json
And a file containing properties of the map's tilesets, this data is lost when parsed by Tiled and must be kept this separate file. DO NOT rename the tileset file, when converting back into lua, the program needs to read the corresponding tileset json file with the input file name.
Distributed under the GPL-3.0 License. See LICENSE
for more information.
Rydrako - @Rydrako_ - rydrako.art@gmail.com
Project Link: https://github.com/Rydrako/LuaTiledMapConverter