User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 7 of 9

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

  1. #1
    Retired Staff <s><span style='color: #006400'><span class='glow_006400'>Jameyboor</span></span></s>'s Avatar
    Join Date
    Apr 2013
    Location
    The Netherlands
    Posts
    768
    XP
    300,391
    Level
    116
    Thanks
    230
    Thanked 164 Times in 112 Posts

    [ArcEmu/Trinity] [How-To] Insert multiple rows into item.dbc

    I still see some people adding their custom items one by one, this can be done much faster:

    Download:
    DBCUtil to convert dbc's.
    CSVed to edit your converted files.
    Ladik's MPQ Editor 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)
    Trinity:
    Code:
    SELECT entry, class, subclass, soundoverridesubclass, quality, displayid, inventorytype, sheath FROM item_template WHERE entry > 100000
    ArcEmu:
    Code:
    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 )
    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.
    Last edited by Jameyboor; 09-16-2013 at 06:26 AM.
    Achievements:
    Shopper Referrer 1 year registered Member Level XL Level C
    Awards:
    Member of Staff Support Smartass LOL Scripter Facepalm! Raffle Winner
    You miss 100 percent of the shots you never take.

  2. The Following 8 Users Say Thank You to Jameyboor For This Useful Post:


  3. #2
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    7,399
    XP
    3,449,919
    Level
    378
    Thanks
    891
    Thanked 1,860 Times in 1,121 Posts
    Thanks for sharing!

  4. #3
    Moderator <span style='color: #FF1493'><span class='glow_000000'>Vitrex</span></span>'s Avatar

    Join Date
    Sep 2013
    Location
    Vilnius , Lithuania
    Posts
    1,068
    XP
    1,001,042
    Level
    174
    Thanks
    286
    Thanked 140 Times in 100 Posts
    Nice share - Thank you !

  5. #4
    Enthusiast Etox's Avatar
    Join Date
    Sep 2013
    Location
    Lucky-Gaming
    Posts
    58
    XP
    2,544
    Level
    14
    Thanks
    12
    Thanked 7 Times in 1 Post
    Awesome :)
    On my heidisql I can't copy data and copy selected rows as csv's :c

  6. #5
    Original Poster
    Retired Staff <s><span style='color: #006400'><span class='glow_006400'>Jameyboor</span></span></s>'s Avatar
    Join Date
    Apr 2013
    Location
    The Netherlands
    Posts
    768
    XP
    300,391
    Level
    116
    Thanks
    230
    Thanked 164 Times in 112 Posts
    Updated tutorial for the newer versions of HeidiSQL \o/
    Achievements:
    Shopper Referrer 1 year registered Member Level XL Level C
    Awards:
    Member of Staff Support Smartass LOL Scripter Facepalm! Raffle Winner
    You miss 100 percent of the shots you never take.

  7. The Following User Says Thank You to Jameyboor For This Useful Post:


  8. #6
    Enthusiast Etox's Avatar
    Join Date
    Sep 2013
    Location
    Lucky-Gaming
    Posts
    58
    XP
    2,544
    Level
    14
    Thanks
    12
    Thanked 7 Times in 1 Post
    Bah the part where I copy the things into csv annoys me, shall everythin go into the first column? Or will it spread?

  9. #7
    Epic Member Xcynic's Avatar
    Join Date
    Apr 2013
    Location
    Sweden
    Posts
    369
    XP
    9,086
    Level
    28
    Thanks
    55
    Thanked 79 Times in 58 Posts
    Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •