Need someone to check a buff for me

Hey everyone,

I have been looking at this thing for hours and I can't figure out what's wrong with it.  Can someone please look at this buff file and tell me why the second and third InstantActions are simply not happening in-game?

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable TRUE
isChannelling TRUE
numInstantActions 4
instantAction
    buffInstantActionType "PlayPersistantAttachedEffect"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Ability_OrbitalCannonPhaseChargeUp"
        largeEffectName "Ability_OrbitalCannonPhaseChargeUp"
        soundID "WEAPON_PHASEORBITALCANNON_CHARGE"
instantAction
    buffInstantActionType "CreateCannonShell"
    instantActionTriggerType "OnBuffFinish"
    cannonShellType "CannonShellPhase"
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Ability_OrbitalCannonPhaseMuzzle"
        largeEffectName "Ability_OrbitalCannonPhaseMuzzle"
        soundID "WEAPON_PHASEORBITALCANNON_MUZZLE"
instantAction
    buffInstantActionType "ApplyBuffToLocalOrbitBody"
    instantActionTriggerType "OnBuffFinish"
    buffType "BuffDiscoveryFTLLocalBody"
    effectInfo
        effectAttachInfo
            attachType "Invalid"
        smallEffectName ""
        largeEffectName ""
        soundID ""
instantAction
    buffInstantActionType "ApplyBuffToSelf"
    instantActionTriggerType "OnBuffFinish"
    buffType "BuffDiscoveryFTLSelf"
    effectInfo
        effectAttachInfo
            attachType "Invalid"
        smallEffectName ""
        largeEffectName ""
        soundID ""
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 2
finishCondition
    finishConditionType "TimeElapsed"
    time
        Level:0 6.000000
        Level:1 0.000000
        Level:2 0.000000
finishCondition
    finishConditionType "OwnerChanged"

8,677 views 11 replies
Reply #1 Top

Have you tried the Dev.exe (located in your sins installation folder in case you're new to modding)? If yes, what error does it return? Including errors on startup that might be related to any of the files involved.

Does the first action trigger? You should see the Kostura charge up animation if it does. Does the last action trigger?

Have you registered everything in the entity.manifest?

Are you using Entr. or Diplo? If not the syntax of your buff is incorrect.

Reply #2 Top

Okay, a couple things:

1. What version of Sins are you modding? I.E., vanilla, Entrenchment, or Diplomacy.

2. Post the other buffs that are called by this one. It could be that it's not this buff but one of the others that is called by this buff that is your problem.

3. If your using Entrenchment or Diplomacy, have you added the files to the entity.manifest file, as Photoloss said?

4. What exactly is this ability supposed to do? It would be useful if you disclosed what your goal is for this ability.

Other than that, we really can't help.

Reply #3 Top

Quoting Photoloss, reply 1
Have you tried the Dev.exe (located in your sins installation folder in case you're new to modding)? If yes, what error does it return? Including errors on startup that might be related to any of the files involved.

Does the first action trigger? You should see the Kostura charge up animation if it does. Does the last action trigger?

Have you registered everything in the entity.manifest?

Are you using Entr. or Diplo? If not the syntax of your buff is incorrect.

I've tried the Dev.exe, but it's getting hung up on an "i >= 0" problem (that doesn't crash the game) and there's no way to get past that infinite error to actually try the ability.  I have a feeling they may be connected, but no way to know for sure.

The first action and the last action both are triggering just fine.

As far as I can see, everything is registered in the entity.manifest.  Wouldn't the game minidump if it wasn't?

And yes, I am modding for Diplomacy.

Quoting Whiskey144, reply 2
Okay, a couple things:

1. What version of Sins are you modding? I.E., vanilla, Entrenchment, or Diplomacy.

2. Post the other buffs that are called by this one. It could be that it's not this buff but one of the others that is called by this buff that is your problem.

3. If your using Entrenchment or Diplomacy, have you added the files to the entity.manifest file, as Photoloss said?

4. What exactly is this ability supposed to do? It would be useful if you disclosed what your goal is for this ability.

Other than that, we really can't help.

1. Diplomacy.

2. If we can determine that this buff definitely isn't what's wrong, then yeah I'll put up the other two, but I figured we could get process of elimination going by checking this one for errors first.

3. Yeah, everything is in the manifest.

4. The buff (designed for a ship) is supposed to launch a cannonshell at a targetted orbit body (I have tested it with multiple cannonshells, none of them work), create a phase node at its own orbit body (BuffDiscoveryFTLLocalBody), and reduce its own phase jump speed by 300% (BuffDiscoveryFTLSelf).

This buff is able to play the Kostura powerup effect (the first action) and reduce the ship's phase speed by 300% (the fourth/last action).  However, the second action (launching a cannonshell) and the third action (creating a phase node at the local orbit body) don't work.  They also don't cause a minidump or any kind of visible error; the actions just never occur.

Reply #4 Top

The only thing I can see that might be the cause is that the attach type info for the CreateCannonShell action could be wrong. I'll bold the part I mean.

instantAction
    buffInstantActionType "CreateCannonShell"
    instantActionTriggerType "OnBuffFinish"
    cannonShellType "CannonShellPhase"
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Ability_OrbitalCannonPhaseMuzzle"
        largeEffectName "Ability_OrbitalCannonPhaseMuzzle"
        soundID "WEAPON_PHASEORBITALCANNON_MUZZLE"

It should probably say:

attachType "Ability"
   abilityIndex 0

instead. Just substitute "0" for "1/2/3" as needed, for the appropriate ability hardpoint you want the shell to spawn from.

The problem though, is that I really don't think we can tell what's wrong with this buff, because I don't think that there's anything actually wrong with it. Did the Dev.exe give errors specifically pertaining to the buff you posted? If not, then it would be very helpful if you'd post the other buffs.

On a side note, is this ability intended for a frigate or a capital ship? If it's for a capital, then you might consider tweaking it so that it is set to level the ability instead.

EDIT: It would also likely be helpful if you posted the Ability that calls this buff, and the if you said what ship you were trying to give this ability to (as in, what ship mesh are you using). It's quite possible that the required meshpoints aren't there, and that's why.

Reply #5 Top

Quoting Whiskey144, reply 4
The only thing I can see that might be the cause is that the attach type info for the CreateCannonShell action could be wrong. I'll bold the part I mean.


quoting postinstantAction
    buffInstantActionType "CreateCannonShell"
    instantActionTriggerType "OnBuffFinish"
    cannonShellType "CannonShellPhase"
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Ability_OrbitalCannonPhaseMuzzle"
        largeEffectName "Ability_OrbitalCannonPhaseMuzzle"
        soundID "WEAPON_PHASEORBITALCANNON_MUZZLE"

It should probably say:
attachType "Ability"
   abilityIndex 0



instead. Just substitute "0" for "1/2/3" as needed, for the appropriate ability hardpoint you want the shell to spawn from.

The problem though, is that I really don't think we can tell what's wrong with this buff, because I don't think that there's anything actually wrong with it. Did the Dev.exe give errors specifically pertaining to the buff you posted? If not, then it would be very helpful if you'd post the other buffs.

On a side note, is this ability intended for a frigate or a capital ship? If it's for a capital, then you might consider tweaking it so that it is set to level the ability instead.

EDIT: It would also likely be helpful if you posted the Ability that calls this buff, and the if you said what ship you were trying to give this ability to (as in, what ship mesh are you using). It's quite possible that the required meshpoints aren't there, and that's why.

That is what it looked like originally.  I changed it because I needed the effect to base itself off of the Center point rather than an Ability point.  The cannonshell does not spawn with either setting.

As I said, I can't the Dev.exe to tell me where the error is because every time I run it, it gets spammed with "i >= 0" errors that don't tell me where the problem is.

The ability is intended for a capital ship, but I have quite a few other capital ship abilities that aren't configured for leveling, and they all work just fine.  I did check to make sure the proper meshpoints were in place, and they are.

I'll go ahead and put up the Ability file and the other buff for you.

TXT
entityType "Ability"
buffInstantActionType "ApplyTargettedBuffToSelfNoRange"
instantActionTriggerType "AlwaysPerform"
buffType "BuffDiscoveryFTL"
targetFilter
        numOwnerships 3
        ownership "Friendly"
        ownership "Enemy"
        ownership "NoOwner"
        numObjects 2
        object "Planet"
        object "Star"
        numSpaces 1
        space "Normal"
        numConstraints 0
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget TRUE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility TRUE
maxNumLevels 1
levelSourceType "Intrinsic"
minExperienceLevelRequired
    Level:0 0.000000
    Level:1 0.000000
    Level:2 0.000000
aiUseTime "NotInCombat"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
    Level:0 100.000000
    Level:1 0.000000
    Level:2 0.000000
cooldownTime
    Level:0 120.000000
    Level:1 0.000000
    Level:2 0.000000
orderAcknowledgementType "ONGENERALORDERISSUED"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_DISCOVERYFTL_NAME"
descStringID "IDS_ABILITY_DISCOVERYFTL_DESCRIPTION"
hudIcon "HUDICON_ABILITY_PHASEGATE"
smallHudIcon "HUDICON_ABILITY_PHASEGATE"
infoCardIcon ""

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeOldBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusivePerPlayer"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 0
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 1
entityBoolModifier "IsPhaseGateEndPoint"
numFinishConditions 1
finishCondition
    finishConditionType "TimeElapsed"
    time
        Level:0 120.000000
        Level:1 0.000000
        Level:2 0.000000

Reply #6 Top

After looking over the ability file and my entity Reference files, I *think* I know what your problem is:

It's your levelSourceType; it should be set as "FixedLevel0" instead of Intrinsic. Additionally, IIRC you can hit "Ignore All", and the Dev.exe will ignore all the i>=0 errors.

Anyways, what it looks like is that your levelSourceType is set up wrong; instead of using Intrinsic try FixedLevel0, delete the "minExperienceLevelRequired" lines, and that should fix it.

Reply #7 Top

Quoting Whiskey144, reply 6
After looking over the ability file and my entity Reference files, I *think* I know what your problem is:

It's your levelSourceType; it should be set as "FixedLevel0" instead of Intrinsic. Additionally, IIRC you can hit "Ignore All", and the Dev.exe will ignore all the i>=0 errors.

Anyways, what it looks like is that your levelSourceType is set up wrong; instead of using Intrinsic try FixedLevel0, delete the "minExperienceLevelRequired" lines, and that should fix it.

Unfortunately, that didn't work.  And wouldn't the whole ability stop working if the problem was in the actual ability file, rather than in the buffs?

Reply #8 Top

I have a capital ship ability that fires a cannon shell in my mod at the local orbit body. Download my mod and look at the plague capital colony ability. My first guess is the instantActionTriggerType you are using isn't supported by the CreateCannonShell buffInstantActionType. I have seen similar situation with other buffInstantActionTypes. Give it a look and see if you note any differences like that.

Reply #9 Top

I read somehwere on this forum that the i>=0 errors mean you missed a quote in some file. (Which would cause the affected file to malfunction while not causing a minidump) Note however that they aren't infinite, at least if they're the same as the ones I get. I haven't managed to locate the source, but I get about 35 of them in a row. "Skip All" can skip through them iirc, if not just mash the button. You might even see a buff-related error after clicking through these. Keep playing until you use the ability once. Many errors are only recognised when you access a relevant file (i.e. String Not Found errors only occur when the string should be shown, not at startup)

The OnBuffFinish trigger works, as that's what the original Kostura uses. The Center reference should also work, as all stock meshes have that hardpoint. (and if a custom mesh doesn't it should get one immediately)

 

Try splitting each of the actions off from this buff into a seperate one, and replace the instantActions in this one with 2 ApplyBuffToSelf, triggered OnDelay after 0s. The CreateCannonShell might require a seperate buff (at least I've never seen it used alongside other instantActions in the same one)

Maybe give each of these new buffs a passive boost (armor/damage/whatever) to check which of them are even applied, then check which of them actually execute properly.

 

You could also try remaking the ability from scratch, copying only from unmodded reference files. Pay attention so you don't get any typos, and see if that works. If it does use this remade ability, if it doesn't you know the problem isn't caused by typos or similar errors.

Reply #10 Top

I read somehwere on this forum that the i>=0 errors mean you missed a quote in some file. (Which would cause the affected file to malfunction while not causing a minidump) Note however that they aren't infinite, at least if they're the same as the ones I get.

Ok. This is why I wrote the Sins editor to prevent simple typos like missing quotes or miss-spelled keyWords. Maybe Eclipse seems to complicated when people first look at it, but once it is setup and running it becomes very routine:

Open File in Eclipse Text Editor... Make Changes... Instant feedback on syntax errors, missing references etc.

Occasionally when new files are added or removed a full revalidation of the project is required which is just the menu option Project/Clean... which forces a revalidation of all your mod assets.

You also have support for auto completion [ctrl]+[space bar] and syntax coloring.

Not sure how many people use as there is little feedback except from those I have personally helped get setup which is around 6 or so now. There appears to be somewhere from 15-30 people using based on the patch downloads.

The OnBuffFinish trigger works, as that's what the original Kostura uses. The Center reference should also work, as all stock meshes have that hardpoint. (and if a custom mesh doesn't it should get one immediately)

Cool! was just a thought.

 

Reply #11 Top

I'm still having a ton of trouble with this ability.  I've gotten everything working now except for the cannonshell.  It still just won't fire, period.  As far as I can tell, this ability follows the pattern of the Kostura ability to the letter.  It also follows Zombies' BuffPlagueOrbitalCannon.entity exactly.