03-09-2016, 07:39 PM
(03-09-2016, 07:03 PM)ThatTrueStruggle Wrote:(03-06-2016, 09:17 PM)beastedot9 Wrote: Hello, really appreciate this tutorial and I thank you for it.
I am trying to get myself acquainted with QuickBMS so I started with the Pak0 file from the Quake 2 demo and although I've analysed it okay, my script seems to be off. Been trying for a while now and feel like a complete idiot because I know it's probably a stupid mistake lol. I'd appreciate any help
Code:idstring "PACK"
get BASE_OFF long
get ArchiveSize long
goto BASE_OFF
set NUM_OF_FILES 1106
for i = 1 < NUM_OF_FILES
getdstring NAME 0x10
get OFFSET long
get SIZE long
goto OFFSET
log NAME OFFSET SIZE
next i
File in question: https://mega.nz/#!MhhTiBrS!Ng_xeSoYMKLdO...6uunA559H8
Oh, I didn't see this, I'll take a quick look at it
EDIT:
Code:idstring "PACK"
get OFFNAMETBL long
get FCOUNT long
goto OFFNAMETBL
for i = 0 < FCOUNT
getdstring NAME 0x38
get OFFSET long
get SIZE long
log NAME OFFSET SIZE
next i
This should work; This was a pretty simple format, however I don't think it gets the last file so I'm sorry about that :/
I appreciate you still taking the time to look into it, thank you
I realised that I wasn't calculating the file count correctly and the length of NAME was too short.
Once again, thank you, appreciate it.