Change some node properties in metadata

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Change some node properties in metadata

by Gael de Sailly » Wed Jan 20, 2016 19:47

Hi,

I have this idea that may be hard to code but I'm sure that could be interesting: making able to change some properties of a node, by node metadata, but only for this node.

What could we change?

I'm mainly referring to textures, nodebox and light emission, but we can imagine changing other parameters. That could be some special string fields like "tiles_1"..."tiles_6", "light_source" like "infotext" and "formspec" that already exists.
That would be a great improve for some mods that registers hundreds of nodes that are nearly the same, for different color shades, different node boxes (mesecons)… when we can do it with only 1 node that is sometimes changed by metadata.
We can imagine that it could be good for the signs mod also. This avoids placing an entity to get the text displayed.

I say it but I don't know whether that's technically possible or not. What do you think about it?
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Change some node properties in metadata

by sofar » Sat Jan 23, 2016 00:40

Realbadangel and me have been contemplating switchable tiles based on unused bits in param2.

As for signs, all we need to do is use the in-game font code to render the text on the node surface, and that just means reimplementing NDT_SIGNLIKE, which is on my wishlist/worklist, but I could use help ;)
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: Change some node properties in metadata

by Gael de Sailly » Sat Jan 23, 2016 11:35

sofar wrote:Realbadangel and me have been contemplating switchable tiles based on unused bits in param2.

Excellent idea :)
That was one of my old ideas, but I thought is would not be possible because many nodes have facedir or wallmounted param2. But facedir is from 0 to 23, and wallmounted from 0 to 5, if the max is 255 we can use 10 different tiles, and 42 for wallmounted (modulo 24 or 6 is the facedir/wallmounted value)
But I think (I may be wrong) that it needs to define several additional drawtypes, we have already numerous ones.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 9 guests

cron