View Full Version : [ArcEmu/Trinity] [How-To] Insert multiple rows into item.dbc

09-13-2013, 04:54 PM
I still see some people adding their custom items one by one, this can be done much faster:

DBCUtil (http://fbe.am/flF) to convert dbc's.
CSVed (http://www.snapfiles.com/get/csvdb.html) to edit your converted files.
Ladik's MPQ Editor (http://www.softpedia.com/get/Programming/File-Editors/Ladik-s-MPQ-Editor.shtml) to make the custom MPQ patch.

Step 1.
This tutorial is done with HeidiSQL, so open it up.
First we need to select some columns of your desired custom items to get the right structure of item.dbc.
Use the following queries and modify the WHERE clause to your preferences (I am going to do all my custom items with an entry higher than 100000)

SELECT entry, class, subclass, soundoverridesubclass, quality, displayid, inventorytype, sheath FROM item_template WHERE entry > 100000


SELECT entry, class, subclass, field4, quality, displayid, inventorytype, sheathID FROM items WHERE entry > 100000

Now, run the query, you should get your custom items returned, with only some of the columns, this is exactly what we need.

Step 2.
Make a backup of your item.dbc ( just incase) , once done, drag one of the item.dbc's ontop of the DBCutil.exe, a screen should popup converting the dbc to csv.

Step 3.
If you succesfully did Step 2, a new file should pop up, named item.dbc.csv, open it with CSVed.

Step 4.
Go back to HeidiSQL and select everything in the table that belongs to your query.
For the old versions of HeidiSQL:
Then, right-click -> copy data -> copy selected rows as CSV
For the newer:
right-click -> export griddata.
Use these options ( make sure to uncheck the "with tablenames" option ) :

Step 5.
Back to CSVed with the opened item.dbc, you should have 1 column with values in them separated by a comma.
scroll all the way down, then select the last record, now right-click -> paste record(s) below cursor pos
Now, all the data is in the file, the only problem is that the new values are separated with a semilcolon.
To fix this : CTRL + F tick the replace all box and fill in :
find : ;
replace : ,
and click on replace.

Step 6.
Save your csv file.
Now drop the item.dbc.csv onto the DBCutil.exe again, it will convert back into a dbc file, place this dbc into your dbc folder.

Step 7. The last step ( finally :eek: )
To show the changes the client needs to know that there are custom items aswell, this is done by making a custom .MPQ
Open up Ladiks MPQ editor and click on file -> create new MPQ file , name it : Patch-X.MPQ where the X represents anything from a - z or 1 - 9.
Click next, again next, next again, and now you should be on the screen where you need to choose the format of the patch.
Keep it at 2.0 but be sure to uncheck the create the attributes file, now click finish.
On the left panel you will see your patch, right click the folder and click on "new folder".
Name it exactly : "DBFilesClient" without the quotes.
Now right-click your new folder that is inside your custom patch and click on : Add File(s) , head to your dbc folder and select your new item.dbc
Now your patch is done, place it inside your Wow/data folder (make sure to give the patch to anyone playing on your server to make them see the changes) and restart the Server + WoW + Delete Cache,
Congratulations, you did it.
Now go and be happy.

09-13-2013, 05:01 PM
Thanks for sharing!

09-14-2013, 05:35 AM
Nice share - Thank you !

09-16-2013, 05:25 AM
Awesome :)
On my heidisql I can't copy data and copy selected rows as csv's :c

09-16-2013, 06:27 AM
Updated tutorial for the newer versions of HeidiSQL \o/

09-16-2013, 12:46 PM
Bah the part where I copy the things into csv annoys me, shall everythin go into the first column? Or will it spread?

09-16-2013, 04:26 PM

09-16-2013, 07:28 PM
I think I fail at the part where you change ; to ,

06-13-2014, 10:54 AM
When i open item.dbc.cvs i get other result than you, i have spread columns, and when i paste mine info they pasting in one column, how to spread them?