PT2SQLite

Skilled Illusionist
Joined
Apr 20, 2009
Messages
351
Reaction score
212
After messing a bit around with the .dat/.war file compression for the item table, I finally found how it was working.
I made a tool while I was at it.

PT2SQLite.
This program opens every .dat file in the userdata folders, and every .war file in the warehouse folders, extract every item and insert it in a local SQLite database.

Once you've generated the item database, you can use one of the many existing SQLite browsers to perform selections with more or less complex filters to locate specific items in your server.

The idea of the program came up after some nasty items were discovered on the official PT servers ( ). There was no tool for that specific task

The program was written in VB6. As usual, I'm releasing it with its source. It's on GitHub this time (I was tired of Gitorious being sluggish) under the mighty license. You can poke around in the source code if you're curious.
There's a few cool procedures there to read binary files, extract byte/word/dword from a byte array, convert dword to float, etc.

I'll write a bit about how the compression is handled later if I have time. The procedures converting .dat/.war files item tables to their expanded versions are located in the dat.bas and war.bas files.

A special thank here for SunnyZ for his enthusiasm and beta tests, and for liaising with the Subagames GM.

Repository:
Downloads:

PS: I'm dropping a few screenshots here, they aren't up to date.
Gregoo - PT2SQLite - RaGEZONE Forums


Gregoo - PT2SQLite - RaGEZONE Forums


Gregoo - PT2SQLite - RaGEZONE Forums


Gregoo - PT2SQLite - RaGEZONE Forums
 
Last edited:
This program is FANTASTIC!

Thank you Gregoo for all your hard work and dedication! It will not go unnoticed :P

I made this tutorial video for this program not to long ago:
Scrap the first part about copying the DataServer folder, that's not needed, but the rest is good info.
 
Those strings should not be found in a standard server. Is it possible that your server is not compatible with this code? (Sadly, I'm away from home for a couple of days yet again, and can't check either the source, or heavily translated servers right now)

Modified servers, with item tables in added PE sections and such may well need constant offset pointers updating, and the binary re-compiling.
 
The download links are down, so I thought I would re-upload them, source code included.

Download:

(Also available as download from Rage Zone's server below)

Video Tutorial:


SQLite Database Browser:



I know I should not have bumped this old topic, but it is still useful, and its downloads had expired.
All credits to the wonderful master Gregoo!
 

Attachments

Last edited:
Back