Jump to content
DerelictStudios Forums
Count von Phoib

[ra3] All About Armor Types

Recommended Posts

Armor defines how objects react to different types of weapons. They are fairly easy to make. The data can be found in SageXML\GlobalData\Armor.xml

Each armor has an unique identifier, called 'id'. This identifier is used in an Object's XML.

Example:
CODE
<ArmorTemplate
  id="SovietAntiInfantryVehicleArmor">

is referenced in the SovietAntiInfantryVehicle as
CODE
<ArmorSet
  Armor="SovietAntiInfantryVehicleArmor"
  DamageFX="VehicleDamageFX" />

(The tag DamageFX will be explained in another tutorial, and can be found in SageXML\GlobalData\DamageFX.xml )

In addition to the id, you can specify 3 other tags in the main ArmorTemplate body: Default, SideDamageScalar and RearDamageScalar.
Default details how much damage is taken by all types of warheads, unless otherwise specified. The default value for this is 100. If you want to make a unit invulnerable, you have to use the value 0.
Example:
CODE
<ArmorTemplate
  id="InvulnerableArmor"
  Default="0"/>


The tags SideDamageScalar and RearDamageScalar redefine the damage from the side and rear, respectively. They are percentages, and are set at 100 by default, which means it does not matter from which side a unit is hit, it will take the same amount of damage.
If you want to increase the armor on the sides and rear, then you have to choose a higher number. If you want to decrease the armor on the sides and rear, you have to increase this number.

Example:
CODE
<ArmorTemplate
  id="BaseVehicleArmor"
  SideDamageScalar="105"
  RearDamageScalar="110" />

This example vehicle takes 105% damage from the sides, and 110% damage from the rear.

You can also define the amount of damage for several different types. You define a type, and a percentage of how much damage they take. As with the DamageScalars, a lower number means less damage, a higher number means more damage.

Example:
CODE
  <Armor
  Damage="AUTO_CANNON"
  Percent="90" />


And an example of a complete armor:
CODE
<ArmorTemplate
  id="M1A2Armor"
  SideDamageScalar="105"
  RearDamageScalar="110">

<Armor
  Damage="CANNON"
  Percent="90" />
<Armor
  Damage="AUTO_CANNON"
  Percent="75" />
<Armor
  Damage="FLAK"
  Percent="75" />
<Armor
  Damage="ROCKET"
  Percent="120" />
<Armor
  Damage="EXPLOSIVE"
  Percent="75" />
<Armor
  Damage="GUN"
  Percent="10" />
</ArmorTemplate>

(Please note that, whenever you use an extra Armor tag, you have to close the whole ArmorTemplate with </ArmorTemplate>. You also have to end the last tag of ArmorTemplate with >, not with /> )

You can choose the following Damage types:
CODE
FORCE
CRUSH
SLASH
PIERCE
FLAME
HEALING
UNRESISTABLE
WATER
PENALTY
FALLING
BLAST
REFLECTED
PASSENGER
MAGIC
UNDEFINED
LOGICAL_FIRE
POISON
LASER
PLASMA
FIRE
ROCKET
GUN
CANNON
GRENADE
SNIPER
MINE
TIBERIUM
STORM_SHIELD
MELEE
AUTO_CANNON
IMPACT
EXPLOSIVE
CONCUSSIVE
FLAK

Share this post


Link to post
Share on other sites
You can choose the following Damage types:

FORCE
CRUSH

 

Can armor really save us from that, oh Dark Lord?

Share this post


Link to post
Share on other sites

Really?!

 

*starts coding killakanz personal body armor to defend from Dark Lord's Force Crush attacks...

Share this post


Link to post
Share on other sites

×