New Abilities not showing up?

Hi all,

I had been working on a new ability to add to the PJI, which would allow the PJI to have a new ability of temporarily locking down a gravity well, in addition to it's current passive ability.  Gave the PJI some anti-matter and whatnot, set it up right, and enabled the mod.

Well, to put simply, the game runs the mod fine, the anti-matter shows up, the altered slow-down rate shows up, the altered radius shows up, but for some reason the new ability doesn't.  I've typed it into the Planet-module file for the Advent at the moment, right into the next ability slot on the PJI.

Am I looking over a simple step I need to take to make the ability show up, or is it just being buggy on me?

Any help is appreciated,
Drew
3,356 views 9 replies
Reply #1 Top
I think if the ability is badly defined it doesn't show up, could you paste the ability file (if it's not too long)

Also, make sure you have
ability:0 "AbilityHyperspaceDisruption"
ability:1 "YOURABILITYHERE"

Also, the ability file must be identical to the name (what you put for "YOURABILITYHERE") with .entity on the end (YOURABILITYHERE.entity)
Reply #2 Top
I have the ability listed in the planet-module (the ability:0 and ability:1 thing), it takes up the ability:1 slot since the 0 is filled with the Hyperspace Disruption ability. It's an entity file too, so I guess it just must be badly defined, which wouldn't surprise me. It was a kind of "let's test all these things and see what happens sorta deal" so it's kinda cobbled together from various abilities.

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffHyperspaceBlockSpawner"
targetFilter
numOwnerships 1
ownership "Enemy"
numObjects 2
object "CapitalShip"
object "Frigate"
numConstraints 0
range
Level:0 60000.000000
Level:1 0.000000
Level:2 0.000000
effectInfo
effectAttachInfo
attachType "Invalid"
smallEffectName ""
largeEffectName ""
soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "OnlyInCombat"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
isPassive FALSE
antiMatterCost
Level:0 150.000000
Level:1 0.000000
Level:2 0.000000
cooldownTime
Level:0 60.000000
Level:1 0.000000
Level:2 0.000000
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_HYPERSPACEDISRUPTION_NAME"
descStringID "IDS_ABILITY_HYPERSPACEDISRUPTION_DESCRIPTION"
hudIcon "HUDICON_ABILITY_GRAVITYWARHEAD"
smallHudIcon "HUDICON_ABILITY_GRAVITYWARHEAD"
infoCardIcon ""


It had started off as a copy of the HyperspaceDisruption ability, and then with some minor tweaking and some additions, it became what it is now.
Reply #3 Top
ok, for a start it says "ApplyBuffToSelf", but the only allowed targets are frigates and capital ships (ie. not itself). Also, you shouldn't base it off HyperspaceDisruption, you should base it off something like Animosity (AbilityTaunt). I don't think you should use a buff spawner like HyperspaceDisruption uses
Reply #4 Top
Is buffType "BuffHyperspaceBlockSpawner" from the entity file for gravity warhead as well?
Reply #5 Top
No, no, it was just a dummy file copied over from the hyperspacedisruption target and spawner entities. I replaced the hud icon with "gravity warhead" so I'd see if it would pop up or not after several times of it not appearing.

I tried just giving the PJI an already programmed ability, and it seemed to work fine until the PJI started to be constructed, then minidump. I actually am curious if anyone has been able to successfully craft a new ability and have it show up in addition to an existing ability on a structure or ship. It just seems odd that the PJI will have some parts of it working (altered range and charge up time) and others just simply not appearing, but not causing the game to crash.
Reply #6 Top
Well, the minidump would follow an ability that likely couldn't be executed by the PJI - what did you try to give it?

I know you have the target conflict in what you coded, but it's strange that the ability doesn't show up at all, I would think just listing it would make the icon pop up.

Try this: Copy the existing HypserspaceDisruption ability and its buff files, and in BuffHyperSpaceDisruptionTarget, just change the slow down value, and add that ability in slot 1. It would basically be copying the existing ability, so it should show up in theory.
Reply #7 Top
Well, I copied over the abilities of hyperspacedisruption, renamed 'em to hyperspaceblock and altered the timing to something like 4.5 And lo and behold, they showed up!

I guess my only theory would have to be that if the ability's code is nonsense but not breaking, it will just ignore the code altogether and discard it? Which begins to raise questions where in the line did I alter that it decided to stop working...I took out that target filter, and it still refuses to show itself, so now I'm looking through the spawner and target entities as well as the ability file, to see what could be a mistake in writing.
Reply #8 Top
I've made it, it works fine

Havn't changed any of the ability names/icons. Cooldown is low for testing. It also effects both teams, but these things are all easily changable

link to .entity files
Reply #9 Top
A quick update: After some monkeying around and doing some minor altering by copying from a gravity warhead script into a hyperspace disruption script, I got it work! It shows up on screen, when clicked uses antimatter and disables phase jumping for a timed duration, then ends perfectly. Next step would have to be balancing I suppose, since ranges, duration, and cooldown all seem grossly off.

I have no idea what exactly I did to make it appear, but thanks to everyone who helped me figure out this problem!