Modding, Mission Design, and Coding > FS2 Open Coding - The Source Code Project (SCP)

Are Capital Ships Immune to EMP?

(1/2) > >>

Erebus Alpha:
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: ---$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

--- End code ---

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


--- Code: ---$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" )

--- End code ---

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?

Nightmare:

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.

Erebus Alpha:
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.

AdmiralRalwood:
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?

Erebus Alpha:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version