Capship Damage upon Destruction

ALMOST got an ability that makes capships do damage on death, need help nailing down the kinks. Anyone know why it's not -quite- there?

 

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "OnDamageTaken"
buffType ""BuffSelfDestructSelf""
targetFilter
    numOwnerships 0
    numObjects 4
    object "CapitalShip"
    object "Frigate"
    object "StarBase"
    object "Fighter"
    numSpaces
    numConstraints 0
range
    Level:0 4500.000000
    Level:1 0.000000
    Level:2 0.000000
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget FALSE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "HullDamageExceedsAmount" 0.98000
onlyAutoCastWhenTargetHullDamageExceedsAmount
    Level:0 0.980000
    Level:1 0.000000
    Level:2 0.000000
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.98000
useCostType "None"
cooldownTime
    Level:0 60.000000
    Level:1 0.000000
    Level:2 0.000000
orderAcknowledgementType "ONATTACKORDERISSUED"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

 

The only hitches Dev gives me are

 

Assert @ c:\gs\entrenchment\CodeSource\Engine/String/StringLibrary.h(83)

result == 1

 

 

Assert @ c:\gs\entrenchment\CodeSource\GS/Entity/Interfaces/IAbility.cpp(271)

m_buffApplyAction.instantActionTriggerType == InstantActionTriggerType::AlwaysPerform

 

 

Assert @ c:\gs\entrenchment\CodeSource\GS/Entity/Interfaces/IAbility.cpp(290)

m_aiUseTime != AIUseTime::Invalid

 

 

which... make absolutely no sense to me, but. I can get the thing to not freak out Dev for the most part. Now why the high holy hell isn't it actually DAMAGING anything upon detonation?

 

13,877 views 28 replies
Reply #1 Top

I think you need to change the "instantActionTriggerType" from OnDamageTaken to OnOwnerDeath

Just copy the tech SB self destruct ability and buffs . Re-name them to Destructiondamage or collateral or something like that.

In the ability file change the instantActionTriggerType as described above, also change the buffType entry to the re-named first buff file. In that buff file change the buffTpye entry in that to the name of your re-named damage buff file . In your ship entity file change the name of the ability to the new ability you have just made. then test it out, see whether it works then you can tweek the range and damage values to your liking.

Good luck!

Reply #2 Top

Oh! and don't forget to update your entity manifest with the names of the new files you have made and adjust the count accordingly.

Reply #3 Top

Well, personally, I would set the ability to AlwaysPerform and then set the activation buff to trigger OnOwnerDeath and the damage buff to AlwaysPerform  That means the ability itself would apply a single buff to the capital ship, and then the OnOwnerDeath buff would apply a second, radius-based damage buff to all of your targets.

You're also going to want to set the useCostType to "Passive" unless you were planning on this being an activated ability, which is going to be pretty difficult to activate when the ship is blowing up.   ;)   Changing the cost type would mean you remove the cooldown and orderacknowledgement lines, as well.

Also change aiUseTargetCondition to "Invalid" and remove the condition lines just below it.  Autocast availability and default settings should be set to FALSE since the ability is passive. 

Reply #4 Top

but isn't OnOwnerDeath when the PLAYER is eliminated, not the ship? o.o

Reply #5 Top

okay, so I edited it to thus for now.

 

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "OnOwnerDeath"
buffType "BuffSelfDestructTarget"
targetFilter
    numOwnerships 0
    numObjects 4
    object "CapitalShip"
    object "Frigate"
    object "StarBase"
    object "Fighter"
    numSpaces
    numConstraints 0
range
    Level:0 4500.000000
    Level:1 0.000000
    Level:2 0.000000
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget FALSE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.99999
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

 

 

1) still no damage dealth.

2) The AI Actually stops shooting the damned thing when it hits 1% health.

Reply #6 Top

"The "owner" in OnOwnerDeath refers to the owner of the ability, which is the unit. 

I should have rephrased my earlier post.  I only suggest setting it up that way if you want it to work correctly. 

Ability 1 applies a buff to your capital ship as AlwaysPerform.

Buff 1 is ApplyBuffToTargetsInRadius with an "OnOwnerDeath" trigger.

Buff 2 is the actual damage buff and is also AlwaysPeform. 

Autocast percentage should be 0.000000, and ingoreNonecombatShip should also be FALSE. 

Make sure your target filter looks like this:

targetFilter
    numOwnerships 0
    numObjects 4
    object "CapitalShip"
    object "Frigate"
    object "Module"
    object "StarBase"
    numSpaces 1
    space "Normal"
    numConstraints 0
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Invalid"
    smallEffectName ""
    largeEffectName ""
    soundID ""

One example off the top of my head is the DamageOverTime ability used by the Psi Heavy Frigate.  Some of the details are very different from what you need (such there being an overtime action instead of an instant action), but the structure of the ability->buff->buff is correct.

Reply #7 Top

Actually the owner is the entity that the buff is currently added to, just to be 100 % correct ;), the numOwnerships should be set to 1 and add the line ownership "Enemy" underneath.

Reply #8 Top

okay, so I did the above edit to get

 

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "OnOwnerDeath"
buffType "BuffSelfDestructTarget"
targetFilter
    numOwnerships 0
    numObjects 4
    object "CapitalShip"
    object "Frigate"
    object "Module"
    object "StarBase"
    numSpaces 1
    space "Normal"
    numConstraints 0
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Invalid"
    smallEffectName ""
    largeEffectName ""
    soundID ""
range
    Level:0 4500.000000
    Level:1 0.000000
    Level:2 0.000000
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget FALSE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget FALSE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

 

 

 

 

 

and now the entrenchment Dev says:

Failed to convert 'Module' to an enum value.

 

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\Capship Detonation Test\GameInfo\AbilityShipDestruct.entity
Label: range
Line Number:15
Line Contents:maxTargetCount

 

 

 

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\Capship Detonation Test\GameInfo\AbilityShipDestruct.entity
Label: needsToFaceTarget
Line Number:26
Line Contents:range

 

Reply #9 Top

but I don't see how swapping things around makes any sense.

 

Reply #10 Top

correct version, except some minor things.

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "OnOwnerDeath"
buffType "BuffSelfDestructTarget"
targetFilter
    numOwnerships 1

ownership "Enemy"
    numObjects 4
    object "CapitalShip"
    object "Frigate"
    object "Module"
    object "StarBase"
    numSpaces 1
    space "Normal"
    numConstraints 0
range
    Level:0 4500.000000
    Level:1 0.000000
    Level:2 0.000000
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget FALSE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget FALSE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

Reply #11 Top

Testing

 

Reply #12 Top

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\Capship Detonation Test\GameInfo\AbilityShipDestruct.entity
Label: range
Line Number:15
Line Contents:maxTargetCount

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\Capship Detonation Test\GameInfo\AbilityShipDestruct.entity
Label: needsToFaceTarget
Line Number:26
Line Contents:range

Still. Gonna see if that makes it crash, or if I can just ignore this stupid error. (Someday, when I understand it better, I'll make a freaking blank template to end this stuff once and for all.)

Reply #13 Top

Sorry, it should be "PlanetModule".

You can follow gruntmaster's advice about changing the target filter to enemy, but it seems totally unrealistic for an exploding capital ship to only affect enemy ships and not everything that's around it. 

I also believe you're going to continue to experience problems until you restructure it into a self-buffing ability tree that targets the owner ship and then the surrounding ships.  Find a similar ability and copy it to help the process.

 

Reply #14 Top

okay, can't run the game with that. I get this. Over and over.

Assert @ c:\gs\entrenchment\CodeSource\GS/Entity/Interfaces/IAbility.cpp(828)

false

 

I love how this thing explains errors, eh?

Reply #15 Top

okay, er. so how would I do that- applybufftoself?

Reply #16 Top

ooookay. this gives me no errors, but detonates as soon as I create the ship. WITHOUT DAMAGING ANYTHING ELSE STILL!

 

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToSelf"
instantActionTriggerType "OnOwnerDeath"
buffType "BuffSelfDestructTarget"
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget FALSE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget FALSE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

Reply #17 Top

aside- it oddly doesn't give me a "You can't have five abilities" warning. I just realised.

Reply #18 Top

Interesting.  First, the trigger type should be "AlwaysPerform" for the ability.  The first buff should be "BuffSelfDestructSelf" and have an action type of "ApplyBufftoTargetsInRadius" with a trigger type of "OnOwnerDeath" and the target filter I mentioned before.  Make sure the range is large enough to encompass surrounding ships.  The final buff,BuffSelfDestructTargets" should be a "DoDamage" type and have a trigger of "AlwaysPeform" or "OnDelay".  If you use "OnDelay" make sure you add the necessary delayTime line. 

I'd like to see what you have for buffs, as well.

Reply #19 Top

I... have no idea what you said. I'm confused as hell now. I was just testing out using the buffs from the tech starbase destruct sequence.

Reply #20 Top

to break down Mystic Angel's post:

Quoting Mystic, reply 18
Interesting.  First, the trigger type should be "AlwaysPerform" for the ability.
End of Mystic's quote

Abilities can only have the trigger "AlwaysPerform"

Quoting Mystic, reply 18
The first buff should be "BuffSelfDestructSelf"
End of Mystic's quote

this is just the name of the buff and can be anything you want it to be.

Quoting Mystic, reply 18
and have an action type of "ApplyBufftoTargetsInRadius" with a trigger type of "OnOwnerDeath" and the target filter I mentioned before.
End of Mystic's quote
 

I think you understand this part, though myst if it has a numOwnerships 0 then it means that it will affect nothing and not everything (since there are no owners) the 4 ownerships I know of are Enemy, Player, Friendly and NoOwner (if I remember right).

Quoting Mystic, reply 18
Make sure the range is large enough to encompass surrounding ships.  The final buff,BuffSelfDestructTargets"
End of Mystic's quote

same as the other buff.

Quoting Mystic, reply 18
should be a "DoDamage" type and have a trigger of "AlwaysPeform" or "OnDelay".  If you use "OnDelay" make sure you add the necessary delayTime line.
End of Mystic's quote

I think you also understand this.

Quoting Mystic, reply 18
I'd like to see what you have for buffs, as well.
End of Mystic's quote

I think he is using the TEC starbase selfdestruct buffs

Reply #21 Top

*scream of frustration* I managed to hash this out.

Ability:

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffShipDestructSelf"
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget FALSE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget FALSE
onlyAutoCastWhenDamageTakenExceedsPerc 0.980000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID ""
descStringID ""
hudIcon ""
smallHudIcon ""
infoCardIcon ""

 

Buff

 

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 3
instantAction
    buffInstantActionType "PlayAttachedEffect"
    instantActionTriggerType "OnOwnerDeath"
    effectInfo
        effectAttachInfo
            attachType "Above"
        smallEffectName "Explosion_TechStarbase"
        largeEffectName "Explosion_TechStarbase"
        soundID ""
instantAction
    buffInstantActionType "MakeDead"
    instantActionTriggerType "OnDelay"
    delayTime 3.000000
instantAction
    buffInstantActionType "ApplyBuffToTargetsInRadiusWithTravel"
    instantActionTriggerType "OnDelay"
    delayTime 3.000000
    buffType "BuffSelfDestructTarget"
    targetFilter
        numOwnerships 2
        ownership "Friendly"
        ownership "Enemy"
        numObjects 4
        object "CapitalShip"
        object "Frigate"
        object "PlanetModule"
        object "StarBase"
        numSpaces 1
        space "Normal"
        numConstraints 0
    range
        Level:0 8000.000000
        Level:1 12000.000000
        Level:2 0.000000
    maxTargetCount
        Level:0 -1.000000
        Level:1 -1.000000
        Level:2 -1.000000
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Buff_CannonShellPhaseImpactWave"
        largeEffectName "Buff_CannonShellPhaseImpactWave"
        soundID ""
    travelSpeed 5000.000000
    effectStaggerDelay 0.000000
    hasWeaponEffects FALSE
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
    finishConditionType "AllOnDelayInstantActionsDone"

 

 

it blows up, it plays the effect- nothing gets damaged. Also, the AI STOPS FIRING AT IT for several seconds, once it reaches 1% health. and just sits there. What did I DO?!

Reply #22 Top

You will need one more "custom" buff and remove the MakeDead instantaction (as this kills the target, don't forget that the original was an ability which got activated while this is a passive). The ApplyBuffToTargetsInRadiusWithTravel needs the trigger OnOwnerDeath. The other custom buff will have a single DoDamage instantaction, the one used by the TEC starbase might be named BuffSelfDestructDoDamage (the bufftype of the ApplyBuffToTargetsInRadiusWithTravel).

Reply #23 Top

okay, checking to see if THIS fixes it. Sorry for all the problems ><

Reply #24 Top

I GOT IT! The AI still stops SHOOTING the thing when it's down to almost nothing, no idea why- BUT I GOT IT!

Reply #25 Top

Anyone want an upload so they can use/see/tweak? :D