Page 1 of 1

help a little

PostPosted: Wed Oct 10, 2012 10:35
by Boomboomcreeper
can i change something in init lua to make the sandstone to have sandstone.png and sandstone_top.png????

PostPosted: Wed Oct 10, 2012 10:55
by VanessaE
At around line 791 of minetest_game/mods/default/init.lua there is a definition for the sandstone node. In that definition there is a line that reads:

tiles = {"default_sandstone.png"},

This sets the textures used on the sandstone block. Change this line to read something like:

tiles = {"default_sandstone.png^default_sandstone_top.png", "default_sandstone.png" },

(don't forget the trailing comma)

In the tiles={} field, the first quoted string is the top texture, the second is the bottom, then right, left, back and front in that order. One quoted string for each side.

The way I wrote it here, the first quoted string is the old texture with yours composited on top of it - that's what the caret ^ does. The purpose of this is to make sure at least the old texture is drawn if your new one isn't found. The second quoted string of course is the old texture that was there before. Since I didn't write in strings for the other four sides, that last one will be used in their place.

If you draw your top texture solid, it'll just replace the old one entirely - but make sure you have a transparency channel, even if the whole image is opaque (otherwise, your image will not be used at all).