• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

LUA - Accessing Object Editor Fields

Status
Not open for further replies.
Level 11
Joined
Sep 14, 2009
Messages
284
Im trying to access different fields of units in the Object Editor using Lua. But I'm having problems finding the currect raw values.

For example 'ulum' is supposed to be the value of lumber cost for a unit, but when using the following function:

Code:
print(BlzGetUnitIntegerField(udg_StatInfoUnit, ConvertUnitIntegerField(FourCC("ulum"))))

it does not work. The function is correct, since it works for 'ustc', which is the raw value for Strength:

Code:
constant unitintegerfield UNIT_IF_STRENGTH = ConvertUnitIntegerField('ustc')

However, the value for Strength in the Object Editor is 'ustr', which does not work in the above function. My guess is that the lumber cost (along with a bunch of other fields) have different raw values than appears in the Object Editor. Does anyone know where to find these?

And no, they are not in common.j, just a very few of them are.
 
Unless they are in common.j then chances are access to the field is not supported.

The field names appear unrelated to the slk field names which is what WC3 would use for storing the data. As such one can only assume the integer codes are internal codes used by the game engine data management system and not directly related to the object editor.

One can expect more fields and more natives to be added in future Warcraft III updates.
 
The field names appear unrelated to the slk field names which is what WC3 would use for storing the data. As such one can only assume the integer codes are internal codes used by the game engine data management system and not directly related to the object editor.

You can find the field values by pressing CNTRL + D in the object editor. Whether or not any of the undefined ones work, I don't know.

fields.jpg
 
Status
Not open for further replies.
Back
Top