Yep, I hoped it would read the CASTE:MALE_ASPID, take out the MALE part to determine the gender and get ASPID as a caste name . It would make the program usable for different versions of the game mod without recompiling.
I've actually gone ahead and done it via a text file - I gave more thought to reading the raws themselves, and felt that there was too much room for error.
For example, it just says "CASTE:MALE" for stone dwarves, and the "CASTE:XXX" is just a label, we can't really trust that the name there is the "real" name you'd want for the caste. Then if I go into the CASTE_NAME area, there's say "moss dwarf" and "moss dwarfette" ... but then we don't know which of the two caste names you'd actually want to use.
Say you had a human race of "warrior" and you wanted the female of a warrior caste to be called "Amazon" and the male ... it's just not practical to have these decisions all made automagically without some goofiness.
Sooo.... I figured the text file definition is the best way - the way I've done it you can just write in the names you want, and you specify the gender (I thought it was reasonable to think there would be a mod somewhere that has an only-male or only-female caste, so I didn't want to hard code in 2 genders for each caste).
The format is really simple. Just do:
[MALE]Stone Dwarf
[FEMALE]Stone Dwarf
[MALE]Aspid Dwarf
[FEMALE]Aspid Dwarf
etc.
Enter these in the order in which they appear in the mod's raw file and that's it. This will (should?) work for any mod, although it'd be weird if you had a mod where you could play more than one different race in fortress mode, but as far as I know that doesn't happen.
This'd even work for the Orc Fortress version of Genesis as well, just need to punch in the orc's caste names. I may even create a file for it myself.
I've been trying to find anyone in the Dwarf Therapist IRC channel, but so far no luck. I'll upload the .exe for this soon, if some people want to give it a try. Provided all is good, you'd be totally welcome to list it with the Genesis mod and make it available for anyone to download.
If I can get in touch with anyone about the DT code, I'll see if they want to get these changes merged into the official DT code tree (the changes will have no effect on the core DT - if there's no caste file supplied, it just runs vanilla... so there's no real reason not to merge it, I guess).