idstring "TNT\x01\x01\x00\x00" #could be flags or counters
idstring "TRAW\x00"
get headSize long #or maybe data offset in case of multiple TRAW sections?
get numFiles long
for i = 0 < numFiles
get strLen short #strings are null delimited anyway
get fileName STRING
get fileOffset long
get fileSize long
savepos nextFile
goto fileOffset
idstring "PAC\x00"
get SIZE long
savepos OFFSET
math fileSize -= 0x08
clog fileName OFFSET fileSize SIZE
goto nextFile
next i
This is my first and only quickbms script, so if anyone has any suggestions I'm all ears.
After extraction, 2 types of files stand out:
- T3D: mesh data with vertices and face indices "in plain view"
- T2D: one or more JPEG textures
Last edited by Chipicao on Wed Feb 26, 2014 11:40 am, edited 1 time in total.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
Regarding the script syntax it's ok, the only suggestion I can give is to use DUMMY variables for unknown fields instead of goto.
For example "goto 0x1 0 SEEK_CUR" -> "get DUMMY byte"
And if there are more bytes but they can't be idenfied as a field, for example a sequence of 5 bytes, you can use "getdstring DUMMY 5".
In idstring you can use also C strings so if the signature is "PAC" followed by a 0x00 byte, you can use idstring "PAC\0" or "PAC\x00"