Go to file
bzt d0d0c78376 Fixed some translations 2019-12-06 09:51:33 +01:00
data Lot of stuff 2019-12-04 11:37:44 +01:00
docs Force placement and mod installer 2019-12-06 09:18:22 +01:00
examples Force placement and mod installer 2019-12-06 09:18:22 +01:00
mt-mod Force placement and mod installer 2019-12-06 09:21:42 +01:00
src Fixed some translations 2019-12-06 09:51:33 +01:00
LICENSE Initial commit 2019-11-29 14:31:39 +01:00
README.md Force placement and mod installer 2019-12-06 09:18:22 +01:00

README.md

Minetest MTS Editor

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

MineTest Schematics Editor by bzt Copyright (C) 2019 MIT license

./mtsedit [-v] [-d|-p|-P] [-m map] <.mts|.schematic> [out.mts]
./mtsedit -g <block.png>
./mtsedit -t <blockimgs.csv>
./mtsedit -i [Minetest mods dir]

  -v: verbose output
  -d: dump layers to output
  -p: save preview
  -P: save preview, cut structure in half
  -m map: replace block type mapping
  -g: generate slab and stairs from block image
  -t: generate block images from texture data
  -i: install Minetest mod
  out.mts: output to file

Batch Mode

You can convert MTS files and generate preview images for them from a script with this tool. 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.

You can install this Minetest mod by running

./mtsedit -i ~/.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
  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, only the first four, 0 - 3 meaning North, West, South, East.

bzt