Disclaimers:
- The information given in this topic is useless for hacking or creating a private server.
- The purpose of giving out this information is so that people can be more informed about stats and numbers regarding Dungeon Fighter Online to increase their gameplay experience through legitimate playing of the game.
- This thread is not affiliated with or sponsored by Nexon or any of its affiliates or Southperry.
- At no point will I be giving out instructions for how to decrypt, reverse engineer, or repack the game executable or the Script.pvf file.
- I will be documenting how to parse the files within Script.pvf, but this uses no reverse engineering or decryption. Everything is plaintext.
Script.pvf unpacked (May 11, 2011):
ScriptPVF.7z
Requirements to understand this document:
- Hexadecimal
- Parsing binary data
- Programming experience
- You're not an idiot.
Documentation of file format:
The files within Script.pvf are in binary format. This means you cannot view them with a text editor. However, you can view the files in a hex editor. One could even conceivably translate the binary format into the textual format. However, this is not something I have time, patience, or care to do.
All binary files in Script.pvf utilize the same format which is as follows:
Code:
Bit order: Little-endian
File Header: 0xB0D0
Until EOF do the following:
(1) read one 8-bit value and one 32-bit value.
(2) Determine what to do with the 32-bit value based upon the 8-bit value.
0x02 - Integer (32-bit)
0x04 - Float (32-bit)
0x05 - Integer (32-bit) - Section Name (like `[Name]` or `[Animation]`) - Lookup value in ./stringtable.bin
0x07 - Integer (32-bit) - File Link - Lookup value in ./stringtable.bin - then read the given file
0x09 - Integer (32-bit) - File index - Lookup in ./string.usa.lst in PVF root
0x0A - Integer (32-bit) - Lookup value - in ./stringtable.bin (usually paired with 0x09)
A 0x09 block followed by a 0x0A block is syntactic equivalent to something like <4::chr_equip_1443> where 4 is located in the 0x09 block and the chr_equip_1443 is in the 0x0A block. This is used for string lookups.
The above list is not exhaustive. There are likely other blocks which I have not found yet. However, these blocks are the most common.
The following represents python code which can parse stringtable.bin located in the Script.pvf file root.
Code:
import CBinaryReader
stringTable = CBinaryReader.BinaryReader('stringtable.bin', 'rb')
numStrings = stringTable.rS32() #rS32 = Read a 32-bit signed integer
listStrings = [''] * numStrings #Initialize an array of blank strings
baseOffset = stringTable.tell()
startStringOffset = stringTable.rS32() + baseOffset
for eachInt in range(numStrings):
endStringOffset = stringTable.rS32() + baseOffset
remember = stringTable.tell()
stringTable.seek(startStringOffset)
lengthString = endStringOffset - startStringOffset
stringTableString = stringTable.read(lengthString)
listStrings[eachInt] = '%d>%s' % (eachInt, stringTableString)
stringTable.seek(remember)
startStringOffset = endStringOffset
FileIO.WriteFile('stringtable.txt', '\n'.join(listStrings))
"CBinaryReader" above is a customized module and is not available with the standard Python distribution. However, the mechanism of reading a binary file should be very easy to comprehend and translate between different programming languages.
Anyway, when the 0x0A block has the number "123456", for example, you would look up the 123,456th string in stringtable.bin. If you're good at math, you should be able to perform the stringtable.bin lookup in O(1) without needing an array of strings.
Save for exactly how to decrypt Script.pvf, you now know everything I know about the files inside script.pvf. If you do happen to have the old unpacking of Script.pvf from a year or so ago, it's extremely helpful to compare files between the previous one and the current one. It was the only way I was able to figure out all that I have.
Happy hunting.
Bookmarks