Fork du dépôt MTAutocolors. https://bitbucket.org/s_l_teichmann/mtautocolors
Go to file
sys4-fr 3ba9c542bb Remplissage du dépôt 2018-12-13 21:25:14 +01:00
cmd/mtautocolors Remplissage du dépôt 2018-12-13 21:25:14 +01:00
mods/automappercolors Remplissage du dépôt 2018-12-13 21:25:14 +01:00
.hg_archival.txt Remplissage du dépôt 2018-12-13 21:25:14 +01:00
LICENSE Remplissage du dépôt 2018-12-13 21:25:14 +01:00
README.md Remplissage du dépôt 2018-12-13 21:25:14 +01:00
maps_mt_sha_bang_de_predefined.json Remplissage du dépôt 2018-12-13 21:25:14 +01:00
predefined.json Remplissage du dépôt 2018-12-13 21:25:14 +01:00

README.md

MTAutocolors

A tool to generate a colors.txt from the registered nodes of a Minetest server. To have a colors.txt for Minetest mapping for example with MTSatellite you need a colors.txt file. You can grab one from VanessaE or build one yourself.

gravgun wrote the generator automappercolors. MTAutocolors is a slightly extended version of this generator being much faster, too (The image processor is written in Go instead of Python). It consists of two parts:

  1. The included mod to be installed into your minetest server to extract the needed node informations.

  2. The program mtautocolors to generate the final colors.txt file from the informations gathered by the mod.

Build

Your need a Go 1.8 or later installation to compile the program. Go 1.9.2+ is recommended as there is a known issue with decoding images in earlier versions.
Mercurial and Git have to be install installed.

$ go get -u bitbucket.org/s_l_teichmann/mtautocolors/cmd/mtautocolors

will result in a binary mtautocolors to be put into your PATH.

Usage

Install the mod into your Minetest server. Start your game. Now you can type /amcdumpnodes as a chat command in the Minetest client. This will result in a file amc_nodes.txt in the data directory of your world. Once created you can deactivate the mod until you install or remove mods or update the game in a way which changes the registered nodes. mtautocolors needs a few arguments. The path to the amc_nodes.txt file generated with the mod and paths to the images of your minetest server. This would be the root of the minetest server and/or the folder where you have the actual minetest game. Something like this (adjusted to your setting):

$ mtautocolors -predefined=/predefined.json                \
  /home/xyz/minetest/worlds/colors/amc_nodes.txt           \
  /home/xyz/minetest/ /home/xyz/minetest_game > colors.txt

There is an option to overwrite the machine generated behavior for certain kinds of nodes with a JSON file. Look at predefined.json to get the idea. Basically its a list of entries with a regular expression matching the node name and a tuple of RGBA values which should be used instead of the machine generated.

Transparency: Some nodes should be transparent like glass or water. mtautocolors only generates a alpha channel for nodes with of certain draw types. By default this are the ones which drawtype contains 'glasslike' or 'liquid'. This can be overwritten with the -transparent= flag.

This is Free Software under the terms of the MIT license. See LICENSE for details.
gravgun's original is covered by the WTFPL license. See LICENSE for details, too.