Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: Magnus on September 13, 2015, 11:26:00 am
-
Hi,
I placed with Noggit a new Goldshire inn onto a map and wanted to give this inn a name.
After reading a lot of stuff I understand this:
1. wmo name (and sounds) are saved in data sets in the WMOAreaTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=WMOAreaTable.dbc).
2. The setID of such a set is saved in the nameSet field of the MODF chunk (http://www.pxr.dk/wowdev/wiki/index.php?title=ADT/v18#MWMO_chunk) of the adt file where the wmo building is placed.
3. The goldshire inn has already 3 different sets with namesetID 0, 1 and 2 in WMOAreaTable. (BTW: The wmo-rootID is 53)
So for the first step I changed with the 010 editor the namesetID of my tavern from 0 to 1. Checked it ingame and it worked. The name changed to 'Deepwater Tavern'. Than I changed it from 1 to 2 and again it worked. The name is now 'Lion's Pride Inn'.
After that I changed the ID from 2 to 3. Ingame I checked it and there was no sound and no name anymore. But that's logical because there is no data set with id 3 in the WMOAreaTable.
After that I copied all 13 records of the data set no. 1 into WMOAreaTable. Changed the nameSetID to 3 and the area ID to 2038 (my zone) and of course the name of the tavern.
But unfortunately this isn't working. There is still no sound and no name.
Personally I think this is only clientside stuff. But I also copied the WMOAreaTable.dbc to the server and restart.
But no luck. Do I need to create new server maps ?
Or what should I do ?
-
You did change m_ID for the new records to have unique ids, right? And you saw the comment on "If your WMO is spawned with NameSet 4, search for the rows with a 3 in here."?
-
Yes, the m_IDs are unique (16000-160012). First I set them 60000+. Than I thought may there is a restriction and set them lower.
And yes, I read "If your WMO is spawned with NameSet 4, search for the rows with a 3 in here." But couldn't find the meaning of this sentence :-)
At the moment my wmo is spawned with namesetID 3.
-
the reason is that modf.nameset == 0 → no name set, and modf.nameset == i → wmoareatablerec:: m_NameSetID == i - 1, thus if you spawn with id 3, add entries for 2 (which in your case already exist?).
-
at least that's what I can guess from the top of my head.
-
That's what I thought in the beginning when I read the sentence ^^ (Decrease by 1).
But I can't confirm that.
modf.nameset == 0 is taking the data set 0 of WMOAreaTable.
There is already a set 0 for this wmo with empty name but with sounds. And that's by default for every new tavern you place with Noggit. I can also proof that because I changed the empty name to a custom 'test' name and after that this name is showing in the client.
After that nameset 1 is coming for the Deepwater Tavern in Menthil, than set 2 for Lion's Pride Inn in Goldshire.
So I have taken the next free one which is 3.
Edit:
Just tested: modf.nameset = 4, WMOAreaTable.nameset=3 is also not working.
-
hmk, can confirm that nameid is not getting a -1 treatment. sorry, no idea then.
(those ids do look smaller than the existing ones though. are you really sure they are unique?)
-
Yes, they are unique, because I import dbc's into a SQL DB and export it after manipulation. And there is a PRIMARY key on this ID row.
The reason why they are so small I wrote already. Before I had ID > 60000 and thought may there is some maximum limitation. Than I set them smaller.
And yeah, I'm surprised that it's not working :) Can't see the reason for.
-
Have you tried removing your zone as a parent? Lion's pride in has no parent zone either, while being in goldshire. But this is more guessing than anything else. ^^;
-
Already tried :-)
-
Ok, found it :D
And that's the first time I have seen this kind of problem.
If you look at the WMOAreaTable.dbc you can see that there is a kind of sort over the WMO_ID column.
If you create a new dbc you have to sort the entries for WMO_ID. Maybe even to sort over 2 columns WMO_ID and NameSetID.
If you just add a new data set at the end of the table, it will not work, even if you use proper values.
The conclusion is that wow is asking for a presorted WMOAreaTable.dbc.
For me not a problem because I have the data in a SQL DB and can export the data with an 'ORDER BY'. If somebody is using tools like MyDbcEditor I think the only way will be to export it as CSV, sort it manually and import it after.