d0d0c78376 | ||
---|---|---|
data | ||
docs | ||
examples | ||
mt-mod | ||
src | ||
LICENSE | ||
README.md |
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.
- in the src directory, run
make
- 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:
- install MinGW, this will give you "gcc" and "make" under Windows
- download SDL2-devel-X-mingw.tar.gz under the section Development Libraries
- extract SDL2 into a directory under MinGW's home directory
- open src/Makefile in Notepad, and edit MINGWSDL to the path where you've extracted the tarball, add the last SDL2-X part too
- copy $(MINGWSDL)/i686-w64-mingw32/bin/SDL2.dll into C:\Windows
- start MSYS (part of MinGW), go to the src directory, and run
make
- create C:\Program Files (x86)\MTSEdit
- copy mtsedit.exe there
- 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