ability help

im making a new ability and when i start the dev i get a bunch of various errors concerning the range,target filter,and effect info sections.

this is the code:

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffPlanetHarvest"
targetFilter
 numOwnerships 0
 numObjects 1
 object "Planet
 numSpaces 1
 space "Normal"
 numConstraints 0
range
 Level:0 20000.000000
 Level:1 0.000000
 Level:2 0.000000
maxTargetCount
 Level:0 1.000000
 Level:1 1.000000
 Level:2 1.000000
needsToFaceTarget TRUE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Anytime"
aiUseTargetCondition "Invalid"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
 Level:0 0.000000
 Level:1 0.000000
 Level:2 0.000000
cooldownTime
 Level:0 45.000000
 Level:1 0.000000
 Level:2 0.000000
orderAcknowledgementType "ONGENERALORDERISSUED"
researchPrerequisites
 NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_HARVESTPLANET_NAME"
descStringID ""
hudIcon "HUDICON_ABILITY_BEAMBLAST"
smallHudIcon "HUDICON_ABILITY_BEAMBLAST"
infoCardIcon ""

5,902 views 13 replies
Reply #1 Top

Attach this below the targetcount section

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

Reply #2 Top

Don't attach the targetFilter section or you need to choose a different buff instant action type.

Reply #3 Top

im going to upload my mod which has this ability in it,i fixed that problem but now i have a new one.

the idea of the ability was to give the psi orbital refinery which i modded into the game,an ability where it fires a beam at the local planet,and sucks resources in and then generate resources,i can target the planet,but it wont do anything.

Reply #4 Top

Quoting FredLed, reply 3
im going to upload my mod which has this ability in it,i fixed that problem but now i have a new one.

the idea of the ability was to give the psi orbital refinery which i modded into the game,an ability where it fires a beam at the local planet,and sucks resources in and then generate resources,i can target the planet,but it wont do anything.
End of FredLed's quote

Is it meant to be a passive or active ability?

Reply #5 Top

I suggest you remove the target filter and stick with ApplyBuffToSelf, then place an action in your BuffPlanetHarvest (which I suggest you rename to BuffPlanetHarvestSelf): ApplyBuffToLocalOrbitBody. I suggest you copy the setup of AbilityPhaseGate for this (either one will do)

If you're unable to create a beam effect with that setup, use the ApplyTargettedBuffToSelf action (target filter: planets only), applying a BuffPlanetHarvestSelf buff to the Refinery with an ApplyBuffToTarget action to target the planet with any effect you see fit (bombing vulnerability, -pop growth etc) Copy the beam effect from BuffBeamBlastActivated.

 

Or just copy AbilityResourceDrain aka Jarrasul Drain Planet, that seems to do exactly what you want.

Reply #6 Top

okay i got it to work but now there is ANOTHER problem,when the refinery fires the beam it shoots it at random angles all over the planet,i want it to fire strait at the planet. is there a way to do that?

Reply #7 Top

The BuffBeamBlastActivated (I assume you copied the beam effect from this, which is the Cleansing Brilliance beam) has the following line in its beam effect:    weaponEffectImpactOffsetType "RandomMesh"

Change RandomMesh to something else (try Center, planet meshes should have that attach point)

If you set it to Center the beam will go to the center of the planet, so there will be no visible impact effect. This point, however, is the only one that will guarantee that the beam goes straight at the planet from all possible locations of your refinery.

If you're capable of making your own particle effects or can get someone to do it for you, try making one that "explodes backwards", creating spray on the surface of the planet (this spray would go quite far up from an asteroid if it's supposed to be visible on a large planet though, and I know nothing about creating custom particle effects)

Reply #8 Top

what if you changed the attachpoint to surface?

Reply #9 Top

I doubt it'll work. Try it and see.

If you know some basics of 3D modeling you should be able to understand fairly easily: Planet meshes only have vertices on the surface anyway. RandomMesh selects an attachment point from the Vertices the mesh is made of, so RandomMesh would only ever target the surface of a planet. On the other hand, your suggestion of "surface" still includes the opposite side of the planet (which RandomMesh should do too, but honestly I've never seen my anti-planet beam fire "through" the planet)

You (the devs, not you) could write a simple algorithm to calculate the point on the bounding sphere between your ship/refinery and the center of the planet, but I doubt they did, as it isn't used in any stock effects.

If you aren't familiar with 3D modeling please tell me, because then I'll have to come up with another explanation.

 

Edit: Remember though that if you target Center you only lose the impact effect, and the only one that's even properly visible on a planet is the Vasari bombing one, which doesn't fit your ability. The one from Cleansing Brilliance is a blue cloud. Better add a Drain Planet effect to your ability instead.

Reply #10 Top

damn it,yea im familiar with 3d modeling.....the impact effect is essentially the best part of the ability,seeing rocks and lava being sucked into a refinery makes you understand what the ability is doing.

Reply #11 Top

i know in the code for all planet bombardment it has an option to change angle variance,any thing i could do with that?

Reply #12 Top

Angle variance is hard coded I think.

Like I said, try making a custom effect, or use Drain Planet. There is no effect that flings rocks into space.

Reply #13 Top

yea i know i made one.