Body Damage

Overview

Body damage xml files can be found in this folder: GameSDK/Libs/BodyDamage/

Any number of files can be created, usually one per character type is enough. The naming convention is the following: BodyDamage_NameOfCharacter.xml

For example:

  • BodyDamage_AlienGrunt.xml
  • BodyDamage_CryNetOps.xml

These files will be usually edited by game designers. For each of the 'body parts' defined in the corresponding BodyParts_NameOfCharacter.xml, a set of damage multipliers can be provided.

File Contents and Structure

The following is a collapsed version of the body damage setup for the alien grunt. You can compare it with the body parts setup file of the alien grunt, which can be found under the Body Parts section.

<BodyDamage>
  <!--  PART DEFINITIONS IN "BodyParts_AlienGrunt.xml" -->
  <Multipliers>
    <Multiplier part="armor" value="0.75" valueMelee="0.8" valueCollision="0.5" />
    <Multiplier part="armorHead" value="0.25" />
    <Multiplier part="jellyBack" value="3.0" />
    <Multiplier part="jellyBody" value="1.0" >
      <GaussBullet value="5.0" />
      <HeavyBullet value="2.0" />
    </Multiplier>
    <Multiplier part="jellyHead" value="20.0" />
    <Multiplier part="tentacles" value="2.0" />
  </Multipliers>
  <ExplosionMultipliers>
    <LTagGrenade value="1.25" />
    <Rocket value="0.8" />
  </ExplosionMultipliers>
  <ImpulseFilters>
    <ImpulseFilter part="armor" scale="0.0" passTo="Spine1" passOnScale="0.5"/>
    <ImpulseFilter part="jellyBack" scale="1.2" />
    <ImpulseFilter part="jellyBody" scale="1.1" />
    <ImpulseFilter part="tentacles" scale="0.0" passTo="Spine1" passOnScale="0.75"/>
  </ImpulseFilters>
</BodyDamage>

Body Part Damage Multiplier

For each body part, a set of damage multipliers can be added. There is only one which is required and mandatory value, which is used as default damage multiplier for any hit type.

Optionally, other multipliers can be provided:

  • valueMelee to scale damage of melee hits.
  • valueCollision to scale damage of collision hits.
  • A list of Bullet specific hits. For each one, add a new tag with the name of the bullet type (case sensitive), and the corresponding value.

Explosion multipliers

Explosion hits don't apply to any specific body part, but to the whole character. Yet it is possible to define custom damage multipliers per projectile type, to make certain type of explosives more effective than others against certain type of enemies.

To do so, just add the projectile name (case sensitive) and the corresponding value.

If the explosion is generated by a projectile not defined in that list, it will just default to 1, as damage multiplier.

Impulse filters

Impulses applied to specific parts can be scaled or passed to a different bone with its own scale as well. This way for example even when hitting a character in an arm, the impulse can be transferred to the torso to get a consistent effect when hitting the upperbody of the character.

Transferred impulses can have its own scale as well , passOnScale value.