• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Substituting values in object data

Status
Not open for further replies.
Level 1
Joined
May 15, 2017
Messages
3
Substituting, transposing. There is probably a technical vernacular for what I am describing, but I'm new to the WC3 modding scene.

It is done a few times with some abilities. E.g. this from ANav — Avatar (Neutral)
Ubertip
Activate Avatar to give Lord Garithos <ANav,DataA1> bonus armor, <ANav,DataB1> bonus hit points, <AHav,DataC1> bonus damage and spell immunity. |nLasts <ANav,Dur1> seconds.​
I chose that as an example because it was rife with them. Also, because it has an error in it.

Anyway, so I've attempted to do the same with unit definitions, but to no avail. In the Tip field any such text is printed verbatim; in the Ubertip field it is always converted to a 0 (0x30 in ASCII). Same thing whether the referenced value is an integer, string, or real, or whether it occurs in a new unit definition or a pre-existing one.
Does this only work for abilities strings?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
It is possible it only works for ability data. When trying to reference unit data it instead looks for an ability with that typeid and fails to find one or the referenced field and hence prints 0.

Or are you trying to reference ability data from a unit tooltip?
 
Level 1
Joined
May 15, 2017
Messages
3
Ah, yes; I should've been more clear. I was aiming to reference a value from elsewhere in a unit type with a unit tooltip.

Honestly, it never occured to me that it might be working across classes. I'll give that a few experiments.

Thanks!
 
Status
Not open for further replies.
Top