Storing different data in two instances of the same node?

calakin
New member
 
Posts: 6
Joined: Mon Jun 05, 2017 23:02
In-game: calakin

Storing different data in two instances of the same node?

by calakin » Fri Apr 13, 2018 04:46

The topic is kinda confusing, wasn't sure how to explain in so few words.

Looking at the API, it seems like items and entities allow for the addition of a custom field in their definitions. I am going to assume this will work for nodes also, but I have not tried it yet. I think that's incredibly useful, but if I understand correctly, changing that custom value would change the value for all nodes of that kind.

I'm looking for a way to store dynamic data specific to an instance of a node type. I think the best way is an example:

Say you have a node called "mymod:rock". If I want to give those rocks a field called _weight, and give them differing values for _weight, is that possible?

If so, can someone please explain how that can be achieved?
If not, could someone please explain why that is not a good idea?
 

calakin
New member
 
Posts: 6
Joined: Mon Jun 05, 2017 23:02
In-game: calakin
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 5 guests