How to add fields to object editor, change multiple fields on units?

Level 3
Joined
May 10, 2007
Messages
40
Hello,

Last year I spoke for a bit with Retera about object sorting in the World Editor, and they mentioned the possibility of editing the UnitMetaData.slk file to add "unitClass" as a modifiable field. I unfortunately failed to follow up on this, and I have been coming back to the game recently and still missing how to do this. I tried changing war3x.mpq (I thought it'd be easier to do on an earlier version) and modifying UnitMetaData.slk in there, but this makes the World Editor complain that the mpq is corrupted. I also tried importing the changed UnitMetaData.slk into a map and then reloading the map, but this also has no effect. So I was wondering what the correct process for doing this is?

I have also been really bummed out that OGDMike's Object Editor is completely broken; I remember it working well for me up until last year, but now it is way too easy to corrupt the object data with it, I don't know if it's a java or dotnet compatibility issue. I loved its spreadsheet-approach which made copying data to multiple units so easy. I have read that Retera's Model Editor has a similar object editor, but I cannot get it to work beyond loading up the unit's models. I wish they taught how to make this stuff at computer science.
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
You can try placing Unit MetaData.slk in the game directory with local files enables (path would be Warcraft III / _ retail _l / Units / <file here>) probably, I know it works with Terrain.slk to change tile pathability, never tried with unit data
 
Level 3
Joined
May 10, 2007
Messages
40
You can try placing Unit MetaData.slk in the game directory with local files enables (path would be Warcraft III / _ retail _l / Units / <file here>) probably, I know it works with Terrain.slk to change tile pathability, never tried with unit data
Thank you, I made progress.

I tried adding this row into the file
ucls
unitClass
UnitUI
0
text
WESTRING_UEVAL_UCLS
c1a00
string
t
1
1
0
TTName
0
1
1
1
1
0
Unfortunately, I get a bunch of Missing String errors upon starting up World Editor, and the Unit and Object Editors are blank; I cannot edit anything. I opened up the file in Notepad and noticed that the header was different from the original, but when I replaced it, the result was even worse, with the editor throwing errors about loading triggers and not being able to load a map template. I wonder what the correct way to do this is?

Edit: Oh dear, it doesn't go away when I remove the file
 
Last edited:
Level 3
Joined
May 10, 2007
Messages
40
I believe changes are like stored in the map when saved in WE? What happens if you delete the file, close the editor and open a new blank map ?
It wasn't able to open a map, the map screen was black except for the Missing String errors.

But it has fixed itself now. Maybe the broken version had been cached or something.

EDIT: I got it to NOT give errors. I had read that excel or similar was fine for editing SLKs, but when using an editor specifically for editing warcraft 3 slks, the difference between the original and the modified slk is just 1 KB, whereas with libreoffice it's more than 20 kB, and doesn't work.

I have changed the row a bit, it is now
ucla
unitClass
Profile
-1
text
WESTRING_UEVAL_ICLA
c8a10
string
t
1
1
0
TTName
0
1
1
1
1
0

now, the field shows up correctly. But it is empty for all units, and doesn't do anything when changed. So unitClass may not be the correct field name...

EDIT 2: No, the field is correct. The values are visible in unitui.slk, and I tried inserting a field specific to doodads, and the editor gives a "Referencing unknown database field" error. So it is correct, but something about it is incorrect... I may have to bother Retera if I can't find a lead from here
 
Last edited:
Level 3
Joined
May 10, 2007
Messages
40
Eureka, it was because the third column points to the slk that World Editor is reading from, and I had incorrectly set it to Profile, when it has to be UnitUI!

Thanks for the help!

Although... For some reason Swordsman and Captain are prioritized higher than any other units despite having empty unitClass fields. So there is yet another layer there that the World Editor sorts by... but still, this accounts for 99.99% of the cases

Edit: Nevermind, it's because they have spaces instead of empty strings
 
Last edited:
Top