The Forum is up for sale: XeNTaX Forum looking for new owner

[request] Quickbms script to solve unity asset's double header

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
wansf
veteran
Posts: 99
Joined: Sun Mar 11, 2018 10:56 am
Has thanked: 7 times
Been thanked: 8 times

[request] Quickbms script to solve unity asset's double header

Post by wansf »

Code: Select all

get ArcName filename
set Name string "new\\"
string Name + ArcName
get Size asize
math Size - 0x4
log Name 0x4 Size
i got this script from alicegear thread but it can only remove 0x* which is good for alicegear but not work on some game that hv random size of padding header b4 the real "UnityFS"
could someone please make a script that be able to automatically detect next "UnityFS" and delete everything b4 that? thanks
Spiritovod
mega-veteran
mega-veteran
Posts: 171
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 31 times
Been thanked: 153 times

Re: [request]quickbms script to solve unity asset's double header

Post by Spiritovod »

@wansf: Something like this should work:

Code: Select all

get NAME filename
string NAME p "new/%s" NAME
findloc OFFSET string "UnityFS" 0 ""
if OFFSET == ""
	print "Header not found!"
	cleanexit
else
	get SIZE asize
	math SIZE - OFFSET
	log NAME OFFSET SIZE
endif
and in case there are doubled UnityFS headers (for example, like in Seven Deadly Sins: Grand Cross assets), you'll need to add something like "goto 7" at the beginning of the script to skip the first header.
wansf
veteran
Posts: 99
Joined: Sun Mar 11, 2018 10:56 am
Has thanked: 7 times
Been thanked: 8 times

Re: [request]quickbms script to solve unity asset's double header

Post by wansf »

it works POGCHAMP
thanks x1000000
Post Reply