Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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:
Joined
Jul 24, 2006
Messages
884
Reaction score
581
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.
 
Custom Title Activated
Loyal Member
Joined
Jan 28, 2009
Messages
1,320
Reaction score
616
sorry to bump but, how can I make the other way arround? how can I compress an item?

You need to remember that if you add something to item that was not there before it will change item size and also checksum.
 
Moderator
Staff member
Moderator
Joined
Feb 22, 2008
Messages
2,404
Reaction score
724
no, I mean, gregoo's code wiill generate a decompressed item struct with size 0x214, and if I remember, different than the item packets I guess.

I still wanna know how to compress and where the server generates the new checksum :/:
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
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.
 
Joined
Jul 24, 2006
Messages
884
Reaction score
581
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

You must be registered for see attachments list
Last edited:
Skilled Illusionist
Joined
Apr 20, 2009
Messages
351
Reaction score
212
Ha, my bad! I renamed the repo some time ago, I forgot to update wherever it was linked o:
I've edited the original post :)
 
Back
Top