Right now, we have this (code snippet from my archipelago mod) in our entities json:
"entity_data": {
"something...":"something...",
"stonehearth:catalog": {
"something...":"something...",
"material_tags": "food raw_food fruit coconut vegetarian stockpile_raw_food"
}
}
The material_tags key value is a single string with all the tags you want and need in there.
This causes us modders a problem. To edit one tag, we need to overwrite the whole string.
For example, in the cook mod (and brewery mod), some items have their tags overwritten so it can adds the “drink_container” tag into it.
Changing the berries tags from:
"food_container raw_food fruit berry vegetarian stockpile_raw_food"
to:
“food_container raw_food fruit berry vegetarian stockpile_raw_food drink_container”
Nice, but now if another mod also tries to add a tag to that same item, say for example the tag “bad”, it will try to add this new tag in this manner:
“food_container raw_food fruit berry vegetarian stockpile_raw_food bad”
See? After his overwrite, the “drink_container” added by the cook mod is not there anymore. In the end, it is a case of priority, whoever changes it last gets the correct strings.
This was just an example case, I bet this is a huge problem for the better_stockpile_mod too, in that the modder is heavy dependent of these, changing the tags of some items would help organize it a lot, but cause incompatibilities with other mods tags changes.
Also, in these examples, we are talking about just adding extra tags, but what if we need to remove? (and then some other mod changing it ends up adding it back with his overwrite)
This requires a good amount of communication between modders, working together to be compatible with each other, which is not always possible or easy.
What I propose is to change the value from a string to an array of values. Example:
"material_tags" : [
"food_container",
"raw_food"
"fruit",
"berry"
"vegetarian",
"stockpile_raw_food"
]
With this new model, we can add new tags simple using a mixinto json with the new values. (Or remove/update with the “mixintype” key)
So, now 2 or more mods can now add tags to the same item without erasing the changes of the other, without even knowing that the other mod is also changing those.