For weapons, it's the BODY_SIZE. It should check the actual size but I think it's bugged
IIRC you can wear armor if the creature it is sized for is within 1/7 of the BODY_SIZE. So a human (70k) can wear armor made for creatures between 60k and 80k. What I don't know is how this works for castes with varying sizes, like you are describing. Sorry
Are they meant to be a playable race? If no, they might even just show up in correctly sized armor and you won't have to worry about it.
Ah, that 1/7 figure is very useful, thank you, it should help me with some tests.
I have already done some tests, and hope to do more, on the relation of differing body sizes between castes, and the armor sizes of species as a whole.
What I have found so far is that modifying the body size percentage of one caste with [CHANGE_BODY_SIZE_PERC] to be smaller than the other results in armor being sized to the average of the two, as long as they are of equal proportion of the population (how much proportion affects the average I will do tests on later). Interestingly, the wieldability of weapons is also determined by this average. So human, for instance, which are normally capable of wielding halberds, are ALL unable to wield them when one of the two genders is made to be half the size of the other. However, if this is balanced by a third, rarer but much larger caste which is added, and brings the overall balance of the species above the normal human average, then all of the members of the species may wield halberds if they are big enough, one or two handed depending on individual size. Additional testing may be necessary to confirm whether this is calculated correctly for individuals too small to carry even two-handed.
Strangely, if [BODY_APPEARANCE_MODIFIER:HEIGHT:90:95:98:100:102:105:110] is changed for one of the genders so that every value is halved, the smaller caste is able to wield ALL weapons, though, it seems, only multi-grasp. This may be due to a small data pool. Effects on armor size have yet to be researched extensively, though all of species are able to wear their sized armor.
Anyways, I will finish my research on this once I have a good amount of time to do so, and post the findings to the general discussions, and perhaps on the wiki, so that other may make something useful of it. I know I will.
I am currently of a mind to create a caste of very rare, very short-lived, ~spermwhale-sized people which would balance the rest of the species I am creating, such that they are in-between the size of a dwarf and a human on average, thus allowing them to wear the armor of both species, without affecting the actual species very much. Hopefully, within a couple months or so, you will see the fruit of this labor.