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

How does the game organize Object Editor data?

Status
Not open for further replies.
Level 37
Joined
Jul 22, 2015
Messages
3,485
After many tests with JNGP, I came to the conclusion that the object editor organizes it based off the unit ID you copied from, followed by the name. I've spent the past week or so organizing all my towers in my map with this method, and it has been working perfectly fine until now ...


Object Editor Screenshot
0O9Yg9e.png
As you can see, I made all the Fire Towers off the unit id nbt1, and all the cold towers ndt1. The Ice towers should be listed AFTER Fire Towers because d obviously comes after b, but why are they over Inferno Tower Level 5 & 6?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
"Ember Tower"
"Flame Tower"
"Frost Tower"
"Glacier Tower"
"Inferno Tower"

E comes before all others followed by F, then G and finally I.
Flame Tower is above Frost Tower because Fl is before FR.
It is alphabetical sorted by the name of the unit... not by the unit type id.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
"Ember Tower"
"Flame Tower"
"Frost Tower"
"Glacier Tower"
"Inferno Tower"

E comes before all others followed by F, then G and finally I.
Flame Tower is above Frost Tower because Fl is before FR.
It is alphabetical sorted by the name of the unit... not by the unit type id.

Hmmm... could you explain this then? D:


Object Editor Data
NXQALtI.png
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
@KILLCIDE
I can give you exactly the same screenshot from my editor... if I would want to.
When you edit the name of an object, it doesnt update its position in that list yet.
So if you created a lot of objects and then editted their name all together, then you get that result.
There are probably more ways to get that result but this is just the first thing that comes up in my mind.

But as LordDz mentioned, [ctrl] + [t] or View -> Sort Objects By Name will both re-organize the list of objects.

I dont know if you can sort it by object id though.
 
Level 25
Joined
May 11, 2007
Messages
4,651
" I've spent the past week or so organizing all my towers in my map with this method,"
Sounds like you want them organised, and having them being listed by alphabetic order (by name) is a way of doing that.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
@KILLCIDE
I can give you exactly the same screenshot from my editor... if I would want to.
When you edit the name of an object, it doesnt update its position in that list yet.
So if you created a lot of objects and then editted their name all together, then you get that result.
There are probably more ways to get that result but this is just the first thing that comes up in my mind.

But as LordDz mentioned, [ctrl] + [t] or View -> Sort Objects By Name will both re-organize the list of objects.

I dont know if you can sort it by object id though.

You have to restart editor for it to take effect.

" I've spent the past week or so organizing all my towers in my map with this method,"
Sounds like you want them organised, and having them being listed by alphabetic order (by name) is a way of doing that.

Well my efforts were to just try to get them sorted by id. If I won't be able to do what I want to do, then thats okay :) but in the end, I do want to figure out how they get organized by the editor. Take a look at this example


Object Editor Data
d12Qi3C.png
 
Level 12
Joined
May 22, 2015
Messages
1,051
I'm thinking it might be:
first letter of unit id (basically depends on race copied from)
alphabetical order

I have noticed things like this as well. I am not sure exactly the cause, but I know that in my abilities list, it is like:
Hero abilities that I made into regular abilities in alphabetical order
Regular abilities in alphabetical order

They are grouped by something that is either hardcoded or has to do with their ID in some way, and then sorted alphabetically.

If they were sorted by ID and then name, all alphabetically, id would take priority over everything and they'd basically be in order that they were created, unless you make units with lower IDs (requires deleting or purposely making units with higher IDs first).
 
Level 17
Joined
Dec 11, 2014
Messages
2,004
Here is what I did:

I was terraining Stuff, like Oak (1), Oak (2)...
I Basically had Oak (1-3) from the Beginning, and I DIDN'T USE JNGP.

How I CnPed Them:

I Selected Oak (1) in the List.
Copied it.
Selected Oak (1) Again.
Pasted.
The New Oak (1) appears On Top of the old Oak (1).

Did the Same as for Oak (1) and It Appeared "Under" old Oak (2).
Did the Same as for Oak (2) and It Appeared "Under" old Oak (3).


I checked Raw Id's and And Found this:

D00T:BPca (New Oak 1)
D00H:BPca (Old Oak 1)
D00I:BPca (Old Oak 2)
D00U:BPca (New Oak 2)
D00J:BPca (Old Oak 3)
D00V:BPca (New Oak 3)


PS: Tests were with Birch (1-3), but I'm sure that Doesn't make a Difference.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Here is what I did:

I was terraining Stuff, like Oak (1), Oak (2)...
I Basically had Oak (1-3) from the Beginning, and I DIDN'T USE JNGP.

How I CnPed Them:

I Selected Oak (1) in the List.
Copied it.
Selected Oak (1) Again.
Pasted.
The New Oak (1) appears On Top of the old Oak (1).

Did the Same as for Oak (1) and It Appeared "Under" old Oak (2).
Did the Same as for Oak (2) and It Appeared "Under" old Oak (3).


I checked Raw Id's and And Found this:

D00T:BPca (New Oak 1)
D00H:BPca (Old Oak 1)
D00I:BPca (Old Oak 2)
D00U:BPca (New Oak 2)
D00J:BPca (Old Oak 3)
D00V:BPca (New Oak 3)


PS: Tests were with Birch (1-3), but I'm sure that Doesn't make a Difference.

Ahh okay :) that makese sense. Thank you!
 
Level 12
Joined
May 22, 2015
Messages
1,051
... I know what CnP means. I was asking for a more detailed explanation of "...how you CnP them." It is a rather vague statement.

I think it's mostly what unit you copied in the first place since you keep a similar ID (based on race).
 
Level 12
Joined
May 20, 2009
Messages
822
And here I was, thinking that the original question is about the data format.
Fun fact - Custom objects often do carry the ID of the base object on every field, even though it appears to be useless.

Maybe because this happens without it? This definitely seems like what could go wrong if it didn't keep track of what data the spell is actually suppose to have.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I don't think this is it. The data format is like this:
BaseID:NewID
Field:Value
Field:Value
...

However, when copying an already custom object it sometimes puts the NewID of that object in front of every field. Yet, it makes no difference or it would probably break something.
 
Status
Not open for further replies.
Top