Modding:Bodies: Difference between revisions
No edit summary |
Kernelmethod (talk | contribs) Start adding more content to the bodies article |
||
Line 1: | Line 1: | ||
{{Modding Info}}{{stub}} | {{Modding Info}}{{stub}} | ||
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 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 <code>Bodies.xml</code>. It's organized into three main sections: | The data file for body information is <code>Bodies.xml</code>. It's organized into three main sections: | ||
Line 7: | Line 9: | ||
* <code>bodyparttypevariants</code> (or '''variants''' for short), body part sub-types that are more or less interchangeable with other parts of the same main type; | * <code>bodyparttypevariants</code> (or '''variants''' for short), body part sub-types that are more or less interchangeable with other parts of the same main type; | ||
* and <code>anatomies</code>, which are actual structures of body parts. These are assigned to objects in ObjectBlueprints.xml. | * and <code>anatomies</code>, 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 <code><bodypartytypes /></code> tag in <code>Bodies.xml</code>. For example, the <code>Head</code> part type is defined as follows: | |||
<syntaxhighlight lang="xml"> | |||
<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> | |||
</syntaxhighlight> | |||
A body part type defines a large, abstracted category of features in a creature's anatomy. The <code>Hand</code> body part type encompasses a human hand, a plant's tendril, and a robotic manipulator; the <code>Face</code> 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 <code>Bodies.xml</code>. For example, here is how someone might hypothetically define an <code>Ear</code> part type: | |||
<syntaxhighlight lang="xml"> | |||
<bodies> | |||
<bodyparttypes> | |||
<bodyparttype Type="Ear" LimbBlueprintProperty="SeveredEarBlueprint" Appendage="true" UsuallyOn="Head" Branching="Lateral,Longitudinal,Vertical,Stratal" ChimeraWeight="1" /> | |||
</bodyparttypes> | |||
</bodies> | |||
</syntaxhighlight> | |||
Here are the attributes supported by the <code><bodyparttype></code> tag: | |||
{| class="wikitable" | |||
|- | |||
! Attribute | |||
! Description | |||
|- | |||
| Abstract | |||
| | |||
|- | |||
| Appendage | |||
| | |||
|- | |||
| Branching | |||
| | |||
|- | |||
| Category | |||
| | |||
|- | |||
| ChimeraWeight | |||
| Weight affecting the probability that the limb type is selected when generating a new limb via the {{favilink|Chimera}} morphotype. | |||
|- | |||
| Contact | |||
| | |||
|- | |||
| DefaultBehavior | |||
| | |||
|- | |||
| Description | |||
| | |||
|- | |||
| DescriptionPrefix | |||
| | |||
|- | |||
| 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 <code>Hand</code> part type specifies the <code>SeveredHandBlueprint</code> limb blueprint. This is used by robots to define the default hand type they should drop: | |||
<syntaxhighlight lang="xml"> | |||
<objects> | |||
<!-- ... --> | |||
<object Name="Robot" Inherits="Creature"> | |||
<!-- ... --> | |||
<tag Name="SeveredHandBlueprint" Value="RobotHand" /> | |||
<!-- ... --> | |||
</object> | |||
<!-- ... --> | |||
</objects> | |||
</syntaxhighlight> | |||
|- | |||
| 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 | |||
| | |||
|- | |||
|} | |||
{{Modding Navbox}} | {{Modding Navbox}} | ||
[[Category:Modding]] | [[Category:Modding]] |