Forum > Resources and Tools
[TOOL] Item-Sparse to Item_Template
(1/2) > >>
Epicurus:
Hello Modcraft,
I created a simple script, written in PHP, that automatically converts comma delimited strings from Item-Sparse.db2 and Item.dbc and converts them into an SQL statement which you can later add to your database or modify further.
The final output is for TrinityCore (World) Database 4.3.4. To prevent conflicts between item-sparse.db2 and world.item_template, I added 500000 to the entry ID.
Personally, I don't like working in windows environments - I'm more of Linux guy. The current db2 to sql converters require that you have an active MySQL connection to run the conversions, and I'd rather not install that software on windows (which is the OS I use to model edit for convenience purposes). Rather than bothering with that, I made this simple tool which my devs and I can access via the Administration panel of my server's website.
This tool does not convert the raw Item-Sparse.db2 into a readable format, there are many db2 to csv converters on the web for you to use. Once the file is in csv format, just copy paste the line representing the item you want to convert into the textarea, and copy the corresponding line from item.dbc into the input field.
Press "Convert" and you're done. The statement is ready for insertion into the database / further modification.
The script can be easily modified to fit your needs, be it bulk conversions or straight-to-database insertions.
I hope this helps some of you. Thanks again for this great community. I learned most of what I know about model editing and level design on this forum.
Cheers! Epicurus
[attachment=0:fos98fh2]itemSparse_to_itemTemplate.zip[/attachment:fos98fh2]
Milly:
Thanks for sharing. Seems like a pretty cool tool for people who wanna add/edit custom items like it was back in 3.3.5a. Though I personally prefer to keep my mods entirely client-side :) Also, a few things:
--- Quote from: "Epicurus" ---The current db2 to sql converters require that you have an active MySQL connection to run the conversions --- End quote --- If I'm understanding correctly, this is not true at all. My converter runs just fine without a MySQL server. I've made a tutorial about DBC/DB2 to SQL which you can find here: viewtopic.php?f=61&t=7453
--- Quote from: "Epicurus" ---there are many db2 to csv converters on the web for you to use. --- End quote --- Do you mind sharing? I've looked into this before and never found any DB2 to CSV converters.
Epicurus:
Hi Milly,
Carlos Ramzuel's DB2-> CSV converter has never failed me and is the the one I prefer to use. He doesn't share the source, as far as I know, but I haven't had any need to modify the program.
[attachment=0:nmsi62u9]WoWParser2_Build98.zip[/attachment:nmsi62u9]
Hope that helps!
Epicurus
PhilipTNG:
Sweet! I'm sure this will help out a crap load of people. I always did it with a db2 to csv converter and then re-parsed it in excel into an sql file. LOLOLOL. I'm sure this takes out that headway of extra work, though I gotta ask, how were you doing it before you put this tool together for yourself? What Archaic Medieval methods were you using?
Epicurus:
Hi Anthony,
I never thought I would actually need something like this - until the situation presented itself. I was doing bulk conversions by switching between excel sheets and trying to determine what column represented what, then re-arranging and removing/adding necessary data.
That's great for porting large amounts of values (like, all values from another expansion) in a short amount of time, but when one of my devs asked me to create a few custom items with cloned cata item values... well, that can't be done in a bulk conversion. So I started out by ctrl-F, copy paste the line, go into item.dbc, ctrl-F again, insert the missing values into the sparse data, make modifications, insert into dev server database, see if I messed up copying data, all good? insert into live server.
A few items in I decided to just create another web app to handle the process and stick it on the admin section of my server's website. Funny isn't it? We humans. We only invent ways to simplify tasks when the need arises (i.e, after we toss the monitor across the room out of frustration).
By the way, thank you for your tutorials, Anthony.
Cheers, Epicurus
Navigation
[0] Message Index
[#] Next page
|