Jump to content

Itemdisplayinfo.dbc to Item_template

By Darkkang
in Serverside

Recommended Posts

Hi! I've converted MoP, WoD and Legion items to Cataclysm.
But I don't want to create item one by one in the DB Item_template. Is there any way to pass the DBC "ItemDisplayInfo.dbc" to "Item_template"?

I know you can from "item.db2", but what I need is from ItemDisplayInfo.
Thank you!

Link to comment
Share on other sites

Hello there!

It is possible to pass data from itemdisplayinfo to item_template to automatically generate items, but one big issue you'll come across is that it is often hard to distinguish what displayid is used for what inventorytype.

Your starting point is to work with leftmodel, leftmodeltexture, rightmodel and rightmodeltexture. Create a program or a query that scans these columns for common terms to describe an item. An axe is always known as axe_1h or axe_2h. A cloak is always known as cape_ and doesn't have leftmodel or rightmodel entries. Helmets are almost always prefixed with helm_, but you'd want to check both model and texture. Shoulderpads are more random.

Then, you want to scan uppertorso and lowertorso. If both of them have a string then you know it's going to work in the chest slot. But chests also have textures on upperarm, lowerarm, upperleg and lowerleg. Not only that, you'd need to inspect the geoset properties to determine if it's a robe instead of a chest item. In some cases, you'll be lucky - belts for example usually have the word 'belt' in them. Other cases, not so.

Repeat for all the other inventorytypes too. You want to keep this in mind:

LeftModel/RightModel: InventoryTypes 1, 3, 13, 14, 15, 16, 17, 21, 22, 23, 25
UpperArm: InventoryTypes 4 5 20
LowerArm: InventoryTypes 4 5 9 10 20
Hands: InventoryTypes 9 10
UpperTorso: InventoryTypes 4 5 19 20
LowerTorso: InventoryTypes 4 5 6 19 20
UpperLeg: InventoryTypes 4 5 6 7 20
LowerLeg: InventoryTypes 4 5 7 8 20
Foot: InventoryTypes 7 8

I gave up trying to determine what displayid was meant for what slot and opted to make every item possible using the displayids.

Also, if you're using WoD or beyond, you'll be dealing with FileData entries instead of the strings for files. You'll need to cross-reference ItemDisplayInfo with TextureFileData and FileData in order to resolve the values into strings. Everything else continues on from there.

Iy6QvK4.png

Link to comment
Share on other sites

Once you get your item.dbc work done, its fairly simple and I've even written a program for it already:

However, this assumes you've got item.dbc. If you want to get even that DBC generated... well, thats a hard thing to do. I've never created such a script, mainly because:

1. Blizzard's displayIDs (and those made by modders as well :P) tend to be a horrible mess, yet they work correctly, which renders such script useless against pretty much anything what isn't done in a clean way.

2. Distinguishing between some items (like shirts vs chests) is hard or impossible.

3. To specify item, you need to set not just its InventoryType, but also class and subclass correctly. How do you want to teach your script how to distinguish one handed axe from one handed sword? You can't do that. The same applies to shield vs weapon. The same applies to armor subclasses (none vs cloth vs leather vs mail vs plate).

 

You can make a way around this, make your script "smart" so it makes decisions based on for example texture/model names, but it will never be really reliable, and it would take quite a lot of work. In the end, you'd have to go through generated data and fix by hand whatever won't be OK. So I'd say that making item.dbc by hand and using my app afterwards is actually a better way of doing this.

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

×
×
  • Create New...