@Clément:
There's a DFHack lua script called devel/export-dt-ini.lua that generates addresses for DT. I'm currently looking at the usages of the <unit>.flags1.dead flag, as it's mistakenly been named "dead" when its actual function is "inactive", and a number of scripts and plugin uses the flag incorrectly. In most cases the <unit>.flags2.killed flag should be used instead.
Towards the end of the script the unit flags are processed, creating an output string for named flags of interest.
There are two questions:
1. Is the string produced significant, i.e. is it read by a program, or is it for human consumption only?
2. Does DT have a need for <unit>.flags1."dead" at all, given that <unit>.flags2.killed is known to it as well?
The reason for 1. is that I'd like to change the text for the <unit>.flags1.diplomat to "outpost liaison, diplomat, or quester who intends to or has ever requested an artifact" and for <unit>.flags1."dead" to "currently not active".
The reason for 2. is rather obvious. The "dead" flag is set on critters, merchants, visitors, and invaders that are inbound but haven't yet entered the map, and I suspect this can happen with returning raiding party members as well, although I haven't investigated that (they trickle in on return, but I don't know if the whole squad is added to the "active" unit list at once, setting all but the first one to "dead", or if they get entered into the "active" list one at a time as they enter the map). I think the "dead" flag is set on units that have left the map, but the group hasn't left yet (such as a caravan and possibly a raiding squad), but that's a guess, as I haven't checked that either).