Is category used to determine its filter for the stockpile, right? And material_tags for its use in recipes?
If so, why there is in a few objects tags like “stockpile_decoration”?
Hi,
Category is the grouping used in the UI. The material tags determines the stockpile filter to be used. Ex: all resources like wood and stone have the resource category and will appear under one grouping in the town inventory, but they have different stockpile filters.
actually, I was guessing that material tag is actual semantic data on the entity as opposed to just stockpile filter. Stockpile uses the tags as filters yes, but the dependency relationship is a little different.
One wild example (if my guess above is correct), say is when we want to implement wooden stuff burning. Any entity that has wood in the material tag will now burn if exposed to fire (processing by engine). That would be a use of the tags not related to stockpile at all.
Recipes already work like this, for example the blacksmith workbench asks for ingredients “ingot resource”, which all ingots have as tags, so we can craft it using any ingot (copper,gold,etc…)
It also plays into the shops as well on limiting what each shop will buy/sell from you. If you look at the shop files in data/gm/campaigns/trader/arcs/encounters/tier_1_shops (and tier_2_shops) you can see how it limits them down.
I was playing around with it some when I was figuring out how to limit what you could sell to the traders instead of every trader buying anything and everything you have in my market mod. In the end I was able to add more data into the shop json files that were then filtered out in javascript when the shop dialog displayed. Feel free to dig around in it if you want.