Help: Game crashed when AI use new ability

Original topic name: Is somewhere has a constraint list

Recently, I'm trying to modify a pirateship of given a ability of capture PlanetModule, But easly minidump.

I think maybe I didn't make any constraint. Such as don't capture the Module which UnderConstruction or Unfinished.  

So, where I can pick up a right constraint?

And, if anyone knows my minidump caused by other reasons, Plz help me. :SNIFF!: 

Thanks a lot.

9,153 views 13 replies
Reply #1 Top
And, if anyone knows my minidump caused by other reasons, Plz help me.
Thanks a lot.
End of quote

Post your entire Ability and Buff file here. As for the constraints, there was a post made not long ago with a list, I'll have a look.
Edit: My mistake, the post I was looking for didn't actually include Constraints. Best thing to do is check other abilities, starting with ones you think might have the constraint you want.
Reply #2 Top
Hi Uzii, Thank you again!  ;) 

Here is Ability file as under your suggestion yesterday.
-----------------------------------------------
TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTarget"
instantActionTriggerType "AlwaysPerform"
buffType "BuffPirateDomination"
targetFilter
numOwnerships 1
ownership "Enemy"
numObjects 2
object "PlanetModule"
object "Frigate"
numConstraints 0
range
Level:0 6000.000000
Level:1 6000.000000
Level:2 6000.000000
effectInfo
effectAttachInfo
attachType "Invalid"
smallEffectName ""
largeEffectName ""
soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Anytime"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
isPassive FALSE
antiMatterCost
Level:0 80.000000
Level:1 0.000000
Level:2 0.000000
cooldownTime
Level:0 45.000000
Level:1 0.000000
Level:2 0.000000
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_PirateDOMINATION_NAME"
descStringID "IDS_ABILITY_PirateDOMINATION_DESCRIPTION"
hudIcon "HUDICON_ABILITY_CAPTUREDEAD"
smallHudIcon "HUDICON_ABILITY_CAPTUREDEAD"
infoCardIcon ""


And here is the Buff file, which I just add sound effect again since yesterday.
-----------------------------------------------
TXT
entityType "Buff"
onReapplyDuplicateType "ReplaceWithNewBuff"
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 2
instantAction
buffInstantActionType "PlayPersistantAttachedEffect"
instantActionTriggerType "OnDelay"
delayTime 0.000000
effectInfo
effectAttachInfo
attachType "Invalid"
smallEffectName ""
largeEffectName ""
soundID "EFFECT_SHIELDREGENERATION_LOOP"
instantAction
buffInstantActionType "ChangePlayerIndexToFirstSpawner"
instantActionTriggerType "OnDelay"
delayTime 0.000000
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "TimeElapsed"
time
Level:0 10.000000
Level:1 0.000000
Level:2 0.000000
Reply #3 Top
Mmmm... When exactly does it crash? There are a few things that seem out of place with those 2 files, but I don't think they would cause a crash:
1. The strings are not all in upper case, do they exactly match the ones in the .str file?
2. It only lasts for 10 seconds, is this intentional?
3. Have you tried it without the sound effect?
4. Have you tried the Buff without the effect "PlayPersistantAttachedEffect" section, and just the 'ChangePlayer' bit?
Reply #5 Top
My guess as to the cause of the crash is the finishcondition of the buff, largely that it has one at all, my personal experience would suggest that the "ChangePlayerIndexToFirstSpawner" effect is all or nothing.

Most likely the game doesnt hold on to the information that is required to switch the unit back to its original owner after the buff has finished
Reply #6 Top
Mmmm... When exactly does it crash? There are a few things that seem out of place with those 2 files, but I don't think they would cause a crash:
1. The strings are not all in upper case, do they exactly match the ones in the .str file?
2. It only lasts for 10 seconds, is this intentional?
3. Have you tried it without the sound effect?
4. Have you tried the Buff without the effect "PlayPersistantAttachedEffect" section, and just the 'ChangePlayer' bit?
End of quote


100% Crashed when ships fighting(Maybe use it's ability) and I'm taking a close look.
Crashed randomly when ships fighting(Maybe use it's ability) and I'm taking a medium distance look.
Don't crash when I don't look their fight or just all ships show small icons
1.String is Okay.
2.I just use original domination ability setting.
3.With or without sound effect cause same problem.
4.Em~ I'll try it tonight.

WWW LinkAdd Constraint and other list today
End of quote


Many thanks, It's great work!

My guess as to the cause of the crash is the finishcondition of the buff, largely that it has one at all, my personal experience would suggest that the "ChangePlayerIndexToFirstSpawner" effect is all or nothing.Most likely the game doesnt hold on to the information that is required to switch the unit back to its original owner after the buff has finished
End of quote


You means instantActionTriggerType should be "Invalid" or "Any"?
I didn't edit ability and buff too much before, seems need something too learn.
Thanks.
Reply #7 Top
Hi Uzii.
I've removed instantAction "PlayPersistantAttachedEffect" section, and still crashed as before.
So i think New Ability must have new strings and New HudIcon?
For this case, I used your HudIcon of CaptureDead.
Is this reason caz the game crash?

BTW, I've tested all constraint which bailknight given above, only one constraint wrong and i've succefuly correct it.
Reply #8 Top
What i meant was that this

numFinishConditions 1
finishCondition
finishConditionType "TimeElapsed"
time
Level:0 10.000000
Level:1 0.000000
Level:2 0.000000
End of quote


and this

buffInstantActionType "ChangePlayerIndexToFirstSpawner"
End of quote


Might not work together, but you need the last one otherwise the buff doesnt capture modules and ships, try removing the finish condition (by replacing the first section of text i quoted with "numFinishConditions 0") and see if that helps
Reply #9 Top
Yeh, I had a feeling about this too. Hence I asked whether it was intentional or not. I think Terraziel is right, try removing the FinishCondition and see what happens.
Reply #10 Top
Okay, I'll try it.
It's boring, i'm nearly give up... (:( 
Why we can't just use the original BUFF which applied to other ship?
Reply #11 Top
I've tried again and again, and learned from Uzii a bit, Thanks!
Still crashed game with new ships and new ability and new buff.
Em, i think i should make what i've modified clearly.

New ship: Only one use a new mesh, and without this one still crash!
Other all new ships which i've made just modified name (Linked in English.str) and HULL/Shield/Antimatter/DsetoryExp/New Ability from original.

New Ability: Modified base on original ability, changge the antimatter-cost and cooldowntime, some from captialship's also changed fixedlevel0.

New Buff:Just changed entity name and changed some level1/2 value to Zero for ability changged fixedlevel0.

Then, I new a game, add these new ships to my homeplanet, test all ships and ability's Infocard AutoCastEnable/Disable ok. Use these ships fighting, and use new ability, all ok.

I've added these new ships to AI, then when they fighting and i take a close look, the game crashed 100%, BUT if i take a far observe (ships and module show Icon), the game won't crash at all.

At first I think maybe constraint problem, after i restrict all the new ability, still the same problem.

I can't finger out what's the matter, anyone knows how this happened?
Reply #12 Top
you try posting the ship's .entity file as well, just in case theres a problem with the actual ship or how you modified the ability to be used with the ship. you might want to post any other files you modified to get the AI to use the ship as well, just in case, its best to have all the info for someone to look over before giving guesses to what might be wrong.
Reply #13 Top
you try posting the ship's .entity file as well, just in case theres a problem with the actual ship or how you modified the ability to be used with the ship. you might want to post any other files you modified to get the AI to use the ship as well, just in case, its best to have all the info for someone to look over before giving guesses to what might be wrong.
End of quote


I've finnaly find out where the problem, just as you mentioned.
I've missed some ship's shield mesh which has shield points.

Okay, thanks for Uzii, baiknight, Terraziel, StCobalt.
With you encourage, I've finally sloved my Crash problem. :LOL: