Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Mad Bomber on April 11, 2015, 11:51:54 pm

Title: Weapon causes CTD
Post by: Mad Bomber on April 11, 2015, 11:51:54 pm
Alright, this is driving me to distraction. :banghead:

I've been trying to get this one weapon to work, but it causes CTD about 25% of the time when it hits a target, and I can't figure out why.

I'ma go over the model again (it's literally a resized/reskinned FS1 Fury because it's a dead ringer), but here's the table. Maybe there's something I'm missing.

Code: [Select]
$Name:                                 Hunter CSM
+Title:                                XSTR("Hunter Long-Range Rocket", -1)
+Description:
XSTR(
"Heavy Guided Rocket
3375m Range, Fission Type
Gun-Type Fission Warhead
Suitable for Anti-Bomber
", -1)
$end_multi_text
+Tech Title:    XSTR("Hunter Long-Range Rocket", -1)
+Tech Anim:    Tech_Cyclops
+Tech Description:
XSTR(
"Though the Hunter lacks some of the raw damage of the Decimator, the addition of an IFF-based homing unit allows it to be used effectively against smaller or slower targets, like bombers. Due to the simplicity of its manufacture, it's also used as a long-range torpedo by Star League and independent capital ships.", -1)
$end_multi_text
;; The Emalgha also get a hold of these after --REDACTED--
;; Some League ships (Heirophant, Repten, etc) are built to spam these en masse to overwhelm point defense
;; many Hunter warheads are recycled nukes from as early as the 1950s, keeping costs quite low
$Model File:                    EVO_Hunter.pof
$Mass:                                  50.0
$Velocity:                              225.0
$Fire Wait:                             10.0
$Damage:                                800                                    ;; damage applied when within inner radius
$Damage Type: Explosive
$Blast Force:                   650.0
$Inner Radius:                  25.0                                     ;; radius at which damage is full (0 for impact only)
$Outer Radius:                  50.0                                    ;; max radius for attenuated damage (0 for impact only)
$Shockwave Speed:               80                                              ;; velocity of shockwave.  0 for none.
$Armor Factor:                  1.2
$Shield Factor:                 1.0
$Subsystem Factor:              1.0
$Lifetime:                              15.0                    ;; temporary fix for problem locking onto big ships.
$Energy Consumed:               0.0
$Cargo Size:                    15.0
$Homing: YES
+Type: HEAT
+Turn Time: 2.0
+View Cone: 60.0
$LaunchSnd:                             86 ;;EVO Rocket sound
$ImpactSnd:          88
$FlyBySnd:                              -1
$Rearm Rate:                    0.05
$Flags:                                 ("player allowed" "Bomb" "Huge" )
$Trail:                                                                              ;; Trail cannot be set if Exhaust is set
+Start Width:            2.5                                             ;; Width of trail nearest missile
+End Width:            1.75                                            ;; Width of trail before it "evaporates"
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life:                          1.5
+Bitmap:                        MissileTrail05
$Icon:                                  iconmissile11
$Anim:                                  LoadMissile09
$Impact Explosion:     expmissilehit1
$Impact Explosion Radius:     35.0
Title: Re: Weapon causes CTD
Post by: procdrone on April 12, 2015, 01:44:30 am
Check if your missile model is not there, or has a different name in the first place.

If its all correct, check out the mission with debug build... I'd believe that there is something messed up with the model to crash the game.
Title: Re: Weapon causes CTD
Post by: The E on April 12, 2015, 03:11:19 am
Yeah, running this thing through debug is something you should do.
Title: Re: Weapon causes CTD
Post by: NeonShivan on April 12, 2015, 07:45:35 am
"Gun-Type Fission Warhead"

Define what you mean by this? Are you trying to use this as a primary or secondary (dumb question but it never hurts to ask)
Title: Re: Weapon causes CTD
Post by: xenocartographer on April 12, 2015, 08:00:23 am
"Gun-Type Fission Warhead"

Define what you mean by this? Are you trying to use this as a primary or secondary (dumb question but it never hurts to ask)

Pretty sure that's referring to the method of detonation. A "gun-type" weapon works by shooting one subcritical piece of fissile material into another, bringing the combination above critical mass. Iirc, the "Little Boy" bomb was an example. (Another approach involves compressing a piece of fissile material to make it more dense - "critical mass" is a bit of a misnomer because it varies depending on other factors, including density.)
Title: Re: Weapon causes CTD
Post by: NeonShivan on April 12, 2015, 09:16:56 am
Ah, never heard of that (surprisingly)
Title: Re: Weapon causes CTD
Post by: Mad Bomber on April 16, 2015, 07:33:19 am
Interestingly, I seem to have solved the problem by messing with the names of the submodels in PCS.  :confused: It was my use of shockwave_red.POF on impact ($Shockwave model) that seems to have been causing the problem; removing that has eliminated crashing.

I need to do more tests to be certain, but I think the heavy rockets are all functional now.