Jump to content

[PLEASE DELETE]


Go to solution Solved by Guest,

Recommended Posts

Posted (edited)

[PLEASE DELETE]

Edited by AlphaTwentyThree
[PLEASE DELETE]
  • Engineer
Posted

Well i was unable to get over filenames since the logic is sooo stupid so filenames are dumped as offsets.

####################################
# Bayonetta Origins (NSW) - *.pkzl #
####################################
get BaseFileName basename
comtype oodle

idstring "pkzl"
getdstring Dummy 0x4
get FileSize uint32
getdstring Dummy 0x4
get Files uint32
get EntrySize uint32
get FileNameTableSize uint32

for i = 0 < Files
	getdstring Dummy 0xC
	get Size uint32
	getdstring Dummy 0x4
	get Offset uint32
	getdstring Dummy 0x4
	get ZSize uint32
	string Name p= "%s/%u.dat" BaseFileName Offset
	if ZSize != Size
		clog Name Offset ZSize Size
	else
		log Name Offset Size
	endif
next i

 

Posted

So it IS oodle after all? Let me investigate what went wrong with my own script there!

Thanks!

  • Solution
Posted (edited)

SOLVED

I just checked my script, turns out it was the exact same as yours, I already had the name retrieval implemented. Just tried it again without changing a thing and it suddenly works now?! Absolutely no idea why!

The great mysteries of coding I guess... Here's my original script, now suddenly working as it should:

# Bayonetta Origins: Cereza and the Lost Demon (NSW)
# *. pkz extractor
#
# (c) 2024-03-03 by AlphaTwentyThree of ResHax
# script for QuickBMS http://quickbms.aluigi.org

comtype oodle
idstring pkzl
get ZERO short
get VER short
get FSIZE longlong
get FILES long
get TOC long
goto TOC
xmath NAMEOFF "0x20 * FILES + TOC"
set SHIFT 0x10
for i = 1 <= FILES
	get NAMEPOS long
	math NAMEPOS += NAMEOFF
	get COMP long
	get SIZE longlong
	get OFFSET longlong
	get CSIZE longlong
	savepos MYOFF
	goto NAMEPOS
	get NAME string
	if SIZE != CSIZE
		clog NAME OFFSET CSIZE SIZE
	else
		log NAME OFFSET CSIZE
	endif
	goto MYOFF
next i

 

Edited by AlphaTwentyThree
Posted

And to round things off for that game, here's the script for the contained archive format:

# Bayonetta Origins: Cereza and the Lost Demon (NSW)
# Data extractor
# works with the following extensions: dat, dtt, eff, evn
#
# (c) 2024-03-03 by AlphaTwentyThree of ResHax
# script for QuickBMS http://quickbms.aluigi.org

get FOLDER basename

idstring "DAT\0"
get FILES long
get OFF_OFFSETS long
get OFF_TYPES long
get OFF_NAMES long
get OFF_SIZES long
get OFF_UNK long
goto OFF_NAMES
get NAMEL long
savepos OFF_NAMES

for i = 0 < FILES
	goto OFF_OFFSETS
	get OFFSET long
	savepos OFF_OFFSETS
	
	goto OFF_NAMES
	getDstring NAME NAMEL
	savepos OFF_NAMES
	
	goto OFF_SIZES
	get SIZE long
	savepos OFF_SIZES
	
	string NAME p= "%s/%s" FOLDER NAME
	log NAME OFFSET SIZE
next i

43,000+ files in the end, everything is pretty open for mining.

  • Guest changed the title to [PLEASE DELETE]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...