Skip to content

Rydrako/LuaTiledMapConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues GPL License


Lua Tiled Map Converter

A modding tool that converts Lua tables back into Tiled readable JSON files.
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Set Up
  3. Usage
  4. License
  5. Contact

About The Project

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.

Dependencies

Set Up

Prerequisites

Installation

  1. Download Lua 5.1 or later source and build it for your system
  2. Clone this repository or download the source code and extract it.
  3. 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

Usage

UI Layout of the Program

Layout of the UI. You may drag & drop files into the text fields or use the Browse buttons to select files and directories.

Input

The lua or json file(s) you want to convert. Use the browse button to select multiple files.

Output

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

Tileset Settings

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.

Lua Settings

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.

Convert

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.

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Rydrako - @Rydrako_ - rydrako.art@gmail.com

Project Link: https://github.com/Rydrako/LuaTiledMapConverter

About

Modding tool for lua based games

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages