I was wondering if there was a way to allow an ability to have a fluctuating mana cost. For instance, whenever you have it at it's normal state, it may cost 100 mana, but when you activate another ability, it may cost only half of that. I realize, that the most obvious solution would be to create an alternative form of the ability, but considering that I was wanting to use this effect en masse, it would not be ideal to have to create a dummy ability for every single ability within the map.
So, with that being said, since there are ways to alter cooldowns, is there a way to alter mana costs similarly?
There sure is. I found out about this cool new trigger that wasn't around in the World Editor for war3. It's called Catalog Field Value Set. First you would make a trigger to identify when your unit casts the ability you have to lower mana cost, have it check the level it has been learned to and apply that to a variable you already made. Then you could do an if-then statement. You want it to read like this (go into your data editor to make sure this is all the same for your map, I am using the high templar feedback ability, to get the true names I turned on Raw Data in the data editor):
Event
Unit Uses Ability
Actions
Variable - Set (Name of Variable) = (Current level for ability High Templar - Feedback on (Triggering unit))
If
(Name of Variable) = 1 (Showing your skill has been learned and is on level 1)
Then
Catalog - Set value of Abilities(This is a preset that you can choose) "Feedback" "CAbilEffect_Cost_Vital" for player (Owner of (Triggering Unit)) to "((0|0|100))"
If
(Name of Variable) = 2
Then
Catalog - Set value of Abilities "Feedback" "CAbilEffect_Cost_Vital" for player (Owner of (Triggering Unit)) to "((0|0|50))"
If
(Name of Variable) = 3
Then
Catalog - Set value of Abilities "Feedback" "CAbilEffect_Cost_Vital" for player (Owner of (Triggering Unit)) to "((0|0|25))"
And so forth...
I hope this works for you as I haven't tested it out myself. Good luck with your map :)
I was just testing out my own map and realized that I am steering you wrong already. One of the bugs I have is actually from using catalogs. Apparently for the 3rd field you don't enter the whole string "CAbilEffect_Cost_Vital" you only enter the last word after the final underscore; in this case, "Vital" would be the one you need to access mana (energy) cost.
I was wondering if there was a way to allow an ability to have a fluctuating mana cost. For instance, whenever you have it at it's normal state, it may cost 100 mana, but when you activate another ability, it may cost only half of that. I realize, that the most obvious solution would be to create an alternative form of the ability, but considering that I was wanting to use this effect en masse, it would not be ideal to have to create a dummy ability for every single ability within the map.
So, with that being said, since there are ways to alter cooldowns, is there a way to alter mana costs similarly?
@CrimsonTwilight: Go
There sure is. I found out about this cool new trigger that wasn't around in the World Editor for war3. It's called Catalog Field Value Set. First you would make a trigger to identify when your unit casts the ability you have to lower mana cost, have it check the level it has been learned to and apply that to a variable you already made. Then you could do an if-then statement. You want it to read like this (go into your data editor to make sure this is all the same for your map, I am using the high templar feedback ability, to get the true names I turned on Raw Data in the data editor):
Event Unit Uses Ability
Actions
Variable - Set (Name of Variable) = (Current level for ability High Templar - Feedback on (Triggering unit))
If (Name of Variable) = 1 (Showing your skill has been learned and is on level 1) Then Catalog - Set value of Abilities(This is a preset that you can choose) "Feedback" "CAbilEffect_Cost_Vital" for player (Owner of (Triggering Unit)) to "((0|0|100))"
If (Name of Variable) = 2 Then Catalog - Set value of Abilities "Feedback" "CAbilEffect_Cost_Vital" for player (Owner of (Triggering Unit)) to "((0|0|50))"
If (Name of Variable) = 3 Then Catalog - Set value of Abilities "Feedback" "CAbilEffect_Cost_Vital" for player (Owner of (Triggering Unit)) to "((0|0|25))"
And so forth...
I hope this works for you as I haven't tested it out myself. Good luck with your map :)
I was just testing out my own map and realized that I am steering you wrong already. One of the bugs I have is actually from using catalogs. Apparently for the 3rd field you don't enter the whole string "CAbilEffect_Cost_Vital" you only enter the last word after the final underscore; in this case, "Vital" would be the one you need to access mana (energy) cost.
@Zeban: Go
CAbilEffect_Cost_Vital :Wrong
Vital :Wrong
Vitals :Wrong
Cost_Vital :Wrong
Cost_Vitals : Wrong
@Maxi247: Go
Try
Cost[Vital]
or
Cost.Vital
@s3rius: Go
CAbilEffect_Cost_Vitals : wrong
CAbilEffect[Cost][Vitals] : wrong
Effect.Cost.Vitals : wrong
Effect[Cost][Vitals] : wrong
Cost.Vitals : wrong
Cost[Vitals] : wrong
CAbilEffect_Cost_Vital : wrong
CAbilEffect[Cost][Vital] : wrong
Effect.Cost.Vital : wrong
Effect[Cost][Vital] : wrong
Cost.Vital : wrong
Cost[Vital] : wrong
@CrimsonTwilight: Go Answer is
Cost[X].Vital[Y]
X = level Y= Shield/Energy/Life
Thanks Maxi! Will sure be useful in the future.
Somebody with permission add this to the wiki!
Done so, I hope I got it right:
http://wiki.sc2mapster.com/galaxy/triggers/catalog-field-value-set/