Well, vanilla taint and elven wood, when fired, cast an invisible object.
If you look in
Data\ini\object\evilfaction\evilfactionbuildings.ini. Search for an object named "TaintLand"
That's where all the attribute modifier auras are, for the power.
I created my own object for my power. Then i gave it a spawn behavior, much like a creep lair.
The spawned object has this code: (I had to tweak the lifetime and destruction delay to match my FX.)
Object FrozenWastelandLandEgg Draw = W3DScriptedModelDraw ModuleTag_Draw DefaultModelConditionState Model = None End End KindOf = INERT IMMOBILE UNATTACKABLE NO_COLLIDE Body = ActiveBody ModuleTag_MakesKillWork MaxHealth = 1 End Behavior = LifetimeUpdate ModuleTag_HatchTrigger MinLifetime = 3000 MaxLifetime = 3000 End Behavior = SlowDeathBehavior ModuleTag_HatchProcess DestructionDelay = 1000 FX = INITIAL FX_FrzWastelandGround EndEnd
The death FX is what lays down a Decal. You don't want the decal to have too long of a lifetime, in case someone casts Elven Wood and replaces your power.
Also if you look closely, at the elven wood and taint textures, ingame, placed by the power. They have a hexagonal shape and actually snap to an unseen grid. So if you use an FX decal it's
rarely, perfectly in the center of the tainted land texture. I was able to tweak my offset just a little bit to make it better, but in the end I had to make my decal a little bit bigger than the actual Taint texture.
In the FXList for the decal, you just need this little line of code:
PlayEvenIfShrouded = Yes
You don't want to make the Taint texture underneath your Decal smaller, because then if you use the power to replace another similar power. It doesn't replace the entire texture of the other power, it turns it into a "doughnut" shape.
Now, the only bug left is kinda minor. My power is based on Taint right? Well if you place the power somewhere, and an ally places the actual taint power in the same spot later, your taint "Object" doesn't disappear because it's a similar power....SO, your object keeps firing the FX Decal, and it looks like your power is still in effect, but if you place units there, they would only get the Taint bonus. It's a minor bug, IMO, and I don't think I'm going to be able to fix it. I'm actually pretty happy with what I have so far, so I'm satisfied.
Here's the finalized power:
Clicky (The first picture, in the first post.)
Edited by Ganon, 22 September 2011 - 08:06 AM.