Author Topic: Are Capital Ships Immune to EMP?  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

Are Capital Ships Immune to EMP?
This is part B of a post I made in the FREDing forum: https://www.hard-light.net/forums/index.php?topic=94760.new#new

I am using FRED to generate this projectile:

Code: [Select]
$Name: MG-EMP
$Model File: none
$Velocity: 10000
$Fire Wait: 1
$Damage: 1
$Damage Type: HugeWeapon
$Blast Force: 2000.0
$Inner Radius: 50.0
$Outer Radius: 100.0
$Shockwave Speed: 80
$Shockwave name:        shockwave01
$Armor Factor: 1
$Shield Factor: 1
$Subsystem Factor: 0
$Lifetime: 0.5
$Energy Consumed: 0.0
$Flags: ( "EMP" )
$Trail:
+Start Width: 100
+End Width: 100
+Start Alpha: 1
+End Alpha: 0
+Max Life: 10
+Bitmap: MissileTrail101

$EMP Intensity: 375.0
$EMP Time:                             3.0

...and point it at this player-flyable capship:

Code: [Select]
$Name: GTCv Bellerophon#Player
$Short name: TCov3cP
$Species: GTVA-TEI
$POF file: corvette3t-03-p.pof
$Detail distance: (0, 4500)
$Density: 1
$Damp: 0.2
$Rotdamp: 0.6
$Max Velocity: 0.0, 0.0, 30.0
$Rotation time: 30.0, 30.0, 30.0
$Rear Velocity: 0.0
$Forward accel: 15
$Forward decel: 10
$Slide accel: 0.0
$Slide decel: 0.0
$Glide: Yes
+Dynamic Glide Cap: true
$Autoaim FOV: 10
+Converging Autoaim
$Convergence:
+Automatic
$Warpin Speed: 120
$Warpout Speed: 120
$Expl inner rad: 75.0
$Expl outer rad: 750.0
$Expl damage: 500.0
$Expl blast: 1300.0
$Expl Propagates: YES
$Shockwave Speed: 190.0
$Shockwave Count: 3

$Allowed PBanks: ( "Ice Queen") ("Aurora Wake") ("Hellstar" )
$Allowed Dogfight PBanks: ( "Ice Queen") ("Aurora Wake") ("Hellstar" )
$Default PBanks: ( "Ice Queen" "Aurora Wake" "Hellstar" )
$Allowed SBanks: ( "Supernova#MG") ("Eos SSM") ("Treb LRM")
$Allowed Dogfight SBanks: ( "Supernova#MG") ("Eos SSM") ("Treb LRM")
$Default SBanks: ( "Supernova#MG" "Eos SSM" "Treb LRM" )
$SBank Capacity: ( 800, 800, 800)

$Shields: 0
$Power Output: 1.0
$Weapon Regeneration Rate: 0.004
$Max Oclk Speed: 50.0
$Max Weapon Eng: 1500.0
$Hitpoints: 45000
$Subsystem Repair Rate: 0.5
$Armor Type: Heavy Armor 100
$Flags: ( "corvette" "big damage" "player_ship" "show ship" "no primary linking" "no pain flash" )
$AI Class: Captain
$Countermeasure Type: MGFlare
$Countermeasures: 10
$Scan time: 2000
$EngineSnd: 128
$Closeup_pos: 0.0, -25, -1050
$Closeup_zoom: 0.5
$Score: 40
$Subsystem: engines, 15, 0
$Engine Wash: Default300
$Subsystem: navigation, 7.5, 0
$Subsystem: communications, 5, 0
$Subsystem: sensors, 7.5, 0
$Subsystem: weapons, 7.5, 0
$Subsystem: turret04, 3.4, 3.0
$Alt Subsystem Name: Light Pulse
$Default PBanks: ( "STerPulse" )
$Turret Base RotationSnd: 254
$Turret Gun RotationSnd: 255
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "reset when idle" "carry no damage" "carry shockwave" "fire on target" "only target if can fire" "target requires fov" )
$animation: triggered
$type: initial
+relative_angle: 90, 0, 0
$Subsystem: turret05, 3.4, 3.0
$Alt Subsystem Name: Light Pulse
$Default PBanks: ( "STerPulse" )
$Turret Base RotationSnd: 254
$Turret Gun RotationSnd: 255
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "reset when idle" "carry no damage" "carry shockwave" "fire on target" "only target if can fire" "target requires fov" )
$animation: triggered
$type: initial
+relative_angle: 90, 0, 0
$Subsystem: turret06, 3.4, 3.0
$Alt Subsystem Name: Light Pulse
$Default PBanks: ( "STerPulse" )
$Turret Base RotationSnd: 254
$Turret Gun RotationSnd: 255
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "reset when idle" "carry no damage" "carry shockwave" "fire on target" "only target if can fire" "target requires fov" )
$animation: triggered
$type: initial
+relative_angle: 90, 0, 0
$Subsystem: turret07, 3.4, 3.0
$Alt Subsystem Name: Light Pulse
$Default PBanks: ( "STerPulse" )
$Turret Base RotationSnd: 254
$Turret Gun RotationSnd: 255
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "reset when idle" "carry no damage" "carry shockwave" "fire on target" "only target if can fire" "target requires fov" )
$animation: triggered
$type: initial
+relative_angle: 90, 180, 0
$Subsystem: turret08, 3.4, 3.0
$Alt Subsystem Name: Light Pulse
$Default PBanks: ( "STerPulse" )
$Turret Base RotationSnd: 254
$Turret Gun RotationSnd: 255
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "reset when idle" "carry no damage" "carry shockwave" "fire on target" "only target if can fire" "target requires fov" )
$animation: triggered
$type: initial
+relative_angle: 90, 180, 0
$Subsystem: turret09, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret10, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret11, 1.5, 20.0
$Alt Subsystem Name: AAA Beam
$Default PBanks: ( "AAAf" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret12, 1.5, 20.0
$Alt Subsystem Name: AAA Beam
$Default PBanks: ( "AAAf" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret13, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret14, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret15, 1.5, 20.0
$Alt Subsystem Name: AAA Beam
$Default PBanks: ( "AAAf" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret16, 1.5, 20.0
$Alt Subsystem Name: AAA Beam
$Default PBanks: ( "AAAf" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret17, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret18, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret19, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret20, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret21, 1.5, 20.0
$Alt Subsystem Name: AAA Beam
$Default PBanks: ( "AAAf" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret22, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret23, 1.5, 20.0
$Default PBanks: ( "Terran Turret 2" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )
$Subsystem: turret24, 1.5, 20.0
$Alt Subsystem Name: AAA Beam
$Default PBanks: ( "AAAf" )
$Flags: ( "check hull" "only target if can fire" "target requires fov" )

For testing purposes, I put a grey trail on the 'missile' that FRED is generating, so that I can visually confirm that it's hitting my ship. It's also properly doing damage (It takes me from full hull integrity to 99%), and I get the 'blast' warning upon impact:



Is there a workaround to make EMP weapons inflict EMP effects against capital ships? Or did I make an error and miss some important detail necessary to go and EMP myself?
« Last Edit: May 16, 2018, 06:00:46 pm by Erebus Alpha »
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383

 

Online Nightmare

  • 210
Re: Are Capital Ships Immune to EMP?

EMP intensity too low? Enter something really high for testing, to see if it works.


If that doesn't work, change the flags of the ship from Corvette to Cruiser and (test wise) bomber/fighter - this might create errors on its own, but you'll be able to identify the problem.
« Last Edit: May 16, 2018, 05:10:02 pm by Nightmare »

 
Re: Are Capital Ships Immune to EMP?
Switching the "corvette" flag to "fighter" and removing the "big damage" flag had no effect.

EDIT:

I tried removing the "no pain flash" flag as well. Still no EMP.

ANOTHER EDIT:

Adding "same emp time for capships" flag to the weapon did not help either.
« Last Edit: May 16, 2018, 05:33:30 pm by Erebus Alpha »
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Are Capital Ships Immune to EMP?
EMP only affects capital ship turrets; you'll need a different solution (or to make a feature request).

Although not working with the "corvette" flag changed to "fighter" is very odd; that's the only thing that should've been keeping EMP effect from applying to the cockpit.

EDIT: Try bumping the inner/outer radius so that it definitely envelops the whole ship?
« Last Edit: May 18, 2018, 05:47:43 pm by AdmiralRalwood »
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.

 
Re: Are Capital Ships Immune to EMP?
I was able to successfully EMP myself by both setting the "corvette" flag to "fighter" and setting the blast radius high enough that the whole ship gets engulfed in EMP.

Unfortunately this isn't the workaround I require, for two reasons:

1: The AI might not figure out that they are supposed to use bombs on the player
2: Although getting EMPed looks really cool on the HUD, it also screws up all the dialogue.

I'm going to try breaking the player's sensor subsystem with SEXP's to simulate the effect I require in-mission.
« Last Edit: May 21, 2018, 11:17:17 pm by Erebus Alpha »
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383

 
Re: Are Capital Ships Immune to EMP?
Have you tried using the electronics flag? It leaves your messages and HUD mostly unaffected but can disable or disarm you depending on your weapons settings.
AKA [`_`]
Inferno: It's the I in Inferno / It's the beam spam delight / Risin' up to a shock jump arrivaaaaaal
Between The Ashes: Look just a really cool and neat thing, OK?
The Last Stand: A very episodic capship command mini-campaign
Dimesional Eclipse: An experiment gone horribly right
Breakthrough: A pretty standard but not really capship command mission

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Are Capital Ships Immune to EMP?
alternatively, we could probably add a new feature to the codebase for something "EMP-like" that doesn't screw up communications, so dialogue remains clear
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.

 
Re: Are Capital Ships Immune to EMP?
I decided to use SEXP's to set the player's sensor subsystem health to 10, when the necessary conditions were met, instead of generating a weapon. With sensors at 10%, you can sometimes manage to target stuff, but not for very long. And it nicely breaks missile lock.

But if you guys could make EMP that doesn't screw up dialogue, that would be awesome! And I would absolutely use that new feature! The only thing I would have to do in my missions is change the set-subsystem-health SEXP or whatever, back to generate-weapon.
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383