@EmperorJon: I had this error mostly when I tried to add body parts after I already set up BODY_DETAIL_PLANs. In the end, the most sensible way for me was to define castes first, then BODY and corresponding BODYGLOSS tags for the castes, then modify some RELSIZEs so they have slightly different proportions, and then add BODY_DETAIL_PLANs for all of them at once (after [SELECT_CASTE:ALL]).
Unfortunately being a complete and utter DF modding noob I have no idea what the difference is between the different body detail plan files, and bodygloss...?
[BODY:...] adds body parts (defined in files with [OBJECT:BODY] at the start; body_default.txt for example). Torsos, arms, heads, necks, eyes, teeth, hearth, guts, stuff like that.
[BODYGLOSS:...] renames some of the body parts, and is defined in the same place. It's purely descriptive, without any mechanical differences. For example, [BODYGLOSS:LEG_STUMP] renames every "leg" of the creature to a "stump". In my experience, they only work on the body parts which you added before the tag; so adding some [BODY:FRONT_LEGS], then doing [BODYGLOSS:LEG_STUMP] and finally adding [BODY:HIND_LEGS] will only make the
front legs into stumps.
[BODY_DETAIL_PLAN:...] has several distinct goals: First, to add material definitions, and then to add tissues based on those materials. Those definitions (added by [ADD_MATERIAL:
materialname:
reference to a material template] and [ADD_TISSUE:
tissuename:
reference to a tissue template] respectively) then get used further down the line to add tissue layers. Finally, body detail plans can also detail relative sizes of body parts and their positions relative to each other. The exact definitions are in files starting with [OBJECT:BODY_DETAIL_PLAN]; like b_detail_plan_default.txt. The important thing to remember is that they only act upon the body parts you defined until this point of the creature definition file; any additional [BODY:...] tags added later won't get the materials and tissues which were added before. Also, you should add materials ([BODY_DETAIL_PLAN:STANDARD_MATERIALS for example) before tissues ([BODY_DETAIL_PLAN:STANDARD_TISSUES]).
In general, I prefer to work it in this structure:
1. Add general body parts which
every caste will have.
2. Add castes.
3. Group castes (by using [SELECT_CASTE:...] followed by optional [SELECT_ADDITIONAL_CASTE:...] tags) and add body parts which only they have in common; also, use this part to change relative proportion (using [RELSIZE:...]) of body parts where needed.
4. [SELECT_CASTE:ALL] and add use the [BODY_DETAIL_PLAN:...] tags to add all needed materials, then all tissues, then to define relative sizes and positions; add modifiers for them if you like thereafter.
For the giant ants I'm working at right now, this looks like following (ignore the BODY and BODY_DETAIL_PLAN names you don't know or have; I had to add quite a few of them to make it actually look like an insect):
1. I skip part 1
2. Castes:
== Castes ==
[CASTE:WORKER]
[CASTE_NAME:giant ant worker:giant ant workers:giant ant worker]
Female, but non-breeding.
[POP_RATIO:10000]
[BODY_SIZE:0:0:5000] -- 5kg
[BODY_SIZE:1:0:100000] -- 100kg
[CASTE:SOLDIER]
[CASTE_NAME:giant ant soldier:giant ant soldiers:giant ant soldier]
Female, but non-breeding.
[POP_RATIO:1000]
[BODY_SIZE:0:0:5000] -- 5kg
[BODY_SIZE:1:0:200000] -- 200kg
[CASTE:DRONE]
[MALE]
[CASTE_NAME:giant ant drone:giant ant drones:giant ant drone]
[POP_RATIO:5]
[SPEED:650] -- fast, but a bit slower than the others
[FLIER]
[BODY_SIZE:0:0:5000] -- 5kg
[BODY_SIZE:1:0:100000] -- 100kg
[CASTE:QUEEN]
[FEMALE]
[CASTE_NAME:giant ant queen:giant ant queens:giant ant queen]
[POP_RATIO:1]
[SPEED:2500] -- very slow
[BODY_SIZE:0:0:10000] -- 10kg
[BODY_SIZE:1:0:1000000] -- 1000kg
[MAXAGE:40:50]
3. Adding bodies, and then changing the relative sizes of them a bit. Also, BODYGLOSS to rename "upper body" to "thorax", "lower body" to "abdomen" and "foot" to "claw":
== Bodies ==
Body definition - drones have additional 2WINGS_INSECTOID
[SELECT_CASTE:WORKER]
[SELECT_ADDITIONAL_CASTE:SOLDIER]
[SELECT_ADDITIONAL_CASTE:QUEEN]
[BODY:INSECT_DETAILED:2EYES:2ANTENNAE:DORSAL_AORTA:INSECT_GUTS:BRAIN:MOUTH:SMALL_MANDIBLES:INSECTOID_JOINTS:ABDOMEN_STINGER]
[BODYGLOSS:INSECT_UPPERBODY:INSECT_LOWERBODY:CLAW_FOOT]
[SELECT_CASTE:DRONE]
[BODY:INSECT_DETAILED:2EYES:2ANTENNAE:DORSAL_AORTA:INSECT_GUTS:BRAIN:MOUTH:SMALL_MANDIBLES:2WINGS_INSECTOID:INSECTOID_JOINTS:ABDOMEN_STINGER]
[BODYGLOSS:INSECT_UPPERBODY:INSECT_LOWERBODY:CLAW_FOOT]
Bigger upper body to make place for more muscles, for flying
[RELSIZE:BY_CATEGORY:BODY_UPPER:800] default 500
[SELECT_CASTE:SOLDIER]
Bigger mandibles
[RELSIZE:BY_CATEGORY:CLAW:100] default 50
[SELECT_CASTE:QUEEN]
Relatively bigger bodies for the queens
[RELSIZE:BY_CATEGORY:BODY_UPPER:700] default 500
[RELSIZE:BY_CATEGORY:BODY_LOWER:1500] default 1000
4. Finally, adding all the materials (CHITIN_MATERIALS), tissues (INSECT_TISSUES and INSECT_DIGESTIVE_LAYERS to make muscles without arteries in them and chitin-lined parts of the digestive tract) and assigning finishing touches:
[SELECT_CASTE:ALL]
[BODY_DETAIL_PLAN:CHITIN_MATERIALS]
[BODY_DETAIL_PLAN:INSECT_TISSUES]
[BODY_DETAIL_PLAN:INSECT_DIGESTIVE_LAYERS]
[BODY_DETAIL_PLAN:EXOSKELETON_TISSUE_LAYERS:CHITIN:FAT:MUSCLE]
[BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS]
[SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART]
[TL_MAJOR_ARTERIES]
[SET_TL_GROUP:BY_CATEGORY:ALL:CHITIN]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:chitin:SINGULAR]
[SET_TL_GROUP:BY_CATEGORY:EYE:EYE]
[TL_COLOR_MODIFIER:BLACK:1]
[TLCM_NOUN:eyes:PLURAL]
For reference, the current additional body parts used in this giant ant are those:
[BODY:INSECT_DETAILED]
[BP:UB:thorax:thoraxes][UPPERBODY][CATEGORY:BODY_UPPER]
[DEFAULT_RELSIZE:500]
[BP:HD:head:STP][CON:UB][HEAD][CATEGORY:HEAD]
[DEFAULT_RELSIZE:500]
[BP:LB:abdomen:STP][CON:UB][LOWERBODY][CATEGORY:BODY_LOWER]
[DEFAULT_RELSIZE:1000]
[BP:RFF:right front femur:STP][CON:UB][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:60]
[BP:LFF:left front femur:STP][CON:UB][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:60]
[BP:RFT:right front tibia:STP][CON:RFF][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:40]
[BP:LFT:left front tibia:STP][CON:LFF][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:40]
Technically, the feet are called "tarsus" / "tarsi", but that's just a fancy (latin) name for "feet", really
[BP:RF1:right front foot:right front feet][CON:RFT][STANCE][RIGHT][CATEGORY:FOOT_FRONT]
[DEFAULT_RELSIZE:20]
[BP:LF1:left front foot:left front feet][CON:LFT][STANCE][LEFT][CATEGORY:FOOT_FRONT]
[DEFAULT_RELSIZE:20]
[BP:RCF:right central femur:STP][CON:UB][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:60]
[BP:LCF:left central femur:STP][CON:UB][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:60]
[BP:RCT:right central tibia:STP][CON:RCF][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:40]
[BP:LCT:left central tibia:STP][CON:LCF][LIMB][RIGHT][CATEGORY:LEG_FRONT]
[DEFAULT_RELSIZE:40]
[BP:RC1:right central foot:right central feet][CON:RCT][STANCE][RIGHT][CATEGORY:FOOT_FRONT]
[DEFAULT_RELSIZE:20]
[BP:LC1:left central foot:left central feet][CON:LCT][STANCE][LEFT][CATEGORY:FOOT_FRONT]
[DEFAULT_RELSIZE:20]
[BP:RRF:right rear femur:STP][CON:UB][LIMB][RIGHT][CATEGORY:LEG_REAR]
[DEFAULT_RELSIZE:60]
[BP:LRF:left rear femur:STP][CON:UB][LIMB][RIGHT][CATEGORY:LEG_REAR]
[DEFAULT_RELSIZE:60]
[BP:RRT:right rear tibia:STP][CON:RRF][LIMB][RIGHT][CATEGORY:LEG_REAR]
[DEFAULT_RELSIZE:40]
[BP:LRT:left rear tibia:STP][CON:LRF][LIMB][RIGHT][CATEGORY:LEG_REAR]
[DEFAULT_RELSIZE:40]
[BP:RR1:right rear foot:right rear feet][CON:RRT][STANCE][RIGHT][CATEGORY:FOOT_REAR]
[DEFAULT_RELSIZE:20]
[BP:LR1:left rear foot:left rear feet][CON:LRT][STANCE][LEFT][CATEGORY:FOOT_REAR]
[DEFAULT_RELSIZE:20]
Insectoid joints (for the legs for now)
[BODY:INSECTOID_JOINTS]
[BP:RFC_J:right front coxa:STP][CON:RFF][JOINT][SMALL][INTERNAL][RIGHT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:15]
[BP:LFC_J:left front coxa:STP][CON:LFF][JOINT][SMALL][INTERNAL][LEFT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:15]
[BP:RCC_J:right central coxa:STP][CON:RCF][JOINT][SMALL][INTERNAL][RIGHT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:15]
[BP:LCC_J:left central coxa:STP][CON:LCF][JOINT][SMALL][INTERNAL][LEFT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:15]
[BP:RRC_J:right rear coxa:STP][CON:RRF][JOINT][SMALL][INTERNAL][RIGHT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:15]
[BP:LRC_J:left rear coxa:STP][CON:LRF][JOINT][SMALL][INTERNAL][LEFT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:15]
[BP:RFK_J:right front knee:STP][CON:RFT][JOINT][SMALL][INTERNAL][RIGHT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:4]
[BP:LFK_J:left front knee:STP][CON:LFT][JOINT][SMALL][INTERNAL][LEFT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:4]
[BP:RCK_J:right central knee:STP][CON:RCT][JOINT][SMALL][INTERNAL][RIGHT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:4]
[BP:LCK_J:left central knee:STP][CON:LCT][JOINT][SMALL][INTERNAL][LEFT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:4]
[BP:RRK_J:right rear knee:STP][CON:RRT][JOINT][SMALL][INTERNAL][RIGHT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:4]
[BP:LRK_J:left rear knee:STP][CON:LRT][JOINT][SMALL][INTERNAL][LEFT][CATEGORY:JOINT]
[DEFAULT_RELSIZE:4]
Dorsal aorta (heart equivalent) in insects, two parts, "upper" in thorax and "lower" in abdomen
[BODY:DORSAL_AORTA]
[BP:UDA:upper dorsal aorta:STP][CONTYPE:UPPERBODY][CIRCULATION][INTERNAL][SMALL][CATEGORY:HEART]
[DEFAULT_RELSIZE:150]
[BP:LDA:lower dorsal aorta:STP][CONTYPE:LOWERBODY][CIRCULATION][INTERNAL][SMALL][CATEGORY:HEART]
[DEFAULT_RELSIZE:150]
Ant antennae (by Deon, "Genesis" mod)
[BODY:2ANTENNAE]
[BP:R_EAR:right antenna:STP][CONTYPE:HEAD][HEAR][RIGHT][CATEGORY:EAR]
[DEFAULT_RELSIZE:15]
[BP:L_EAR:left antenna:STP][CONTYPE:HEAD][HEAR][LEFT][CATEGORY:EAR]
[DEFAULT_RELSIZE:15]
Non-limb wings (to avoid "grasping" with them)
[BODY:2WINGS_INSECTOID]
[BP:RWINGI:right wing:STP][CONTYPE:UPPERBODY][RIGHT][FLIER][CATEGORY:WING]
[DEFAULT_RELSIZE:500]
[BP:LWINGI:left wing:STP][CONTYPE:UPPERBODY][LEFT][FLIER][CATEGORY:WING]
[DEFAULT_RELSIZE:500]
Stinger connecting to the lower body (abdomen)
[BODY:ABDOMEN_STINGER]
[BP:ABDOMEN_STINGER:stinger:STP][CONTYPE:LOWERBODY][CATEGORY:STINGER][SMALL][SOCKET]
[DEFAULT_RELSIZE:40]
(Comparatively) small mandibles without muscles within the structure
(thus CATEGORY:CLAW, to not have to rewrite the exoskeleton body plan)
[BODY:SMALL_MANDIBLES]
[BP:R_SMAND:right mandible:STP][CONTYPE:HEAD][CATEGORY:CLAW]
[DEFAULT_RELSIZE:50]
[BP:L_SMAND:left mandible:STP][CONTYPE:HEAD][CATEGORY:CLAW]
[DEFAULT_RELSIZE:50]
Only really useful for giant insects ...
[BODY:INSECT_GUTS]
[BP:STOMACH:foregut:STP][CONTYPE:UPPERBODY][INTERNAL][SMALL][CATEGORY:FOREGUT]
[DEFAULT_RELSIZE:400]
[BP:MGUTS:midgut:STP][CONTYPE:LOWERBODY][GUTS][INTERNAL][SMALL][CATEGORY:GUTS]
[DEFAULT_RELSIZE:300]
[BP:HGUTS:hindgut:STP][CONTYPE:LOWERBODY][GUTS][INTERNAL][SMALL][CATEGORY:GUTS]
[DEFAULT_RELSIZE:300]
[BP:TUBULES:malpighian tubules:NP][CONTYPE:LOWERBODY][GUTS][INTERNAL][SMALL][CATEGORY:GUTS]
[DEFAULT_RELSIZE:200] -- Between 2 and 100 of them in an insect
And the end result looks something like this:
Worker
Soldier
Drone
Queen
Size comparison