Jump to content

Beyond Good and Evil - 20th Anniversary Edition (*.pak / BPAK)


Go to solution Solved by ikskoks,

Recommended Posts

Posted
On 2/26/2025 at 4:18 PM, AlphaTwentyThree said:

Just got the plain extraction to work myself with checking your script. That first byte seems to be a compression identifier. Any idea if one can do anything with that key in terms of name hashes?

Here's the working script:

# BPAK Extractor script 0.1c
#
# tested & working with:
# - Beyond Good & Evil: 20th Anniversary Edition (PS4) - *.pak
#
# (c) 2025-02-26 by Alpha23 of ResHax
# based on https://github.com/bartlomiejduda/Tools/blob/master/NEW%20Tools/Beyond%20Good%20%26%20Evil/Beyond_Good_and_Evil_PAK_BPAK_script.bms
# script for QuickBMS http://quickbms.aluigi.org

comtype lz4
idstring "BPAK"
goto 0xc
get FILES long
get OFF_INFO long
get TOC asize
math TOC -= OFF_INFO
goto TOC
set SHIFT 0x14
get FSIZE asize
get FOLDER basename
for i = 1 <= FILES
	get COMP byte
	if COMP = 0
		get NAMEL long
		getDstring NAME NAMEL
		get SIZE long
		get UNK1 long
		get UNK2 long
		get UNK3 long
		get OFFSET long
		math OFFSET += SHIFT
		get UNK4 long
		string NAME P "%FOLDER%/%NAME%"
		log NAME OFFSET SIZE
	elif COMP = 1
		get NAME_CRC long
		get SIZE long
		get CSIZE long
		get ZERO long # always 0?
		get UNK long
		get OFFSET longlong
		math OFFSET += SHIFT
		if SIZE != 0
			string NAME P "%FOLDER%/%NAME_CRC%."
			clog NAME OFFSET CSIZE SIZE
		endif
	endif
next i

 

Does this one work with the PC Version?

Posted
On 2/28/2025 at 3:34 AM, Lilothestitch16 said:

Does this one work with the PC Version?

Think about how much sense your question makes. If you have it on your hdd, you can just test it and if you don't have it on your hdd, the question is irrelevant.

I don't have it, so I can't test, but I suspect it won't work. Currently looking at the Switch version and that's already slightly different.

Posted

Anyway, removed some redundancies, corrected a mistake and updated for the Switch version. Might work for the PC version as well but like I said, I don't have it.

Windows Explorer absolutely isn't happy with 100k+ files in a single folder, so it's probably best to manually move the different types to separate subfolders or something.

Posted
On 3/1/2025 at 10:17 AM, AlphaTwentyThree said:

Anyway, removed some redundancies, corrected a mistake and updated for the Switch version. Might work for the PC version as well but like I said, I don't have it.

Windows Explorer absolutely isn't happy with 100k+ files in a single folder, so it's probably best to manually move the different types to separate subfolders or something.

I could send you the PC version if you want.

Posted
12 hours ago, Lilothestitch16 said:

I could send you the PC version if you want.

Just upload here, shouldn't be an issue (first 1MB/last 10MB of the biggest file plus smaller files).

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...