Destructive asteroid Field Ability?

Simply put, I want an asteroid field ability that occasionally (random?) damages any ships/structures in the gravity well. (It's for a multiplayer game balance with some friends, to stop starbase camping in chokepoints.)

Is it possible? Any idea how I'd do it?

9,103 views 25 replies
Reply #1 Top

First, I get the feeling you haven't yet found the threads that include all of the entity-related modifiers.  This one is more up to date, but this one includes the constraints.

As for the ability:  Use ApplyBufftoTargetsAtOrbitBody.  Then in the buff file, use the the DoDamage buff type and use an OnChance trigger type.

I suggest you look up the reference files that Harpo has converted to text format and posted on the forum.  Search through them at your leisure to find various abilities and buffs that already do something that you're wanting or that is very close.  It provides a fantastic group of templates to go by.

 

Reply #2 Top

Okay, let me reiterate. Is my current ability

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetWithTravel"
instantActionTriggerType "AlwaysPerform"
buffType "BuffAsteroidBelt2"
targetFilter
    numOwnerships 1
    ownership "Enemy"
    numObjects 4
    object "CapitalShip"
    object "Frigate"
    object "Fighter"
    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 ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_AsteroidBelt2_NAME"
descStringID "IDS_ABILITY_AsteroidBelt2_DESCRIPTION"
hudIcon "HUDICON_ABILITY_AsteroidBelt"
smallHudIcon "HUDICON_ABILITY_AsteroidBelt
infoCardIcon ""

 

 

and buff

 

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeOldBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numOverTimeActions 1
overTimeAction
    buffOverTimeActionType "DoDamage"
    damageRate
        Level:0 10.000000
        Level:1 0.000000
        Level:2 0.000000
    damageAffectType "AFFECTS_SHIELDS_AND_HULL"
    damageType "PHYSICAL"
    isDamageShared TRUE
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 3
finishCondition
    finishConditionType "TimeElapsed"
    time
        Level:0 5.000000
        Level:1 5.000000
        Level:2 5.000000
finishCondition
    finishConditionType "EnterHyperspace"

 

 

going to function or is it going to minidump.

Reply #3 Top

okay, it does crash hard. and I don't know what I did wrong.

Reply #4 Top

I'm not a great modder but perhaps it is because you have forget the " in the end of the line smallHudIcon

"HUDICON_ABILITY_AsteroidBelt

Sometimes little details leads to great crash...

 

Reply #5 Top

Corrected in the original, no luck.

 

Reply #6 Top

Did you use the Dev exe when you tested this?  It will tell you exactly where your problems are located.

Looking through it I can't be sure (I don't know exactly which optional lines are required for which buff types), but I'd say you haven't used ApplyBuffToTargetWithTravel correctly.  I'm almost positive there should be a line in there that asks if there's a weapon effect.  I can also tell you that you shouldn't have a maxTargetCount section with that buff either.  Your damage buff is also set to inflict damage continuously 100% of the time. 

I've already told you exactly what you needed to do in my first post.  Use the specific modifiers I suggested or simply adapt the current AbilityAsteroidBelt, which would be far easier.  Just add a new Instant Action to the buff with an OnChance modifer that activates a new damaging buff.

I totally understand your confusion because I went through it when I first started, too, but use the resources at your disposal, for crying out loud.  The Reference Files will help tremendously if you just look through them.

 

 

Reply #7 Top

-deleted-

Reply #8 Top

REmoved the spam. Need to make the buff from scratch. Using this as a template. Can't figure out how to implement anything though.

 

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeOldBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 0
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
    finishConditionType "EnterHyperspace"

Reply #9 Top

I've narrowed it down to the buff. somehow that's what I've screwed up.

Reply #10 Top

ABILITY

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsAtOrbitBody"
instantActionTriggerType "AlwaysPerform"
buffType "BuffAsteroidBelt2"
targetFilter
    numOwnerships 0
    numObjects 3
    object "CapitalShip"
    object "Frigate"
    object "StarBase"
    numSpaces 1
    space "Normal"
    numConstraints 1
    constraint "HasWeapons"
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Invalid"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_ASTEROIDBELT_NAME"
descStringID "IDS_ABILITY_ASTEROIDBELT_DESCRIPTION"
hudIcon "HUDICON_ABILITY_ASTEROIDBELT"
smallHudIcon "HUDICON_ABILITY_ASTEROIDBELT"
infoCardIcon ""

 

 

Buff 1

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeOldBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numOverTimeActions 0
numPeriodicActions 1
periodicAction
    actionCountType "Infinite"
    actionIntervalTime
        Level:0 5.000000
        Level:1 0.000000
        Level:2 0.000000
    buffInstantActionType "ApplyBuffToSelf"
    instantActionTriggerType "OnChance"
    buffApplyChance
        Level:0 0.500000
        Level:1 0.000000
        Level:2 0.000000
    buffType "BuffAsteroidBeltDamage"
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName ""
        largeEffectName ""
        soundID ""
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
    finishConditionType "EnterHyperspace"

 

 

Buff 2


TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
    buffInstantActionType "DoDamage"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    damage
        Level:0 25.000000
        Level:1 0.000000
        Level:2 0.000000
    damageAffectType "AFFECTS_SHIELDS_AND_HULL"
    damageType "PHYSICAL"
    isDamageShared TRUE
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
    finishConditionType "AllinstantActionsDone""


 

 

SOMEBODY tell me what I did wrong cos. This doesn't seem to have a single flaw as far as I can see.

 

 

 

 

Reply #11 Top

Without running any practical tests of my own I can't find any errors in the coding either.  Did you add the new entity file names to the entity manifest?

Seriously, are you using the developer executable file when you test these out.  It's located in your main Sins directory and will literally tell you exactly what is causing your error and where you can find it for nearly every problem you can encounter.

 

Edit:  You also might as well change the finish condition for your second buff to the completion of all OnDelay actions.  The action is instantaneous, so there's no point in prolonging the buff with an unnecessary finish condition.  Depending on what you imagine the final product to be, you might decrease the interval that the initial periodic action is applied and decrease the chance of inflicting damage.  The possibility of damage will be almost continual rather than every 5 time units (5 seconds?), but the lower percentage of the damage buff applying will mean the actuality of being hit by asteroid debris will be about the same as you have now.  I think it's more realistic within the confines of what we know about asteroid fields.

Reply #12 Top

I've been using the dev system, I'll run it again to get the new errors. Also, I only raised the chance to hit so high this time for testing purposes.

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\TitanBootlegMod COMPILED 3.1 - Copy\GameInfo\BuffAsteroidBelt2.entity
Label: numInstantActions
Line Number:9
Line Contents:numOverTimeActions 0

 

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\TitanBootlegMod COMPILED 3.1 - Copy\GameInfo\BuffAsteroidBelt2.entity
Label: numPeriodicActions
Line Number:10
Line Contents:numOverTimeActions 0

 

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\TitanBootlegMod COMPILED 3.1 - Copy\GameInfo\BuffAsteroidBelt2.entity
Label: numEntityModifiers
Line Number:12
Line Contents:numPeriodicActions 1

 

 

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\TitanBootlegMod COMPILED 3.1 - Copy\GameInfo\BuffAsteroidBelt2.entity
Label: numEntityBoolModifiers
Line Number:13
Line Contents:numPeriodicActions 1

 

 

 

Text FileArchive missing Label.

File: C:\Users\Dare\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.051\TitanBootlegMod COMPILED 3.1 - Copy\GameInfo\BuffAsteroidBelt2.entity
Label: numFinishConditions
Line Number:14
Line Contents:numPeriodicActions 1

 

 

So, there you go. What's that mean? I get that it's missing SOMETHING but not WHAT. Seriously about to have a stroke here. It's like the game isn't following its own rules.

Reply #13 Top

Man, what would be helpful more than a list of all the conditions and stuff for the abilities would be a glossary of Dev ERRORS. XD

 

cos it seems to say that it's missing the label, then it points out the label. That'd be like me pointing to a car and saying, "that car is missing." Unless, you know. I'm really not getting something.

Reply #14 Top

Those errors are telling you that a line category should read something very specific (it's label), but the actual contents read something else.  Having "numOverTimeActions" in the line where "numInstantActions" should be, for instance.   the entity files are extremely sensitive to maintaining the standard structure.  Your problem is actually a cascade of errors caused by only two things:  the BuffAsteroidBelt2 file is missing the line numInstantActions as the first in the list of actions, and then numPeriodActions should come before numOverTimeActions.  "Add numInstantActions 0" at the top of the list, then switch the other two actions types, and everything should be A OK.

It would seem that in your efforts to change things around you made a few unwanted changes.  It's a common mistake when first starting out.  My best advice is to make sure you copy and paste as much as possible to avoid mistyping.

 

Reply #15 Top

*sigh* I fixed what you said and it no longer minidumps, which is great. BUt it doesn't seem to recognize the damage script- it just has the 20% accuracy debuff in both abilities. I KNOW I referenced the right one. What happened? x.x

Reply #16 Top

entity.manifest?

harpo

Reply #17 Top

Yeah, make sure you have all of the new file names in the entity.manifest, plus you'll need to change the number of entity files at the top of the manifest to include your new stuff.  You don't have the weapon miss as part of your buff, so it sounds like the game is still referencing the original Asteroid ability.  If you've already added the necessary files to the entity manifest and you're actually using a separate ability, make sure you change the reference to the new ability in the Asteroid/Asteroid Belt planet entity file. 

 

Optional:

I noticed that what I had you do was set the damage buff to a percentile application.  That means the damage buff itself is only being applied half the time, so it could be that you just didn't get to see the buff in effect.  You might try changing that OnChance trigger to a delay and then add the OnChance trigger to the damage action in the final buff.  This way you'll always have the final buff activate, but the damage itself will only happen on a chance.

 

Reply #18 Top

I got it to work! Typo left off a '2.' Sorry for the chaos, but now I have it working. :) Now all I gotta do is tinker with rate/damage- as it is, it pretty much just disables shield regen.

Reply #19 Top

now- one last question. Effects. How do I just copy the -explosion- from, say, the Kol gauss cannon? It seems to require a firing-from bit.

Reply #20 Top

what about the

    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName ""
        largeEffectName ""

and copy the effect names from the gauss  entity

harpo

 

Reply #21 Top

Harpo's right, but use "Invalid" as the attach type.  Also, fix the finish condition on your final buff.  The "i" in Instant should be capitalized.

Reply #22 Top

okay, I tried to effect thing. All I get is the SOUND. >< the effect is in a 'weapons' effect setup. I just want a nice, pretty explosion when something impacts it to let the player know it's been hit. Ideas? x.x

Reply #23 Top

Got it :D

 

Reply #24 Top

Oh, right.  I imagine you used the PlayAttachedEffect modifier.  Does that mean you've got everything worked out the way you want it now?

 

Reply #25 Top

yup! It works great, thanks everyone! Now to use this as a template to tinker more. :)