Modding:Bodies: Difference between revisions

Add section on body part type variants
Add section on anatomies
Line 31: Line 31:
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.
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:
You can mod in your own body part variants by defining your own <code>Bodies.xml</code>. Here are the attributes supported by the <code><bodyparttype></code> tag:
 
<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"
{| class="wikitable"
Line 140: Line 130:


<code>VariantOf</code> specifies the original part type that this variant belongs to; <code>Type</code> is the unique name of the variant. A type variant can define any of the properties that would normally be defined by a <code>bodyparttype</code>.
<code>VariantOf</code> specifies the original part type that this variant belongs to; <code>Type</code> is the unique name of the variant. A type variant can define any of the properties that would normally be defined by a <code>bodyparttype</code>.
== Anatomies ==
An <code>anatomy</code> is a collection of body parts. An anatomy is defined in XML as a nested collection of <code><part></code> tags. As an example, here is the default anatomy of a bird:
<syntaxhighlight lang="xml">
<bodies>
  <!-- ... -->
  <anatomies>
    <!-- ... -->
    <anatomy Name="Bird">
      <part Type="Head">
        <part Type="Face" DefaultBehavior="Beak" />
      </part>
      <part Type="Back" />
      <part Type="Foot" Laterality="Right" SupportsDependent="Feet" />
      <part Type="Foot" Laterality="Left" SupportsDependent="Feet" />
      <part Type="Missile Weapon" Laterality="Right" />
      <part Type="Missile Weapon" Laterality="Left" />
      <part Type="Feet" DependsOn="Feet" />
      <part Type="Tail" />
    </anatomy>
    <!-- ... -->
  </anatomies>
</bodies>
</syntaxhighlight>
The <code>anatomy</code> tag supports the following attributes:
{| class="wikitable"
|-
! Attribute
! Description
|-
| BodyCategory
|
|-
| BodyMobility
|
|-
| BodyType
| The type of <code>Body</code> (the body part type) that should be used for the creature. You can use this to replace the default <code>Body</code> slot for a creature with a custom type variant.
|-
| Category
|
|-
| FloatingNearby
| The type of <code>FloatingNearby</code> body part type that should be used for the creature. This allows you to use a type variant for floating nearby slots.
|-
| ThrownWeapon
| The type of <code>Thrown Weapon</code> body part type that should be used for the creature. This allows you to use a type variant for thrown weapon slots. For example, the <code>BipedalRobot</code> anatomy adds a thrown weapon slot using a <code>Middle Hardpoint</code>:
<syntaxhighlight lang="xml">
<anatomy Name="BipedalRobot" Category="Mechanical" ThrownWeapon="Middle Hardpoint">
  <part Type="Control Unit">
    <part Type="Sensor Array" />
  </part>
  <part Type="Chassis" />
  <part Type="Hardpoint" Laterality="Right" />
  <part Type="Hardpoint" Laterality="Left" />
  <part Type="Feet" />
</anatomy>
</syntaxhighlight>
|}
Meanwhile, the <code><part></code> tag in <code>Bodies.xml</code> supports:
{| class="wikitable"
|-
! Attribute
! Description
|-
| Abstract
|
|-
| Category
|
|-
| Contact
|
|-
| DefaultBehavior
|
|-
| DependsOn
|
|-
| Extrinsic
|
|-
| IgnorePosition
|
|-
| Integral
|
|-
| Laterality
|
|-
| Mass
|
|-
| Mobility
|
|-
| Mortal
|
|-
| Plural
|
|-
| RequiresLaterality
|
|-
| RequiresType
|
|-
| SupportsDependent
|
|-
| Type
| The name of the body part type or type variant that should be added (for example: <code>Hand</code>, <code>Smooth Face</code>, etc.)
|}


{{Modding Navbox}}
{{Modding Navbox}}
[[Category:Modding]]
[[Category:Modding]]