Example with new hypothetical suggested syntax.
Description of hypothetical syntax:
A new tag system similar to damage types, ranges, and other in-string fields
The basic syntax is: "tagName:subtagName"
This is equivalent to having the tags "tagName" and "tagName_subtagName"
To have multiple subtags: "tagName:subtagNameA,subtagNameB"
This is equvalent to having the tags: "tagName", "tagName_subtagNameA", and "tagName_subtagNameB"
You should also be able to add subtags in mods. Example:
The actinide waste cannon might be "illegal:commonwealth", but TSB may want to make it illegal in the coalition as well, and would add "illegal:coalition" to it, which would behind the scenes be automatically concatenated to "illegal:commonwealth,coalition"
For searching/filtering criteria, there are additional syntax modifiers:
"tagName" will match any "tagName:SubtagName" because "tagName" is one of the generated tags from the supertag
"tagName:!commonwealth" will match any "tagName" unless "tagName_commonwealth" also exists
"tagName:commonwealth,coalition" is an AND operation, as it expects all 3 expanded tags to be there
"tagName:commonwealth|coalition" is an OR operation, and selects anything that has either tagName_commonwealth or tagName_coalition
, and | come before ! in the order of operations, that is to say:
"tagName:!commonwealth|coalition" functionally means "tagName_coalition", as long as "tagName_commonwealth" is not also present. If you instead wanted it to select any so long as neither one the "tagName_commonwealth" nor "tagName_coalition" tags were present, you instead need to specify "tagName:!commonwealth,!coalition", as if either one of the tags is present it would fail at least one of the two conditions.
What this allows us to do:
We would now be able to usefully and flexibly specify what is considered contraband (illegal) or what would require a license, and apply meaningful and relatively concise filters around them
We would also be able to display this in the UI, with subtags grouped together
For example, illegal:commonwealth might display "Illegal in: Commonwealth, Coalition" in the item box instead of just "Illegal"
For backwards compatibility, older API versions would have "illegal" retroactively auto-converted to "illegal:commonwealth", and same for "military"
Something like this would be a boon for working with items for TBR sovereigns as well.