Author Topic: Armor.tbl- I get no results  (Read 2901 times)

0 Members and 1 Guest are viewing this topic.

Armor.tbl- I get no results
Good morning all


I'm getting started modding freespace 2 (open 3.6.12) and I've hit a bit of a problem using armor.tbl. I tried following the guide but I can't get any armor effects in game.

I know the game is reading the ship and weapon tables just fine because I've added ships and weapons with no problems. I believe the game is successfully reading the armor table because if I deliberately mangle the syntax it gives me an error.

So my question is how is it that the game is reading all of the tables fine but no effects occur? How do I get this working?


Here's some copypasta:
Code: [Select]
armor.tbl
#Armor Type
$Name: Testing
$Damage Type: Laser
   +Calculation: Multiplicative
   +Value: 0.001
$Damage Type: Kinetic
   +Calculation: Multiplicative
   +Value: 1500
#End

GTF Ulysses
$Hitpoints:                     180
$Armor Type:            Testing


Subach HL-7 (should be no damage)
$Damage: 15
$Damage Type:           Laser

Morning Star (should be one hit kill)
$Damage: 7
$Damage Type:           Kinetic


 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Armor.tbl- I get no results
Well, you see, you need to apply the Armor to ships in order to get results. Ships don't get an armor class automatically (Because that would be silly), you have to make alterations to ships.tbl or use the set-armor-type sexp in a mission.

Me no can read. Me sorry. Me get out of way now.
« Last Edit: October 27, 2010, 02:31:28 am by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Armor.tbl- I get no results
Try adding

$Flags:  ( "ignore subsystem armor" )

before the #end in armor.tbl.  If you hit a subsystem the results might not be what you expect.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Armor.tbl- I get no results
Well, you see, you need to apply the Armor to ships in order to get results. Ships don't get an armor class automatically (Because that would be silly), you have to make alterations to ships.tbl or use the set-armor-type sexp in a mission.

E re-read.  He has
GTF Ulysses
$Hitpoints:                     180
$Armor Type:            Testing

Stated. 

Now entire armor, ships, and weapons table entries would be more helpful then just excerpts.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
Re: Armor.tbl- I get no results
I tried adding the flag and then using the set-armor-type sexp  but neither one seems to do anything.

How should I post whole entries- does this forum have like a "spoiler" tag?

 

Offline Shivan Hunter

  • 210
  • FRED needs lambdas!
Re: Armor.tbl- I get no results
Spoiler:
Code: [Select]
Yes.

But apparently you can't nest spoiler and code tags, at least it looks like crap on my end, so just use

Spoiler:
A monospace font like Courier New to paste your tbl data.

Quote my post if you need to see the syntax I'm using.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Armor.tbl- I get no results
Actually, code tags are the preferred format for tbls, as it comes with convenient scrollbars.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Armor.tbl- I get no results
If it's critical that it can't be posted you can always go on the #SCP irc channel and use pastebin. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
Re: Armor.tbl- I get no results
I might as well mention the way I'm testing this- I am giving the Ulysses the armor and going into a simple single mission with it. The only things in the level are one disabled mara with the HL-7 and another one with a morning star.


As long as I'm here thanks E for your reply in the "Null Moment of inertia" thread. That was very helpful for me.

Ulysses ship entry:
Code: [Select]
$Name:                          GTF Ulysses
$Short name:            TFight
$Species:                       Terran
+Type:                          XSTR("Space Superiority", 2939)
+Maneuverability:       XSTR("Excellent", 2940)
+Armor:                         XSTR("Light", 2941)
+Manufacturer:          XSTR("Triton / Mekhu", 2942)
+Description: XSTR( " ", 2943)
$end_multi_text
+Tech Description:
XSTR("Affectionately nicknamed 'The Bat' by its pilots, the GTF Ulysses is a well-designed craft that has had a far longer useful life than its engineers ever imagined. Developed jointly by Terran and Vasudan contractors, the Ulysses was first deployed near the end of the Great War. Its excellent maneuverability and high top speed give it an agility that pilots love, but at a cost of thin armor and a small secondary weapon loadout. The Ulysses is a better choice for offensive missions than defensive ones.", 2944)
$end_multi_text
+Length:          16 m
+Gun Mounts:      4
+Missile Banks:   1
$POF file:                      fighter01.pof
$Detail distance:       (0, 80, 300, 900)
; $ND: 42 42 244
$Show damage:           YES
$Density:                       1
$Damp:                          0.5 ;was 0.1
$Rotdamp:                       0.35
$Max Velocity:          70.0, 70.0, 140.0     ; 0 0 70             ;; in x/y/z -- z only specified forward.  use special tokens for backward movement
$Rotation time:         3.0, 2.6, 5.0
$Rear Velocity:         50.0 ;was 0
$Forward accel:         2.0 ;2.0
$Forward decel:         1.5 ;1.5
$Slide accel:           2.0 ; was 0
$Slide decel:           1.5 ; was 0
;;$Glide: YES
$Expl inner rad:        25.0
$Expl outer rad:        55.0
$Expl damage:           15.0
$Expl blast:            1000.0
$Expl Propagates:       NO                                                      ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed:       0.0                                             ;; speed shockwave expands at, 0 means no shockwave
$Allowed PBanks:        ( "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" "Targeting Laser" "Redeemer" "Maul")
$Allowed Dogfight PBanks:        ( "Subach HL-D" "Prometheus D" )
$Default PBanks:        ( "Subach HL-7" "Prometheus R" )
$PBank Capacity: ( 400, 400 )
$Allowed SBanks:        ( "Rockeye" "Tempest"  "Hornet" "Tornado" "Hornet#Weak" "Harpoon" "Harpoon#Weak" "EMP Adv." "TAG-A" "Judgment Day" )
$Allowed Dogfight SBanks:    ( "Tempest D"  "Hornet D" "Harpoon D" )
$Default SBanks:        ( "Harpoon" )
$SBank Capacity:        ( 40 ) ;40
$Shields:                       380
$Shield Color: 100 100 255
$Power Output:          2.0
$Max Oclk Speed:        94.0
$Max Weapon Eng:        80.0
$Hitpoints:                     180
$Armor Type:          Testing
$Flags:                         ( "player_ship" "default_player_ship" "fighter" "in tech database" )
$AI Class:                      Captain
$Afterburner:           YES
+Aburn Max Vel: 0.0, 0.0, 150.0
+Aburn For accel:       0.7
+Aburn Fuel:            300.0
+Aburn Burn Rate:       50.0
+Aburn Rec Rate:        25.0
$Countermeasures:       25
$Scan time:                     2000
$EngineSnd:       128                   ;; Engine sound of ship
$Closeup_pos:           0.0, 0.0, -22
$Closeup_zoom:          0.5
$Shield_icon:           shield-f01
$Ship_icon:                     iconfighter01
$Ship_anim:                     ssfighter01
$Ship_overhead: loadfighter01
$Score:             8
$Trail:
+Offset: -7.75 -2.8 0.75
+Start Width: 0.25
+End Width: 0.05
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 1.0
+Spew Time: 60
+Bitmap: Contrail01
$Trail:
+Offset: 7.75 -2.8 0.75
+Start Width: 0.25
+End Width: 0.05
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 1.0
+Spew Time: 60
+Bitmap: Contrail01
$Subsystem:                     communication,  10, 0
$Subsystem:                     navigation,             10, 0
$Subsystem:                     weapons,                        20, 0
$Subsystem:                     sensors,                        10, 0
$Subsystem:                     engines,                        35, 0


Complete armor.tbl:
Code: [Select]
#Armor Type
$Name: Testing
$Damage Type: Laser
   +Calculation: Multiplicative
   +Value: 0.001
$Damage Type: Kinetic
   +Calculation: Multiplicative
   +Value: 1500
$Flags:  ( "ignore subsystem armor" )
#End

HL-7 weapon entry:
Code: [Select]
$Name:                                  @Subach HL-7
+Title:                                 XSTR("GTW Subach HL-7", 3243)
+Description:
XSTR(
"Standard Issue
Level 3 Hull Damage
Level 2 Shield Damage", 3244)
$end_multi_text
+Tech Title:     XSTR("Subach HL-7", 146)
+Tech Anim:                     Tech_Subach_HL-7
+Tech Description:
XSTR(
"The Subach-Innes HL-7 is a xaser weapon, firing an intense, highly focused beam of x-ray emissions. Until the Shivans appeared with their shield technology, these weapons were considered an unnecessary and costly extravagance. But Great War dogfights against Shivan craft quickly taught the Allies that their ships didn't stand a chance unless they could punch through shields. The HL-7 works superbly against shields of all varieties and has become the standard issue Primary weapon for all Terran fighters and bombers.", 3245)
$end_multi_text
$Model File: none
; The following fields (preceded by @) are only required for laser
; rendering, which requires that "Model File:" be none.
; These are the same values that used to be hard-coded:
@Laser Bitmap: newglo9
@Laser Glow: 2_laserglow03
@Laser Color: 250, 0, 0
@Laser Color2: 0, 0, 250
@Laser Length: 10.0
@Laser Head Radius: 0.90
@Laser Tail Radius: 0.90
$Mass: 0.2
$Velocity: 450.0 ;; speed of the weapon (initially) -- may or may not change
$Fire Wait: 0.2 ;; in seconds
$Damage: 15
$Damage Type:        Laser
$Armor Factor: 0.9
$Shield Factor: 0.7
$Subsystem Factor: 0.3
$Lifetime: 2.0 ;; How long this thing lives
$Energy Consumed: 0.20 ;; Energy used when fired
$Cargo Size: 0.0 ;; Amount of space taken up in weapon cargo
$Homing: NO
$LaunchSnd: 76 ;; The sound it makes when fired
$ImpactSnd: 85 ;; The sound it makes when it hits something
+Weapon Range: 100000 ;; Limit to range at which weapon will actively target object
$Flags: ("in tech database" "player allowed" "stream")
$Icon: iconSD4
$Anim: SD4
$Impact Explosion: none



Morning Star entry:
Code: [Select]
$Name:                                  @Morning Star
+Title:                                 XSTR("GTW ML-70 Morning Star", 3262)
+Description:
XSTR(
"Long-Range Tactical
Kinetic Weapon
", 3263)
$end_multi_text
+Tech Title:     XSTR("GTW ML-70 Morning Star", 3264)
+Tech Anim:     Tech_GTW_ML-70
+Tech Description:
XSTR(
"The GTW ML-70 Morning Star improves upon the performance of the Flail gun, which was developed during the Great War. The original Flail was  too expensive to mass produce, because of its limited usage/effectiveness profile. Recent advances in high-temperature optics enable the main focusing chamber of the Morning Star to produce a much more coherent beam, increasing its range and damage levels. This comes at the expense of somewhat higher energy requirements, however.", 3265)
$end_multi_text
$Model File: none
@Laser Bitmap: newglo3
@Laser Glow:    2_laserglow03
@Laser Color:    120, 120, 30
@Laser Color2:    120, 120, 30
@Laser Length: 3.0
@Laser Head Radius: 1.0
@Laser Tail Radius: 1.0
$Mass: 1.5
$Velocity: 1000.0 ;; speed of the weapon (initially) -- may or may not change
$Fire Wait: 0.15 ;; in seconds
$Damage: 7
$Damage Type:          Kinetic
$Armor Factor: 0.5
$Shield Factor: 1.3
$Subsystem Factor: 0.2
$Lifetime: 2.0 ;; How long this thing lives
$Energy Consumed: 0.8 ;; Energy used when fired
$Cargo Size: 0.0 ;; Amount of space taken up in weapon cargo
$Homing: NO
$LaunchSnd: 78                               ;; The sound it makes when fired
$ImpactSnd: 85                               ;; The sound it makes when it hits something
$Flags:                                ( "player allowed" "stream")
$Icon:                                 iconflail
$Anim:                                 Flail2
$Impact Explosion: none


 

Offline Qent

  • 29
Re: Armor.tbl- I get no results
MediaVPs conflicting maybe? Try it without them.

 
Re: Armor.tbl- I get no results
That did the trick- now it's working 100%.


I should have been testing it without any mods loaded all this time but I figured it would be fine to use just mediavps because in the ship table in assets.vb there was no ulysses entry. Of course it turns out it was incorrect for me to make the assumption that there wouldn't be more ship entries in the other vb files. In MV_Effects.vb (which I figured would only contain graphical stuff) it turns out there is a ships table with this:

$Name:      GTF Ulysses
+nocreate
$Armor Type:            LightArmor     <--- I assume this is the conflict
   $Trails:
      +Bitmap:      ABTrail
      +Width:         1.0
      +Alpha:         1.0
      +Life:         1

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Armor.tbl- I get no results
Yes. The BP beam piercing effects that went into the 3.6.12 MediaVPs use armor types to tell the engine how to handle beam piercing and weapon overpenetration; as a result the MVPs now define armor classes for all ships but they don't actually alter the damage. This should go in a FAQ somewhere.

 

Offline Qent

  • 29
Re: Armor.tbl- I get no results
I'm pretty sure your mod's TBMs should override MediaVP TBMs though, so just use TBMs instead of TBLs and you should be okay. Just that you'll have to copy stuff from the MediaVPs into your armor entries if you want the pretty piercing effects.

 
Re: Armor.tbl- I get no results
I haven't tried setting up a proper mod yet;  I hope it won't be too much work to use the mediavps stuff.


Now I just need to figure out a way to test if the AI can use "sliding" or if it can only do forward/back and turning. Being able to thrust up/down or left/right is extremely useful for avoiding enemy fire while taking out turrets but it might be unfair to let the player do it if the computer can't.

  

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Armor.tbl- I get no results
I haven't tried setting up a proper mod yet;  I hope it won't be too much work to use the mediavps stuff.

Now I just need to figure out a way to test if the AI can use "sliding" or if it can only do forward/back and turning. Being able to thrust up/down or left/right is extremely useful for avoiding enemy fire while taking out turrets but it might be unfair to let the player do it if the computer can't.

The AI absolutely can use sliding, thanks to Mr. Sushi! Features like this are indispensable for mods like Diaspora.

(It could even do so in retail to a degree.)