• 🏆 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!

UnitClass

Status
Not open for further replies.
Level 1
Joined
Jul 8, 2015
Messages
4
What is the purpose of the unitClass field in the unit data (think it's units.slk)? Units are given classes with such unimaginative and uninformative names as HUnit01. As far as I can tell, it conveys no information whatsoever. Units with no class assigned seem to behave exactly the same as those with any particular arbitrary class, and there doesn't seem to be any JASS function to retrieve it.
 
Level 2
Joined
Dec 24, 2009
Messages
34
Is this different from unit ID, or is this more specific about a units way of acting?
Never heard of Unit class names either :p
 
Level 1
Joined
Jul 8, 2015
Messages
4
It is not the unit ID. In one of the the unit data files (I think it's Units\UnitsUI.slk), you can find units by their unitID in the leftmost column, like 'nomg' for Neutral Ogre Magi. Each unit then has many properties in subsequent columns, like file (the path for the model file), name (the name for the unit displayed ingame), and unitSound (the path for the voice file). Some of them are somewhat obscure, like useClickHelper (no clue), but most of them do have some function if you look deep enough.

Some values though, like mana0 or realdef (in a different spreadsheet, maybe UnitData.slk), appear literally useless. One of these is unitClass. But every unit in WC3 is given a class, like 'HHero03' (presumably for Human Hero 3) or 'animal' or whatever. It seems like it should mean something. Just wondering if it does.

E: Confused 'name' with 'Name'. Apparently the lowercase one is not the name used ingame. Not sure what that one's for either.

Blizzard is weird.
 
Level 12
Joined
May 22, 2015
Messages
1,051
They might have just been fields that ended up going unused or something. It may also play into some AI stuff, but I have no idea. I don't know if you can even retrieve / modify the value from the editor.
 
Level 1
Joined
Jul 8, 2015
Messages
4
They might have just been fields that ended up going unused or something. It may also play into some AI stuff, but I have no idea. I don't know if you can even retrieve / modify the value from the editor.

I can't find it in the World Editor, but you can definitely modify it in your map if you use an MPQ editor. Simply add unitClass=myclass.
 
Level 1
Joined
Jul 8, 2015
Messages
4
Apparently it's used for ordering units in the Object Editor within a particular folder. Units are organized by things like custom/race/campaign/special/building in explicit folders. Below that, they are ordered by unit class in alphabetical order. And if they are in the same unit class . . . who knows?
 
Status
Not open for further replies.
Top