• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Change "Ability Upgrade" field for engineering upgrade through trigger

Status
Not open for further replies.
Level 1
Joined
Feb 8, 2020
Messages
3
I'm trying to make an ability replacer script, but seeing as i have quite a few, i would need to change the values of a dummy engineering upgrade on the fly (otherwise i'd need to make 80 factorial different abilities, and i don't have till the heat death of the universe).

Seeing as there's a "Ability - Set ability string level field" entry for "Ability Upgrade" which is what Engineering upgrade uses, i'd assume there would be a custom script to do it, since it needs multiple values.

Otherwise, does anyone have any experience with using Ability - Set String Field?
It seems like setting the research icon to something else doesn't work.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
A lot of those "new" Ability/Unit/Weapon Field functions don't work yet. Anything that would require a separate window like "Targets Allowed" where you would check on/off the different fields is most likely not implemented yet.

Anyway, could you explain in greater detail as to what you're trying to do? There's most likely a better solution.
 
Level 1
Joined
Feb 8, 2020
Messages
3
I wanted to replace a characters spell with another, while also replacing it in the learn field. However, turns out you can't repalce a spell with Engineering upgrade unless it's the same base spell. In the end i just used dummy spells for leveling, and added/gave levels to the actual spell when they were learned. I got the tooltips and name to update on the dummy spell, but not the icon. In the end i decided that would have to be good enough.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
Yeah, this doesn't seem to work yet:
  • Ability - Set Ability: (Unit: Test's Ability with Ability Code: Berserk)'s String Level Field: Icon - Normal ('aart') of Level: 0 to ReplaceableTextures\CommandButtons\BTNDefend.blp
But this does, however it changes the icon for every unit that uses the ability:
  • Ability - Set Icon of Berserk to ReplaceableTextures\CommandButtons\BTNDefend.blp
I wish Blizzard would go through and sort all of these out. Majority of them haven't worked since they were added in what feels like a year ago.
 
Level 1
Joined
Feb 8, 2020
Messages
3
The way around using the global one, is to check if the player who should have their icon changed is also the local player. This doesn't seem to desync, as long as the variables are declared first for every player. Sadly,

if.gif
Ability - Set Icon of Berserk to ReplaceableTextures\CommandButtons\BTNDefend.blp

doesn't replace learn icons of spells either, meaning it's not useful for dummy abilities.
 
Status
Not open for further replies.
Top