• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Dress NPCs coremod

Seasons

Member
Operating System: Ubuntu Server 16.04

After merging your Dress NPCs branch and my local branch, and then re-running CMake and recompiling the source, it didn't seem to work on a creature in game. I've tried using the NPC's entry ID from the creature_template table, as well as using the creature's model ID, neither worked. Did I do something wrong, Rochet? :p
 

Rochet2

Moderator / Eluna Dev
Operating System: Ubuntu Server 16.04

After merging your Dress NPCs branch and my local branch, and then re-running CMake and recompiling the source, it didn't seem to work on a creature in game. I've tried using the NPC's entry ID from the creature_template table, as well as using the creature's model ID, neither worked. Did I do something wrong, Rochet? :p

Yes. You should be using your own chosen creature_template_outfit.entry in creature_template.modelid column as a negative value. See the example sql from src/server/scripts/custom/dressnpcs/
Basically you make an outfit and then use it as a modelid, but negative so the core recognizes that it is an outfit and not a normal modelid.
It allows you to use the existing models and outfits or just random outfits for npcs :)
 

Seasons

Member
Yes. You should be using your own chosen creature_template_outfit.entry in creature_template.modelid column as a negative value. See the example sql from src/server/scripts/custom/dressnpcs/
Basically you make an outfit and then use it as a modelid, but negative so the core recognizes that it is an outfit and not a normal modelid.
It allows you to use the existing models and outfits or just random outfits for npcs :)

Ahhh! Thank you!:)
 

Seasons

Member
Has anyone figured out the client modification that needs to be made for creature sounds to work with these customized models? You can't add negative values to CreatureDisplayInfo.dbc without the server daemon crashing.

Since we use positive values in the database to represent creature outfits and negative values for the modelID on creatures, a positive ID in the aforementioned DBC file doesn't properly align; therefore, creature sounds don't work in-game.
 

Rochet2

Moderator / Eluna Dev
Has anyone figured out the client modification that needs to be made for creature sounds to work with these customized models? You can't add negative values to CreatureDisplayInfo.dbc without the server daemon crashing.

Since we use positive values in the database to represent creature outfits and negative values for the modelID on creatures, a positive ID in the aforementioned DBC file doesn't properly align; therefore, creature sounds don't work in-game.

The displayid that is used for the creatures is determined automatically by the code based on the outfit race and gender.
In reality the displayid the creatures use are the same that the player uses, which are all positive. For example I think 56 or 59 is some modelid of a race.

What you would need to do is to enable the sounds for those displayids.

I believe there was a field that either contained a flag that disabled the sounds or there was a field that contained the soundid and it was empty.
However atm I cannot remember where and what it was.
It should also be noted that some DBC tables are linked "loosely" so that an entry in A.dbc and B.dbc are linked only by having the same ID field. A.dbc does not necessarily contain a field that would contain the value for B.dbc row.
 

Seasons

Member
The displayid that is used for the creatures is determined automatically by the code based on the outfit race and gender.
In reality the displayid the creatures use are the same that the player uses, which are all positive. For example I think 56 or 59 is some modelid of a race.

What you would need to do is to enable the sounds for those displayids.

I believe there was a field that either contained a flag that disabled the sounds or there was a field that contained the soundid and it was empty.
However atm I cannot remember where and what it was.
It should also be noted that some DBC tables are linked "loosely" so that an entry in A.dbc and B.dbc are linked only by having the same ID field. A.dbc does not necessarily contain a field that would contain the value for B.dbc row.

Column 13 in CreatureDisplayInfo.dbc references a row in NPCSounds.dbc, which then references one or more rows in SoundEntries.dbc. For example, modelID 1371 in the first DBC file references row 128 (in column 13) of NPCSounds.dbc, which then references several rows in SoundEntries.dbc. Each of these sound entries are related to an orc vendor.

I'm merely confused as to which display ID I need to patch to effectively enable NPC sounds.

After re-reading your post, I logged in and ran the .npc info command against the creature and it returns 51 as their display ID. Is that what I need to patch?
 
Top