This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [Solved] How to give a tavern (wmo) a custom name ?  (Read 1999 times)

Magnus

  • Moderators
  • Wiki Incarnate
  • *****
  • Posts: 147
    • View Profile
[Solved] How to give a tavern (wmo) a custom name ?
« 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.
2. The setID of such a set is saved in the nameSet field of the MODF 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 ?
« Last Edit: September 13, 2015, 04:14:40 pm by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #1 on: September 13, 2015, 11:31:01 am »
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."?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Magnus

  • Moderators
  • Wiki Incarnate
  • *****
  • Posts: 147
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #2 on: September 13, 2015, 11:40:19 am »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #3 on: September 13, 2015, 11:44:15 am »
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?).
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #4 on: September 13, 2015, 11:44:36 am »
at least that's what I can guess from the top of my head.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Magnus

  • Moderators
  • Wiki Incarnate
  • *****
  • Posts: 147
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #5 on: September 13, 2015, 12:08:04 pm »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #6 on: September 13, 2015, 01:39:47 pm »
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?)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Magnus

  • Moderators
  • Wiki Incarnate
  • *****
  • Posts: 147
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #7 on: September 13, 2015, 01:52:20 pm »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Morfium

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 96
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #8 on: September 13, 2015, 02:03:55 pm »
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. ^^;
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Magnus

  • Moderators
  • Wiki Incarnate
  • *****
  • Posts: 147
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #9 on: September 13, 2015, 02:57:57 pm »
Already tried :-)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Magnus

  • Moderators
  • Wiki Incarnate
  • *****
  • Posts: 147
    • View Profile
Re: How to give a tavern (wmo) a custom name ?
« Reply #10 on: September 13, 2015, 03:43:15 pm »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »