Go to file
bzt 879eb853b5 Added -l flag 2019-12-08 08:58:53 +01:00
data Generate block images from textures 2019-12-07 14:20:02 +01:00
docs Added -l flag 2019-12-08 08:56:12 +01:00
etc Added -l flag 2019-12-08 08:58:53 +01:00
examples Force placement and mod installer 2019-12-06 09:18:22 +01:00
mt-mod Generate block images from textures 2019-12-07 14:29:35 +01:00
src Added -l flag 2019-12-08 08:56:12 +01:00
LICENSE Initial commit 2019-11-29 14:31:39 +01:00
README.md Added -l flag 2019-12-08 08:56:12 +01:00
mtsedit-i686-win.zip Added -l flag 2019-12-08 08:56:12 +01:00
mtsedit-x86_64-linux.tgz Added -l flag 2019-12-08 08:58:53 +01:00

README.md

Minetest MTS Editor

This is a simple editor for Minetest Schematic files (MTS)

Batch Mode

You can convert MTS files and generate preview images for them from a script with this tool. You can also generate the block images for the editor. Read more.

Interactive Mode

Actually the editor consist of two independent components. One is running outside of the game, and since it's a GUI application, I think a picture can tell more than thousand words. Read the editor's User Manual for more details.

The User Interface is translatable. Supported languages: English, Magyar, Español, Français, Deutch, Polski and русский.

The other component is a Minetest mod, under the mt-mod directory. This small Lua script runs inside the game, and can import your edited MTS files into the game's world. It can also save MTS files and capable of generating the blocks.csv for you.

Installation

Under Linux

  1. download mtsedit-x86_64-linux.tgz
  2. as root, extract it to "/" (if you don't trust it, check the tarball first): "sudo tar -C / -xzvf mtsedit-x86_64-linux.tgz"
  3. I guess you know your distro enough to assign a program to an extension. There are many ways, but if your desktop environment recognizes the MTSEdit application from the installed .desktop file, then file assosiation has already taken care for you.
  4. if the MTSEdit application appears in the application menu, but .mts files are not recognized, then as root add the
model/vnd.mts                mts schematic

line to "/etc/mime.types".

Under Windows

  1. download mtsedit-i686-win.zip
  2. unpack it into "C:\Program Files (x86)"
  3. open My Computer, from the "Tools" menu, select "Folder Options"
  4. click on "File Types" tab
  5. scroll down to "MTS" (if you can't find it, click on "New" button and add it)
  6. click on "Change" button
  7. click on "Browse..." button
  8. choose "C:\Program Files (x86)\MTSEdit\mtsedit.exe"
  9. check "Always use the selected program to open this kind of file"
  10. click on "Ok" button

Under MacOSX

  1. download mtsedit-intel-macosx.zip
  2. unpack it into "/Applications"
  3. in the Finder, find an .mts file
  4. pull down the "File" menu and select "Get info" or press Command+I
  5. expand the "Open With" submenu
  6. choose "MTSEdit.app"
  7. click on "Change All..." button

Installing the Minetest mod (common to all OS)

To install the Minetest mod, you can run the following command using your Minetest mods directory as parameter, for example:

./mtsedit -i ~/.minetest/mods

or

mtsedit.exe -i C:\\Program Files (x86)\Minetest\mods

Compilation

This is very simple, as MTSEdit was written in ANSI C. The one and only dependency it has is the SDL2 library. Just issue make in the "src" directory, and that will autodetect your operating system (Linux, BSD, MacOSX and Windows).

It also needs some data files, which can be found here.

Under Linux, BSD, MacOSX

You'll need the development version of SDL2, which can be installed by your distro's standard package management software ("apt-get install", "emerge", "pacman", "port", "homebrew" etc.). It is usually called "libsdl-dev" or similar.

  1. in the src directory, run make
  2. run sudo make install (this will copy mtsedit into /usr/bin, and the data/ directory into /usr/share/mtsedit)

Under Windows

You'll need a couple of tools, here's a step-by-step how to:

  1. install MinGW, this will give you "gcc" and "make" under Windows
  2. download SDL2-devel-X-mingw.tar.gz under the section Development Libraries
  3. extract SDL2 into a directory under MinGW's home directory
  4. open src/Makefile in Notepad, and edit MINGWSDL to the path where you've extracted the tarball, add the last SDL2-X part too
  5. copy $(MINGWSDL)/i686-w64-mingw32/bin/SDL2.dll into C:\Windows
  6. start MSYS (part of MinGW), go to the src directory, and run make (if it complains about "cc", then CC=gcc make)
  7. create C:\Program Files (x86)\MTSEdit
  8. copy mtsedit.exe there
  9. copy the contents of data/ directory to C:\Program Files (x86)\MTSEdit\data

Enjoy!

Known Bugs

Zooming can be slow, because it scales blocks in run-time. Using a cache would require double the memory footprint. I suggest to edit on 100% zoom, as that's using a different, fast blitting function.

Rotations are not handled properly, and only used if there's a block image for that rotaion, and they are picked numerically, not necessarily in rotation CW / CCW order (but you can set all rotations, and they will be saved correctly, it's just you might have to click more to get the one you want).

bzt