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 (
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
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.
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 (
You must be registered to see links
). There was no tool for that specific taskThe 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
You must be registered to see links
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:
You must be registered to see links
Downloads:
You must be registered to see links
PS: I'm dropping a few screenshots here, they aren't up to date.
Last edited: