TBLs - Encoding / Decoding Algorithms

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
User avatar
MarcoNecroX
Junior Member
Paladin
Posts: 177
Joined: Sun Apr 22, 2012 10:55 pm

TBLs - Encoding / Decoding Algorithms

Post by MarcoNecroX » Fri Jan 22, 2016 8:04 pm

Hello all,

I am currently working on implementing a database system using MySQL and the txt/tbl files from the game. The main idea here is to be able via PHP to create scripts to modify txt files or just create scripts to create dynamic content for the players. Full details can be seen here.

Anyways - I successfully created a PHP script to convert txt files into databases (if anyone is interested, I can post it). My problem now is the tbl files. I am wondering if it's possible to upload a tbl file and have PHP decode the contents of it so that it can be inserted into a database. I'd like to know if the algorithm is public, like the one "d2tbl edit" uses to convert tbl files into txt and vice-versa.

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: TBLs - Encoding / Decoding Algorithms

Post by kingpin » Fri Jan 22, 2016 8:56 pm

what you could do is convert it to excel file (or text file) then convert it back to tbl format after or check the source of any tbl editor (pretty sure it's around)

User avatar
MarcoNecroX
Junior Member
Paladin
Posts: 177
Joined: Sun Apr 22, 2012 10:55 pm

Re: TBLs - Encoding / Decoding Algorithms

Post by MarcoNecroX » Fri Jan 22, 2016 9:11 pm

Yeah, I know I can manually create the txts with Joel's tool, but I am looking a way to automate it so I can remove that extra step everytime I want to do some importing/exporting.

So far no luck with finding a source published here. I've come across this topic, but links seem to be down.

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: TBLs - Encoding / Decoding Algorithms

Post by Necrolis » Sat Jan 23, 2016 12:16 am

Take your pick, convert away:

QTblSource: https://github.com/kambala-decapitator/QTblEditor
AFJ Tbl Editor Source: https://d2mods.info/filecenter/dload.ph ... le_id=1502
Purge (with Source): https://d2mods.info/filecenter/dload.ph ... le_id=1438

I'd recommend purge as its the simplest of the tools
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
MarcoNecroX
Junior Member
Paladin
Posts: 177
Joined: Sun Apr 22, 2012 10:55 pm

Re: TBLs - Encoding / Decoding Algorithms

Post by MarcoNecroX » Sat Jan 23, 2016 12:39 am

Was checking purge, according to readme it edits .txt, not tbls (well it does not specifically state it). Anyways will look into it.

Thanks for the links!

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: TBLs - Encoding / Decoding Algorithms

Post by Necrolis » Sat Jan 23, 2016 1:14 am

MarcoNecroX" wrote:Was checking purge, according to readme it edits .txt, not tbls (well it does not specifically state it). Anyways will look into it.
You are correct =| Nef wrote something for parsing tbl files, remembered it as being purge but it seems not... QTblEditor would be your best bet then.
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
MarcoNecroX
Junior Member
Paladin
Posts: 177
Joined: Sun Apr 22, 2012 10:55 pm

Re: TBLs - Encoding / Decoding Algorithms

Post by MarcoNecroX » Sat Jan 23, 2016 9:44 am

Ok don't worry - I'll check QTbl. Thanks again

Cai_Miao-BTH
Posts: 90
Joined: Mon Sep 23, 2013 10:04 am
Location: China
China

Re: TBLs - Encoding / Decoding Algorithms

Post by Cai_Miao-BTH » Tue Jan 26, 2016 3:43 pm

Any advantages to translator?
Translator for Simplified Chinese.
Discord: cai_miao#0861
Translated BTH by onyx, HU by Soulmancer (until 2.x),
LRdO (approved) by Xaphan and Median XL: Sigma by the MXL community.
D2MFC & D2FTM, Modern Font Customize solution for Diablo II

Future project:
- Set of Font with FULL Latin, CHI, JAP and RUS character support. To much time needed.
- BFE by TrueMage - to Simplified Chinese from English
- ES (original) by PerfectCell to Simplified Chinese from English/Japanese
-Touhou Diablo by Bishibosh-A - to English/Japanese from Chinese

Post Reply

Return to “General Mod Making”