Author Topic: Problems with armor.tbl  (Read 4103 times)

0 Members and 1 Guest are viewing this topic.

Offline Ratri

  • 24
Problems with armor.tbl
Hi I just wanted to point out a few problems I have with armor.tbl
First of all "Cutoff" function doesn't seem to work with Beam weapons. Just so you don't think I made some error the function works perfectly for missiles, bombs and lasers. I know that Beams apply damage every "few fractions of a second" so I tried bumping up the "+Value" in the calculations up to billions or trillions and still no effect.

Secondly there is a problem with the "Multiplicative" type function.
For example I entered the following in the armor.tbl:
Code: [Select]
#Armor Type

$Name:Energy_field_Sathanas
$Damage Type: Laser
+Calculation: Multiplicative
+Value: 5000
#End
Then I put Laser type damage into the Subach entry and gave the above armor type to the Sathanas.

When I fired the Subach which should now have 5000 times greater effectiveness against Sathans it reduces  3% of the integrity when it should reduce 15% seeing as how Subach has 15 damage times 5000 times two gunpoints equals 150,000 and Sathanas has 1000,000 hitpoints. However the real problem is that every new volley will reduce less and less hitpoints. The damage is dropping exponentially as the hull integrity drops. By the time I get to 5%-10% target hull integrity it takes several dozen shots to drop the hull by even 1%. Finally as I get to 1% the Sathanas no longer takes any damage (I accelerated the time 64 times and no dice).

I used the search but no one has ever brought up these problems.
Are they problems or am I just a newb who can't see the obvious solution? :)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Problems with armor.tbl
Give the Subach the supercap flag or test it on something other than a juggernaut. The 75% damage cut-off for non-supercap weapons used on a supercap ship is probably throwing all your tests off.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
Yes the "supercap" and "huge" flags solved the Multiplicative error I had thanks.
However I still have no idea how to get the Beams to work. It seems that no armor function works with them.
Are beams implemented in armor system yet?
Example:
Code: [Select]
#Armor Type

$Name:Test1
$Damage Type: Beam_cannon
+Calculation: Multiplicative
+Value: 0.0001
#End
It changes nothing. I have LRed and SRed beams fired at Cain class cruiser (shot from Ravana).

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Problems with armor.tbl
And you added the required 'damage type' and 'armor type' lines to the respective ship and weapon classes in ships and weapons table files?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
Yes I did.
Excerpt from Cain:
Code: [Select]
$Hitpoints:                     20000
$Armor Type: Test1
$Flags:                         ( "cruiser" )
Excerpt from Lred and Sred:
Code: [Select]
$Damage:                        600
$Damage Type: Beam_cannon
$Armor Factor:                  1.0
Code: [Select]
$Damage:                        200
$Damage Type: Beam_cannon
$Armor Factor:                  1.0

Like I said I managed to get bombs and lasers to work without a hitch but when I try the same for beams there is no effect.

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
Ran into some additional problems.
How do you define multiple armor types? For example I wrote this into the table:
Code: [Select]
#Armor Type

$Name:Shivan_capital
$Damage Type: Laser
+Calculation: Cutoff
+Value: 80
$Damage Type: Explosive
+Calculation: Cutoff
+Value: 120

$Name:Sathanas_energy_field
$Damage Type: Laser
+Calculation: Cutoff
+Value: 300
$Damage Type: Explosive
+Calculation: Cutoff
+Value: 8000
#End

I get the following error:
Code: [Select]
Error: armor.tbl(line 11:
Error: Missing required token: [#End]. Found [$Name:Sathanas_energy_field]  instead.

File:J:\src\cvs\fs2_open_3_6_9.final\code\Parse\PARSELO.CPP
Line: 659
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
------------------------------------------------------------------
So it would seem I need to put "#Armor Type" and "#End" delimiters around each armor type but if I do that the game doesn't recognize the second armor type. For example I gave the second armor to Cain and "Explosive" type to Helios bombs and the bombs had the same effect on the Cain even though they should've been cut off.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Problems with armor.tbl
Hmmm.. Multiple armor entries work just fine for me... With each entry having separate "#Armor Type" and "#End"
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
Quote
Hmmm.. Multiple armor entries work just fine for me... With each entry having separate "#Armor Type" and "#End"
I figured out the solution: If I put the Damage Type connected to bombs first and then ones connected to lasers and such then everything works.
However I am still unable to get the Beam weapons to pay any attention to the armor types. Have you tried anything with beams and does it work?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Problems with armor.tbl
Hmmm.. Multiple armor entries work just fine for me... With each entry having separate "#Armor Type" and "#End"
... which is now fixed.  It should work the same as all other tables now.  And yes, it is still compatible with the way that you are doing it. :)

I also fixed a localization bug in the same place, though I'm not sure if anyone had actually hit that before.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Problems with armor.tbl
AWESOME!



Though... There seems to be no interaction going on with beams and armor.tbl.. that is nothing happens. Though i couldn't get 'no pierce shields' to work with beams either.. Shots went straight through the shields (though i saw shield effects) and damage was applied on to the hull, even though i had set armor factor to 0 and shield factor to 1  :wtf:. Could be something odd with my test too but i couldnt see anything obvious with a quick glance.

Though the build i was using is pretty old (CVS fs2_open_r_20070228.exe)
Do not meddle in the affairs of coders for they are soggy and hard to light

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Problems with armor.tbl
Though... There seems to be no interaction going on with beams and armor.tbl.. that is nothing happens. Though i couldn't get 'no pierce shields' to work with beams either.. Shots went straight through the shields (though i saw shield effects) and damage was applied on to the hull, even though i had set armor factor to 0 and shield factor to 1  :wtf:. Could be something odd with my test too but i couldnt see anything obvious with a quick glance.
Can you post/PM some test data for me to look at?

I'm tired of dealing with the new multiplayer stuff at the moment, but I'm still in a bug hunting mood, so today is the day to get me fixated on something like this. :D

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
For example:
Code: [Select]
#Armor Type

$Name: Test_armor
$Damage Type: Beam
+Calculation: Multiplicative
+Value: 0.1
#End
or
Code: [Select]
#Armor Type

$Name: Test_armor
$Damage Type: Beam
+Calculation: Multiplicative
+Value: 0.1
#End
And of course
$Damage Type: Beam
and
$Armor Type: Test_armor in whatever beam and ship you want.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Problems with armor.tbl
Here goes.. Simple test setting using 'Howler' named fighter beam. Both Howler and Prometheus R are of 'Beam' damage type. Mission features fighters and containers both with and without armor type and shields (fighters only).

[attachment deleted by admin]
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Problems with armor.tbl
Ok, beam/armor problem fixed.  I'll look at the no-pierce-shields problem later tonight.

Any other armor related bugs that I need to look at while I'm going through that code?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Problems with armor.tbl
Piercing shields problem is now fixed as well.  Also, I disabled beam impact explosions on shield hits, and fixed a bug where damage was applied twice if there was a beam exit.

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
Damn you are fast. :)
As for other bugs I already mentioned it and it's not much of a bug since I found a workaround but still:
If I give $Damage Type: Explosive to missiles and bombs and $Damage Type: Laser to laser turrets and write this into the armor.tbl:
Code: [Select]
#Armor Type
$Name:test
$Damage Type: Laser
+Calculation: Cutoff
+Value: 100
$Damage Type: Explosive
+Calculation: Cutoff
+Value: 10000
#End
now lasers (like Subach etc.) will be cut off and so will small missiles like Rockeye, Harpoon etc. however bombs like Helios will still impart normal damage and not be affected by the armor.tbl.
But if I switch places like so:
Code: [Select]
#Armor Type
$Name:test
$Damage Type: Explosive
+Calculation: Cutoff
+Value: 10000
$Damage Type: Laser
+Calculation: Cutoff
+Value: 100
#End
now everything works as it should be: both lasers, missiles and bombs given the Explosive damage type are cut off. Like I said not much of a bug but still kind of weird.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Problems with armor.tbl
That one was a "freak of nature" bug. :)

Basically the order isn't an issue.  The problem was that you aren't accounting for damage from the shockwave from bombs, which is creating extra damage.  But it did point out a bug, the damage type for weapon shockwaves was getting set to 0 by mistake.  That's why the swapped order worked for you, the shockwave was getting the "Explosive" type in the second case, which zero'd out the damage.  I fixed shockwaves to properly be set to no damage type by default, but you'll need to make sure and give you shockwave for the weapon in question a damage type of it's own (or the same type as it's parent).

So, fixed that one too. :D

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
Great thanks. And all in the same day! :)

 

Offline Ratri

  • 24
Re: Problems with armor.tbl
I was also wondering about something else although I'm not sure this can be solved through armor.tbl.
What about asteroid and debris impact? Could that be controlled so that ships with thicker armor don't get damaged by it so hard?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Problems with armor.tbl
New fields:

asteroid.tbl
Code: [Select]
;;...
$Max Speed:
$Damage type:
$Expl inner rad:
;;...

Note that damage type on debris has no effect at the moment.

ships.tbl
Code: [Select]
;;...
$Show Damage:
$Impact:
   +Damage Type:
$Impact Spew:
$Damage Spew:
$Debris:
   ;;...
   +Damage Type:

Which adds:
1) Asteroid-ship collision armor
2) Ship-ship collision armor
3) Debris-ship collision armor
-C