Hi there!
I saw the post with the old language file the other day and was
really hoping for a new one! I fiddled around, but could not find a good example for writing my own. This though is pretty spot on and extremely helpful!
Some things I noticed during the few files I've poked through with it.
1. The only a single ATTRIBUTE_TAG is included in the ruleset. STRENGTH is the only one that is color coded (and in group 4). Below is a link to the page that lists them all, but it doesn't seem to actually have the tags associated with them. I took what I found quickly in creature_standard though.
http://dwarffortresswiki.org/index.php/DF2014:Attribute
[PHYS_ATT_RANGE:STRENGTH:450:950:1150:1250:1350:1550:2250] +
[PHYS_ATT_RANGE:AGILITY:150:600:800:900:1000:1100:1500] -
[PHYS_ATT_RANGE:TOUGHNESS:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:ANALYTICAL_ABILITY:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:FOCUS:700:1200:1400:1500:1600:1800:2500] ++
[MENT_ATT_RANGE:CREATIVITY:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:PATIENCE:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:MEMORY:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:SPATIAL_SENSE:700:1200:1400:1500:1600:1800:2500] ++
2. A Couple of high level CREATURE_TOKEN seem to be missing.
STRANGE_MOODS and OUTSIDER_CONTROLLABLE are ones I immediately saw.
The CREATURE_TOKEN (Caste) MULTIPART_FULL_VISION is as well.
Should probably be level 3 with the rest of the high level tags.
3. The rules for comments causes some strange tagging to occur in some strings. See spoiler for examples. Looks like the comma is really the only one that would be used regularly and cause this problem, but DF doesn't need to escape it. Where is that used as a separator in the modding language? In any case, very small problem.
[DESCRIPTION:A huge humanoid monster with coarse fur, large tusks and horns.]
[DESCRIPTION:A large humanoid monster from the wild tundra. It has translucent skin, icicles for teeth, red glowing eyes and pointed ears.]
4. Really Small Issue
SET_SCHOLARS_ON_VALUES_AND_JOBS appears to be a high level ENTITY_TOKEN but is set to a different level than all of the others? It is 4, while most others are 3. ( [MERCENARY] for example is Green, while it is Orange)
Other Comments
At some point, it might be good to split the different high level tags (Group 3-Green) into another, one that accepts arguments and one that does not. So something like WOOD_WEAPONS and PERMITTED_JOB, while being the same kind of token have different rules. Perhaps the color difference could be subtle in this case.
This note is a slippery slope, but perhaps tags that expect nested values could have their own color as well? For example, the POSITION ENTITY_TOKEN. Truth be told, I have no idea how DF decides that the next tag is not a part of it when reading the raws. Maybe just the first time it runs into something non-valid? In any case, someone messing with the raws I'm sure knows, but it still might be a good feature to have.
I use a different standard color set for my text viewing (dark mode). When using the language, the background color for all tokens is set to white instead of translucent.
All in all, awesome work! As I said at the beginning, this is really helpful with just letting me scan something and immediately find what I'm looking for. Thanks!