Quick Question Regarding Spell Effect Capability

I've been trying to implement a tactical spell that adds a spell/ability to the target for the remainder of the fight.

 

I essentially used spells like 'defiled benediction' as a template, just exchanging the strategic tag for a tactical tag. I added a target spell for it to unlock, but so far this does not seem to work at all. Has anyone tried this? Is it possible?

 

If not, I'll just have to modify the concept a little bit. . . but it would be better if I could implement it this way for flavor.

 

Thanks!

9,455 views 8 replies
Reply #1 Top


i think the concept will work, but the way you i,plemeneted it will need to be tweaked. I'm just thinking this through without looking at the code atm, but the code for the potions seem more in line with what you want.

Take the fire blast potion for example, just add in some cooldown option so the affected unit can "breath fire" several times during the battle.

 

I'm currently pulling the code apart so i can pull together effects like this in order to make new things.

Reply #2 Top

Not a bad idea, I'll take a look at the potions. Thanks for the suggestion!

Reply #3 Top

I got the effect to work. Turns out I just needed to set the autounlock flag in the spell I wanted to unlock during combat.

 

Another question:

Has anyone tried to change things in elementaldefs.xml with <gamemodifier>? I tried a few different things for <modtype>, <attribute> and <value> but nothing seemed to do anything.

Reply #4 Top

Supposedly there's ChangeWorld but I never got anything to work using it.

Reply #5 Top

I think I remember Frogboy posting about that. . . I wonder if they ever plugged it in.

 

Time to mess around with it. I'll post something here if I get anything to work. Thanks for the idea Heavenfall!

Reply #6 Top

I never got the ChangeWorld to work. It looks like the functions must be explicitly added to the game engine.

 

I did get a spell to work that adds an ability for the rest of the combat (all I was missing was the IsCastable tag in the target ability).

 

Another question. . .

Trying to use values in calculating the effect of a spell, for instance using ![CDATA[[UnitOwner_GetMana]]] 

I'm guessing this evokes the UnitOwner_GetMana function or method that has been hard coded into the game. So if I wanted to make my own resource and use it to calculate spell effects, is there any way to access it in a similar fashion?

I already tried ![CDATA[[UnitOwner_Get*NEWRESOURCENAME*]]], which unsurprisingly did not work. Is there a workaround to access this, or do I have to wait for an API release or game update?

Reply #7 Top

I attempted to pull the Gold amount from our nice little accountant, and failed. I believe that only mana can be pulled in such a fashion, at this time.

I think you can make a work around, though. Creating a hidden value, whos amount is based on the amount of gilder, and taking it.

Heavenfall is way more proficient than I am at this, though, so him confirming it will be good.

 

 

Reply #8 Top

Yes it is hardcoded, no I can't think of a workaround.