DTbl tool & library released [update 11.10.07]

This would be the forum for questions about how to work with mod making tools which can be a problem of its own.

Moderator: Paul Siramy

Post Reply
User avatar
DarthDevilous
Posts: 96
Joined: Fri Feb 20, 2004 7:15 pm
Location: Switzerland
Contact:

DTbl tool & library released [update 11.10.07]

Post by DarthDevilous » Sun Sep 30, 2007 11:44 pm

DTbl is a .tbl manipulation library written in C++, a .tbl command-line tool, and maybe a graphical tool sometime in the future.
For the moment you can get the command line tool here:
Zip (157K) 7-Zip (130K)
The readme can be found here and in the downloads above.
EDIT: updated 05.10.2007
EDIT: another update 10.10.2007, mostly to the library, still need to upload the actual program. Added some more info the the library docs, see link further down.
EDIT: program updated 11.10.2007

For the moment I highly recommend you make backups of any files you edit with this. I've tested it, but chances are I've missed something.

Features include
  • adding, removing and printing individual entries
  • exporting .tbl files to .txt files
  • importing from .txt files back to .tbl files (see the ".tbl Editing With DTbl" section of the readme for more info)
  • general .tbl stats
Source downloads can be found here, including a package using GNU Autotools, a packet with just the source files, and a packet with just the library component. Documentation for the library component is available here.

Also the package compiles under Linux and might compile under Mac OS X, if you have Boost C++ installed.
Last edited by DarthDevilous on Thu Oct 11, 2007 8:10 am, edited 11 times in total.
Regret Nothing - Learn Everything
ds1edit Loader - News & Feedback thread | Get Firefox!

User avatar
XiaN
Posts: 63
Joined: Sun Oct 09, 2005 11:08 pm
Contact:

Post by XiaN » Wed Oct 03, 2007 10:22 pm

Hi DarthDevilous

Definetly a nice release. I've searched the net for hours for a structure or hints for the structure of diablo's .tbl-files.

Think with your source i'll have what i need now :)

Havn't looked into the source yet, but does your library contain a function, that returns the tbl in a "array of array of string" datastructure? Whould be suitable, because if you have to convert a tbl into a txt and then read the txt into your own program you wasted time.

An example : My unreleased D2-Parser needs around 3 seconds to load all tbl-entries ( extract the tbls from the mpq, convert them via ShellExecuteExAndWait with Joels command line tool to txt's then load them ), but it just takes ~2 seconds to extract and parse all the other files needed to create the Sets, SetItems, Uniques, BasicItems, Runewords, Socketitems and present them to the user.

( Testet on AthlonXP 2000+, 512MB Ram, Median2008 1.56 )

So you see, such a function would be very suitable here :)

A screenshot for the audience :)
http://db.runeforge.net/gallery/Project ... tation.PNG
Last edited by XiaN on Wed Oct 03, 2007 10:25 pm, edited 2 times in total.

User avatar
DarthDevilous
Posts: 96
Joined: Fri Feb 20, 2004 7:15 pm
Location: Switzerland
Contact:

Post by DarthDevilous » Thu Oct 04, 2007 10:44 am

If you want to go through all table entries, you can iterate through the IDs. IDs go from 0 to tbl.size()-1, and you can use the getKey() and getValue() functions to get the appropriate key/values.

Code: Select all

dtbl::TblStringFile tbl;
tbl.load("some.tbl");
for (size_t i = 0; i < tbl.size(); ++i)
    std::cout << tbl.getKey(i) << ': ' << tbl.getValue(i) << '\n';
PS: uploading update.

PPS:
I've searched the net for hours for a structure or hints for the structure of diablo's .tbl-files.
You realise that the best source for that information is right under your nose? This site, this forum even ;) !
Last edited by DarthDevilous on Thu Oct 04, 2007 3:10 pm, edited 3 times in total.
Regret Nothing - Learn Everything
ds1edit Loader - News & Feedback thread | Get Firefox!

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains
Contact:

Hand-picked

Re: "DTbl" .tbl tool released

Post by Nefarius » Thu Oct 04, 2007 3:03 pm

You realise that the best source for that information is right under your nose? This site, this forum even!
Yep, Enquettar being a perl script is in plain text, its all in there :twisted:
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
XiaN
Posts: 63
Joined: Sun Oct 09, 2005 11:08 pm
Contact:

Re: "DTbl" .tbl tool released

Post by XiaN » Thu Oct 04, 2007 8:24 pm

Yeah Yeah ... earlier this morning, with a cup of coffee in my hand, i looked into a sticky topic where all the internal structures of the most common used filetypes are mentioned.

Shame on my head :)

PS: Because of the of extremly slow and broken pagecreation on the keep, it doesn't really fit for extensive researching -.-

User avatar
Danjib
Posts: 50
Joined: Sun Apr 06, 2008 11:01 pm

Re: DTbl tool & library released [update 11.10.07]

Post by Danjib » Mon Jan 04, 2021 2:50 pm

The link is now broken.

DarthDevilous, are you able to reupload this somewhere, or alternatively, are you happy for me to host it?

This tool is required by my Unique Item Editor:
https://github.com/Danjb1/d2-unique-item-editor

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: DTbl tool & library released [update 11.10.07]

Post by Necrolis » Mon Jan 04, 2021 7:35 pm

Danjib wrote:
Mon Jan 04, 2021 2:50 pm
The link is now broken.

DarthDevilous, are you able to reupload this somewhere, or alternatively, are you happy for me to host it?

This tool is required by my Unique Item Editor:
https://github.com/Danjb1/d2-unique-item-editor
This post is almost 14 years old...

Regardless, the loader is available in our file center: downloadsystemcat?id=15
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
==DJ==[ZLO]
Posts: 6
Joined: Thu Jul 22, 2004 3:59 am
Location: Belarus
Contact:
Belarus

Re: DTbl tool & library released [update 11.10.07]

Post by ==DJ==[ZLO] » Wed Jan 06, 2021 6:30 am

Danjib wrote:
Mon Jan 04, 2021 2:50 pm
are you able to reupload this somewhere, or alternatively, are you happy for me to host it?
You may need this viewtopic.php?f=7&t=57015
Image

User avatar
Danjib
Posts: 50
Joined: Sun Apr 06, 2008 11:01 pm

Re: DTbl tool & library released [update 11.10.07]

Post by Danjib » Fri Jan 15, 2021 7:41 pm

Necrolis wrote:
Mon Jan 04, 2021 7:35 pm
Regardless, the loader is available in our file center: downloadsystemcat?id=15
I'm afraid I'm not sure what you mean by the loader. I'm looking for DTbl.
==DJ==[ZLO] wrote:
Wed Jan 06, 2021 6:30 am
You may need this viewtopic.php?f=7&t=57015
Thanks, this may come in handy. It's unclear from that thread whether it can be run from the command line, but worst case scenario I can dig into the source.

Post Reply

Return to “Tools”