Changing a nodes definition at runtime?

Post Reply
DylanOwen
New member
Posts: 1
Joined: Tue Aug 18, 2020 09:52

Changing a nodes definition at runtime?

by DylanOwen » Post

Do you ever think minetest will have the ability to change a nodes, craft items, or tools definition at runtime? Is this already something that is under development?

Also... what is your opinion about this? Do you think it would be useful? I do... for example changing a nodes texture (instead of replacing the node), or changing the sounds it makes.

In my experience in programming, you NEVER KNOW what you may need in the future. One moment you say "that's ridiculous why would I ever need that", then later on you think "oh... that's why I need that".

User avatar
Hume2
Member
Posts: 630
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Changing a nodes definition at runtime?

by Hume2 » Post

The annoyance I'm facing is that the node definition doesn't allow any variance. The only variance it allows is changing the metadata but one can't change the texture, collisionbox etc.. If I want a node to change its texture, I need either a different node or use entities. Entities are laggy and unreliable and using a different node requires me to register a node for each possible combination. And one can't register more that 32768 nodes.
If you lack the reality, go on a trip or find a job.

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

Re: Changing a nodes definition at runtime?

by Pyrollo » Post

If you could change node definition on the fly, it would change all nodes of this type.
If you want to change a simple ocurence of a node, then changed stuff could not go in definition and has to be stored on a per node basis (IE in metadata).

Sure it lacks some flexibility, especially about textures (hope something will be done.. a day). If you want a somehow reliable entity hack, you can use display_api.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

Re: Changing a nodes definition at runtime?

by Pyrollo » Post

Hume2 wrote:
Fri Aug 21, 2020 05:57
If you lack the reality, go on a trip or find a job.
Love your signature. This is a very good answer to those who want Minetest to be a real world simulator.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests