Explosions File Triggering

Hi guys.
I'm currently trying to use the Explosions file to try to trigger a Buff type when ships die. I can't seem to get it to work, despite toying with it for the past three hours, so I decided to see what the experienced modders think about it. :p

Here's what I'm trying to do at the moment.

"Frigate0" is the explosion effect for all light frigates. I would like it to apply a Buff when a unit dies; in this case it would be to create a clone of a nearby frigate. If anyone has any idea's on how to get this type of Buff application working, I'd appreciate suggestions. The entire premise of my currently vaporware mod depends on it. heh :)

Here's the mess I have after editing the Explosions file with the BuffCloneFrigate file, and a few others, to no avail.
Please dont laugh.  ;)

explosionEffect
    name "Frigate0"
    totalPlayTime 30
    makeMeshInvisibleTime 1
    subExplosionCount 3
    subExplosion
        type "Buff"
        onReapplyDuplicateType "StackNewBuff"
        buffExclusivityForAIType "ExclusiveForAllPlayers"
        isInterruptable FALSE
        isChannelling FALSE
        numInstantActions 1
        instantAction
            buffInstantActionType "CreateClonedFrigate"
            instantActionTriggerType "OnOwnerDeath"
                targetFilter
                    numOwnerships 1
                    ownership "Friendly"
                    numObjects 1
                    object "Frigate"
                range
                    Level:0 1000.000000
                    Level:1 1000.000000
                    Level:2 1000.000000
                numConstraints 1
                    constraint "NotSelf"
                numFrigates
                    Level:0 3
                    Level:1 3
                    Level:2 3
            impulse 0
            spawnFrigateSoundID "EFFECT_CLONEFRIGATE"
        numPeriodicActions 0
        numOverTimeActions 0
        numEntityModifiers 0
        numEntityBoolModifiers 0
        numFinishConditions 0
    subExplosion
        type "Effect"
        playTime 0
        cameraShakeMaxSize 0.0
        cameraShakeStrength 0.0
        cameraShakeDuration 0.0
        location "Center"
        particleSystemName "Explosion_Frigate"
        explosionSounds
            soundCount 2
            sound "EXPLOSION_FRIGATESHIPDEATH"
            sound "EXPLOSION_FRIGATESHIPDEATH_ALT1"
    subExplosion
        type "Sound"
        playTime 0.6
        cameraShakeMaxSize 5000.0
        cameraShakeStrength 0.5
        cameraShakeDuration 0.0
        explosionSounds
            soundCount 0
24,687 views 6 replies
Reply #1 Top
I seriously doubt that the subexplosion type accepts buffs, so you might be out of luck, but i havent really looked into editing explosions.
Reply #2 Top
doh, I just need a way to trigger a buff upon ship death :/

thx for the reply though :)
Reply #3 Top
I'm guessing the game either crashes when something blows up, or when you're activating?

I'm with Terraziel here. For the most part, adding on stuff doesn't work because all the various types of things have a set definition of what attributes they have. You can't even add strike craft to gauss turrets for example because they're not allowed for a WeaponDefense entity type, so trying to stick a buff in an explosion definition isn't likely to be able to work :(
Reply #4 Top
*sadface*

oh wait...
X-(

heh, thx for the replies. I'll have to keep tinkering :/
Reply #5 Top
Try checking out the advent ability lingering presence, the filename is AbilitySpyingAttacks.entity, I believe. This is a good example of 'passive persistent execute on death.'
+1 Loading…
Reply #6 Top
Will do after I get back from work, thanks for a pointer. :)