I have been working on merging textures from other mods to point to default mods to have less media for the server, and then it hit me: what id we were to simplify the default textures too? Maybe use one texture for multiple textures by adding colour...
So This is what I have been working on, and it works.
Example of using 5 textures for ALL the tools in MT:
Code: Select all
minetest.register_tool("default:pick_diamond", {
description = "Diamond Pickaxe",
inventory_image = "default_handle_long.png^(default_steelpick.png^[colorize:#33FFFF:152)",
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=30, maxlevel=3},
},
damage_groups = {fleshy=5},
},
})
The tools use a handle image and a tool image overlaid to get this effect.
This means one handle can be used with ALL tools.
BLOCKS:
Code: Select all
minetest.register_node("default:sandstonebrick", {
description = "Sandstone Brick",
--tiles = {"default_sandstone_brick.png"},
tiles = {"default_stone_brick.png^[colorize:#CCCC99:152"},
is_ground_content = false,
groups = {cracky = 2},
sounds = default.node_sound_stone_defaults(),
})
By using one texture for generic stone brick pattern, we colourise it to make more, therefore we can remove more textures from folder.
Ingots and lumps:
[code]
minetest.register_craftitem("default:iron_lump", {
description = "Iron Lump",
--inventory_image = "default_iron_lump.png",
inventory_image = "default_clay_lump.png^[colorize:#9C0503:152",
})
minetest.register_craftitem("default:copper_ingot", {
description = "Copper Ingot",
--inventory_image = "default_copper_ingot.png",
inventory_image = "default_steel_ingot.png^[colorize:#FF6600:152",
})
Reference to a decent color picker is here:
https://www.colorcodehex.com/online-color-mixer.html
You may need to tune colours just right if colourising an already coloured texture, this is why I chose the steel textures as my base texture to modify.
You can visit the ESM City server to see this in action.
NOTE:
you MUST change the corresponding stairs to match too:
Code: Select all
stairs.register_stair_and_slab("bronzeblock", "default:bronzeblock",
{cracky = 1, level = 2},
{"default_steel_block.png^[colorize:#996600:152"},
"Bronze Block Stair",
"Bronze Block Slab",
default.node_sound_stone_defaults())
Happy coding!!!