|This feature requires SCP|
- FSO Revision: 8629
|List of Tables and related code files|
|* Notes Modular Tables|
|** Notes tables which only use modular tables|
The armor.tbl stores data on FS2's as-of-now-simplistic armor system. It lets you define different damage types per armor. The reason for defining different damage types per armor is that armor may be damaged more/less by certain types of weapons. For example, a fire-retardant suit may offer excellent protection against a flamethrower but virtually none against bullets.
It's important to note that the cumbersome +Calculation/+Value system used for defining calculations will, in the future, be deprecated in favor of a more efficient scripting system. However, the current system will be kept for backwards compatibility if any mods or campaigns choose to make use of the table.
Please note that the spelling armour.tbl is currently not supported.
This table is one of the Modular Tables and can be extended with xxx-amr.tbm
- 1 #Armor Type
- 2 #End
- 3 List of Calculations
- 4 Example
Each armor entry begins with #Armor Type and ends with #End. There may be multiple entries in armor.tbl.
Defines the name of the armor type. The same name must be used in the $Armor Type entry in order for that ship to use the armor type. Note that Shields may also have an armor type as designated by $Shield Armor Type
- Syntax: String
Defines the name for the damage type that is used for the armor type/damage type pairs.
- The same name must be used in the $Damage Type entry (for all weapons that have this damage type) so that the armor can be applied against that particular damage type.
- Each $Damage Type entry must have at least one +Calculation entry
- Syntax:String, name of the damage type
Defines the used calculation type.
- Calculations per damage types are possible
- Calculations are performed in the order they are defined in the armor.tbl (and -amr.tbm's)
- Syntax:String, name of the calculation type
- Valid strings: see List of Calculations
Defines the value used for the defined calculation.
- Syntax: Float
+Shield Piercing Percentage:
+Weapon Piercing Effect Start Limit:
+Weapon Piercing Type:
+Difficulty Scale Type:
Each #Armor Type section must end with #End, no exceptions.
List of Calculations
The following is a list of valid strings to be used with +Calculation.
- Adds +Value to the the current damage value
- Multiplies the the current damage value by +Value
- Raises the current damage value to the power of +Value
- exponential base
- Raises +Value to the power of the current damage value
- If the current damage value is less than +Value, then the resulting damage value is 0.
- reverse cutoff
- If the current damage value is greater than +Value, then the resulting damage value is 0.
- instant cutoff
- If the current damage value is less than the specified amount, then the resulting damage value is set to 0 and the engine ignores all following calculations
- instant reverse cutoff
- If the current damage value is greater than the specified amount, then the resulting damage value is set to 0 and the engine ignores all following calculations.
#Armor Type $Name: Reflective ;;This armor is made up of some kind of reflective material, ;;that deflects 1/4 of the energy from laser weapons back into space. ;;However, it is somewhat more fragile than typical hull materials, ;;and takes 1/3 more damage from weapons that use physical projectiles. $Damage Type: Laser +Calculation: Multiplicative +Value: 0.75 $Damage Type: Kinetic +Calculation: Multiplicative +Value: 1.33 #End
As you can see above, "Reflective" armor is dealt only 75% of the damage from laser weapons, but 133% of the damage from kinetic weapons. However, in order to activate the armor system, you must assign the armor type to the ships you want it to apply to, and damage types to the weapons you wish to use.
The Thoth fighter seems like a good choice for this armor. Its speed and maneuverability give it the ability to evade missiles, and many direct-fire weapons are energy based. So, to give it this armor, you would add "$Armor Type:" to ships.tbl, under the "Thoth" entry:
$Hitpoints: 200 $Armor Type: Reflective $Flags: ( "player_ship" "fighter" "in tech database")
At this point, the Thoth will be equipped with Reflective armor. However, it will have no effect unlesss it is hit by a weapon with a "$Damage Type" that is defined in armor.tbl, under the "Reflective" armor entry. Otherwise, Freespace 2 would have no idea how to take into account the defined damage types.
Under the Subach entry, you would add "$Damage Type" like so:
$Damage: 15 $Damage Type: Laser $Armor Factor: 0.9
Under the Rockeye entry, you would add "$Damage Type" like this:
$Damage: 45 $Damage Type: Kinetic $Armor Factor: 0.1
Now, if you were to start FreeSpace 2 with these modifications, you would find that the Thoth would take 3/4 as much damage from the Subach HL-7, 1/3 more damage from the Rockeye, but normal damage from everything else. All other ships, not being equipped with any kind of armor, would also be dealt normal damage from all weapons, including the Rockeye and the Subach.