Difference between revisions of "Armor.tbl"

From FreeSpace Wiki
Jump to: navigation, search
m
m (update)
Line 1: Line 1:
'''''This feature requires SCP'''''<br>
+
{{SCP_table}}
 +
 
 +
Revision information.. <!-- Please update this information when page is updated -->
 +
::'''3.6.x branch:''' 2.336.2.71
 +
::'''3.7 branch:''' 2.425
  
----
 
  
 
The armor table 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, realistically, armor may be damaged less by certain types of weapons. For example, a fire-retardant suit may offer excellent protection against a flamethrower, but virtually none against bullets.<br><br>
 
The armor table 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, realistically, armor may be damaged less by certain types of weapons. For example, a fire-retardant suit may offer excellent protection against a flamethrower, but virtually none against bullets.<br><br>
Line 11: Line 14:
  
 
==Table Options==
 
==Table Options==
 +
  
 
===$Name:===
 
===$Name:===
 
*Defines the name of the used armor type. Same name must be used in the [[ships.tbl]] entry for armor to function.
 
*Defines the name of the used armor type. Same name must be used in the [[ships.tbl]] entry for armor to function.
 +
  
 
===$Damage Type:===
 
===$Damage Type:===
Line 20: Line 25:
 
*Multiple calculation for each of the damage types are possible
 
*Multiple calculation for each of the damage types are possible
 
*Calculations are performed in the listed order
 
*Calculations are performed in the listed order
 +
  
 
====+Calculation:====
 
====+Calculation:====
 
*Defines the used calculation type
 
*Defines the used calculation type
 +
  
 
====+Value:====
 
====+Value:====
 
*Defines the value used for the defined calculation.
 
*Defines the value used for the defined calculation.
 +
  
 
----
 
----
 +
 +
 
===Calculations===
 
===Calculations===
 +
{{Table36|
 
*'''''Additive'''''
 
*'''''Additive'''''
 
**Adds the +'''Value:''' to the damage value
 
**Adds the +'''Value:''' to the damage value
Line 44: Line 55:
 
**If the current damage value is less than the specified amount, the damage value is set to 0 and the calculation series is instantly ended (So no matter what you have afterwards, the weapon will do no damage)
 
**If the current damage value is less than the specified amount, the damage value is set to 0 and the calculation series is instantly ended (So no matter what you have afterwards, the weapon will do no damage)
 
*'''''Instant reverse cutoff'''''
 
*'''''Instant reverse cutoff'''''
**if the current damage value is greater than the specified amount, the damage value is set to 0 and the calculation series is instantly ended.
+
**if the current damage value is greater than the specified amount, the damage value is set to 0 and the calculation series is instantly ended.}}
 +
 
 +
{{Table37|
 +
*'''''Exponential''''' has been replaced with '''''Exponentional'''''}}
 +
 
  
 
== Example ==
 
== Example ==
 
'''''[[armor.tbl]]'''''
 
'''''[[armor.tbl]]'''''
#Armor Type
+
 
$Name: Reflective
+
<pre>
;;This armor is made up of some kind of reflective material,  
+
#Armor Type
;;that deflects 1/4 of the energy from laser weapons back into space.  
+
$Name: Reflective
;;However, it is somewhat more fragile than typical hull materials,
+
;;This armor is made up of some kind of reflective material,  
;;and takes 1/3 more damage from weapons that use physical projectiles.
+
;;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
+
$Damage Type: Laser
+Calculation: Multiplicative
+
  +Calculation: Multiplicative
+Value: 0.75
+
  +Value: 0.75
 
   
 
   
$Damage Type: Kinetic
+
$Damage Type: Kinetic
+Calculation: Multiplicative
+
  +Calculation: Multiplicative
+Value: 1.33
+
  +Value: 1.33
#End
+
#End
 +
</pre>
 +
 
  
 
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.
 
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.
Line 69: Line 88:
  
 
'''''[[ships.tbl]]'''''
 
'''''[[ships.tbl]]'''''
$Hitpoints:            200
+
<pre>
$Armor Type:            Reflective
+
$Hitpoints:            200
$Flags:                ( "player_ship" "fighter" "in tech database")
+
$Armor Type:            Reflective
 +
$Flags:                ( "player_ship" "fighter" "in tech database")
 +
</pre>
 +
 
  
 
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.
 
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.
Line 80: Line 102:
  
 
'''''[[weapons.tbl]]'''''
 
'''''[[weapons.tbl]]'''''
$Damage: 15
+
<pre>
$Damage Type: Laser
+
$Damage: 15
$Armor Factor: 0.9
+
$Damage Type: Laser
 +
$Armor Factor: 0.9
 +
</pre>
 +
 
  
 
Under the Rockeye entry, you would add "$Damage Type" like this:
 
Under the Rockeye entry, you would add "$Damage Type" like this:
  
 
'''''[[weapons.tbl]]'''''
 
'''''[[weapons.tbl]]'''''
$Damage: 45
+
<pre>
$Damage Type: Kinetic
+
$Damage: 45
$Armor Factor: 0.1
+
$Damage Type: Kinetic
 +
$Armor Factor: 0.1
 +
</pre>
 +
 
  
 
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 [[GTW Subach HL-7|Subach HL-7]], 1/3 more damage from the [[GTM MX-64|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.
 
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 [[GTW Subach HL-7|Subach HL-7]], 1/3 more damage from the [[GTM MX-64|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.
  
 
[[Category:Tables]]
 
[[Category:Tables]]

Revision as of 18:18, 28 July 2007

This feature requires FreeSpace Open

Revision information..

3.6.x branch: 2.336.2.71
3.7 branch: 2.425


The armor table 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, realistically, armor may be damaged 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.

General Format

  • Armor table consist of several invidual armor entries
  • Each armor entry begins with #Armor Type and ends with #End

Table Options

$Name:

  • Defines the name of the used armor type. Same name must be used in the ships.tbl entry for armor to function.


$Damage Type:

  • Defines the name for the damage type that is used to define the armor type/damage type pairs. Same name must be used in the weapons.tbl entry for the armor to function.
  • For the armor to have any function calculations must be assigned to each of the used damage types.
  • Multiple calculation for each of the damage types are possible
  • Calculations are performed in the listed order


+Calculation:

  • Defines the used calculation type


+Value:

  • Defines the value used for the defined calculation.




Calculations

FS2 Open, 3.6.x:
  • Additive
    • Adds the +Value: to the damage value
  • Multiplicative
    • Multiplies the damage value with +Value:
  • Exponential
    • Damage value is raised to the power '+Value:'
  • Exponential base
    • +Value: is raised to the power 'damage value'
  • Cutoff
    • If the current damage value is lower than the specified amount, the damage value is set to 0.
  • Reverse cutoff
    • If the current damage value is greater than the specified amount, the damage value is set to 0.
  • Instant cutoff
    • If the current damage value is less than the specified amount, the damage value is set to 0 and the calculation series is instantly ended (So no matter what you have afterwards, the weapon will do no damage)
  • Instant reverse cutoff
    • if the current damage value is greater than the specified amount, the damage value is set to 0 and the calculation series is instantly ended.


FS2 Open, 3.7:
  • Exponential has been replaced with Exponentional


Example

armor.tbl

#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:

ships.tbl

$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.

So, in the interests of time, here's how you would assign the "Laser" damage type to the Subach HL-7, and the "Kinetic" damage type to the Rockeye.

Under the Subach entry, you would add "$Damage Type" like so:

weapons.tbl

$Damage:				15
$Damage Type:				Laser
$Armor Factor:				0.9


Under the Rockeye entry, you would add "$Damage Type" like this:

weapons.tbl

$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.