Modding:Bodies
Bodies are how the game conceptually organizes creatures, primarily for purposes of equipment slots. Through modding, the body of any creature is completely customizable.
Bodies.xml
The data file for body information is Bodies.xml
. It's organized into three main sections:
bodyparttypes
(or types for short), the core kinds of body parts;bodyparttypevariants
(or variants for short), body part sub-types that are more or less interchangeable with other parts of the same main type;- and
anatomies
, which are actual structures of body parts. These are assigned to objects in ObjectBlueprints.xml.
Caves of Qud provides support for defining custom body part types, variants, and anatomies.
Body part types
Body part types are defined under the <bodypartytypes />
tag in Bodies.xml
. For example, the Head
part type is defined as follows:
<bodies>
<bodyparttypes>
<!-- ... -->
<bodyparttype Type="Head" LimbBlueprintProperty="SeveredHeadBlueprint" LimbBlueprintDefault="GenericHead" Mortal="true" Appendage="true" UsuallyOn="Body" Branching="Lateral,Longitudinal,Vertical,Stratal" ChimeraWeight="3" />
<!-- ... -->
</bodyparttypes>
<!-- Variants and anatomies are defined below -->
<!-- ... -->
</bodies>
A body part type defines a large, abstracted category of features in a creature's anatomy. The Hand
body part type encompasses a human hand, a plant's tendril, and a robotic manipulator; the Face
body part type encompasses a human's face, a fungus's sensory frills, and an ooze's sensory ganglion. In practice, the variant of a body part type affects what kinds of items can be equipped into its resulting inventory slot.
You can mod in your own body part variants by defining your own Bodies.xml
. For example, here is how someone might hypothetically define an Ear
part type:
<bodies>
<bodyparttypes>
<bodyparttype Type="Ear" LimbBlueprintProperty="SeveredEarBlueprint" Appendage="true" UsuallyOn="Head" Branching="Lateral,Longitudinal,Vertical,Stratal" ChimeraWeight="1" />
</bodyparttypes>
</bodies>
Here are the attributes supported by the <bodyparttype>
tag:
Attribute | Description |
---|---|
Abstract | |
Appendage | |
Branching | |
Category | |
ChimeraWeight | Weight affecting the probability that the limb type is selected when generating a new limb via the Chimera morphotype. |
Contact | |
DefaultBehavior | |
Description | |
DescriptionPrefix | |
ImpliedBy | |
ImpliedPer | |
Integral | |
LimbBlueprintProperty | The tag to look for to determine the object blueprint that should be used when this limb is severed. For example, the Hand part type specifies the SeveredHandBlueprint limb blueprint. This is used by robots to define the default hand type they should drop:
<objects>
<!-- ... -->
<object Name="Robot" Inherits="Creature">
<!-- ... -->
<tag Name="SeveredHandBlueprint" Value="RobotHand" />
<!-- ... -->
</object>
<!-- ... -->
</objects>
|
LimbBlueprintDefault | The default blueprint that should be used for a severed version of the limb when one isn't explicitly specified. |
Mobility | |
Mortal | |
Name | The name of the part type. Should be unique. |
NoArmorAveraging | |
Plural | |
UsuallyOn |
Body part type variants
In addition to specifying broad categories of body part types, you can also specify variants. Outside of any properties that you explicitly define for a variant, these are functionally equivalent to their original type.
Here is how Bodies.xml
defines the Tentacle
part type:
<bodies>
<!-- ... -->
<bodyparttypevariants>
<!-- ... -->
<bodyparttypevariant VariantOf="Hand" Type="Tentacle" DefaultBehavior="SoftManipulator" Mobility="1" UsuallyOn="Body" />
<!-- ... -->
</bodyparttypevariants>
<!-- ... -->
</bodies>
VariantOf
specifies the original part type that this variant belongs to; Type
is the unique name of the variant. A type variant can define any of the properties that would normally be defined by a bodyparttype
.