Author Topic: Beams and shields  (Read 1388 times)

0 Members and 1 Guest are viewing this topic.

Offline Zarax

  • 210
Hi,

I know it's possible to set a beam to be able to bypass shields or not via weapons.tbl, but is the opposite possible?
I'd like to make a single ship use a shield capable of absorbing standard beam fire, is there a way to do it?
The Best is Yet to Come

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
You can use the armor/damage type system to allow a weapon to pierce some shields but not others. If you're concerned by the phrasing of "This has the effect of damaging both the shield and hull for a single impact", that actually only matters if the piercing percentage isn't 0 or 100% (or 1.0, rather); with a 100% piercing percentage, no damage will be done to the shields at all.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Zarax

  • 210
I was hoping there was a simpler way than having to mod every single beam in game...
The Best is Yet to Come

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
I was hoping there was a simpler way than having to mod every single beam in game...
Modding every single beam in the game is actually not all that complicated, thanks to the joy of modular tables. All you have to do is make a -wep.tbm file that contains a series of entries for each beam, which needs to consist only of its name and the line "$Damage Type: <blah>".
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Zarax

  • 210
Ok, let's see if I got it right:

1) I have to create a new shield armor type in armor.tbl
2) I have to create a specific damage type to match in weapons.tbl
3) I have to make all beam weapons of that damage type in weapons.tbl
4) I have to give the shield armor type to the ship in ships.tbl

Did I miss any step?
The Best is Yet to Come

 

Offline procdrone

  • Formerly TheHound
  • 29
  • Balance breaker! Thats me!
    • Steam
AdmiralRalwood... hmmm, this is kinda more complicated then I did, but there again, im not as skilled as you.

If you want to give capital ship (this is what I have understood from your post), I just went up to pof file, imported shield model (and made it match the actual model), there, add shield hitpoints to the ships.tbl and make the weapon no-pierce-shield.

Never did that armor thing but I guess this "some pierce, some not" goes strange here.

I know there is something like "surface shields" as well, but I'm clueless how would they work in practice.

I can upload you an example of shielded capital ships and weapons that do not pierce through right away, later.
« Last Edit: August 21, 2015, 05:10:43 am by TheHound »
--Did it! It's RELEASED! VeniceMirror Thread--

 

Offline Zarax

  • 210
I actually use the surface shield flag to make capital ships shielded but in one case I'd like the shield to be able to absorb beam fire.
The Best is Yet to Come