|This article is about an older version of DF.|
Not to be confused with casts
A caste is a means of defining a sub-species within the broader creature definition. When a creature is spawned, they are made into a randomly determined caste of the creature, using either equal weighting (by default), or the POP_RATIO tag. Castes were originally conceived mainly for male/female distinction, and in vanilla DF, mostly serve the purpose of making males and females differ.
Caste-level definitions of a creature may be (and, in the vanilla raws, often are) defined for all castes at once.
The entire skeleton (that is, the BODY: tag) and tissue structure of creatures are moddable on a caste level, which allows for creatures with radically different body types (such as a giant spider and a human) to share the same "species".
In fact, virtually every creature-level token is apparently caste-level moddable. The only tag that is believed to buck this trend are the BIOME tag, which would create a race incapable of breeding with itself, if used improperly by segregating males and females, and MEGABEAST tag, presumably to prevent megabeasts from breeding. Also, the vermin related tags are in the creature-level.
This also means it is possible to make [INTELLIGENT] caste-level moddable, and then make, among other things, male dwarves who are milkable, thanks to the extreme power of the moddability of the raws.
Some bugs are possible through modding, such as creating "fractal bodies" by defining the BODY tag in the creature level, and then creating a new caste-level definition of the creature. This generates duplicate body parts which increase in number the further away they are from the Upper Body part, with six upper arms, eight lower arms, and ten hands.
Please mod responsibly.
[CASTE:<CASTE_NAME>] defines a caste called <CASTE_NAME>. Tags following this affect only this caste.
[SELECT_CASTE:ALL] state the following tags affect all Castes
[SELECT_ADDITIONAL_CASTE:<CASTE_3>], etc., is used to specify that tags affect a subset of Castes