ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Dec 10, 2018 6:08 pm

All times are UTC




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Nov 08, 2018 5:37 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 72
i need help to fix this script

script can work good in reimport2 and there is no reason to bad happening
but game always has been stoped work and give error

what is the problem?

problem is: need to fix CHUNK_ALL

what is the CHUNK_ALL?
when you extracting whole archive, size of all file in folder are CHUNK_ALL (2704) and need to update in reimport mode
how can i solve it?
you can download test archive in this topic

Code:
idstring "BKHD"
get HEADER_ONE long

findloc DIDX_POINT binary "\x44\x49\x44\x58"
goto DIDX_POINT
get DIDX_HEADER long
get HEADER_HEADING long

goto 0x0
findloc DATA binary "\x44\x41\x54\x41"
get DATA long
get CHUNK_ALL long #all extracted size
goto 0x0
findloc HEADER_TWO_SCOUND binary "\x44\x49\x44\x58"
goto HEADER_TWO_SCOUND
get DIDX_HEADER long
get HEADER_TWO long
math HEADER_TWO /= 12 #12, (CRC, OFFSET, SIZE long)

math DUMMY_ADDER = 24
math HEADER_HEADING + HEADER_ONE
math HEADER_HEADING + DUMMY_ADDER

for i = 0 < HEADER_TWO
get CRC long
get OFFSET long
get SIZE long
math OFFSET + HEADER_HEADING
string CRC p "%08x.wem" CRC
log CRC OFFSET SIZE
next i


Attachments:
TEST.zip [1.77 KiB]
Downloaded 5 times
Top
   
PostPosted: Thu Nov 08, 2018 3:01 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9431
Isn't more simple to just use the official script for this format?
http://aluigi.org/bms/armyoftwo.bms

As you can see the format is quite complex.


Top
   
PostPosted: Fri Nov 09, 2018 5:39 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 72
aluigi wrote:
Isn't more simple to just use the official script for this format?
http://aluigi.org/bms/armyoftwo.bms

As you can see the format is quite complex.


right, good Script... but for pck (AKPK), not .bnk

if all files size (whole extrcted files Size) doesnt match with CHUNK_ALL, then game will going to (stop working!) or black screen or even audio can play, or some files cant play
i have same problem in umod unreal engine 2.5 (.umd)!
need to Update CHUNK_ALL too!


Top
   
PostPosted: Fri Nov 09, 2018 9:48 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9431
Shokoniraya wrote:
right, good Script... but for pck (AKPK), not .bnk

Why don't you just try it instead of replying?
Code:
  offset   filesize   filename
--------------------------------------
  000000d0 208        00000000.dat
  000001a0 208        00000001.dat
  00000270 208        00000002.dat
  00000340 208        00000003.dat
  00000410 208        00000004.dat
  000004e0 208        00000005.dat
  000005b0 208        00000006.dat
  00000680 208        00000007.dat
  00000750 208        00000008.dat
  00000820 208        00000009.dat
  000008f0 208        0000000a.dat
  000009c0 208        0000000b.dat
  00000a90 208        0000000c.dat


Top
   
PostPosted: Tue Nov 13, 2018 4:52 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 72
i think i found a way to make a fixer... but i need to run another array after end of (i)
your way in other topic doesnt work in this script!

Code:
# Life Is Strange .bnk
# not Supported reimport2 yet!
# Script By Shokoniraya
idstring "BKHD"
get HEADER_ONE long

findloc DIDX_POINT binary "\x44\x49\x44\x58"
goto DIDX_POINT
get DIDX_HEADER long
get HEADER_HEADING long

goto 0x0
findloc DATA binary "\x44\x41\x54\x41"
get DATA long
get CHUNK long #all extracted size
goto 0x0
findloc HEADER_TWO_SCOUND binary "\x44\x49\x44\x58"
goto HEADER_TWO_SCOUND
get DIDX_HEADER long
get HEADER_TWO long
math HEADER_TWO /= 12 #12, (CRC, OFFSET, SIZE long)

math DUMMY_ADDER = 24
math HEADER_HEADING + HEADER_ONE
math HEADER_HEADING + DUMMY_ADDER

for i = 0 < HEADER_TWO
get CRC long
get OFFSET long
get SIZE long
math OFFSET + HEADER_HEADING
string CRC p "%08x.wem" CRC
log CRC OFFSET SIZE
next i


Top
   
PostPosted: Fri Nov 16, 2018 4:20 am 
User avatar

Joined: Wed Jul 19, 2017 5:04 am
Posts: 151
not Chunk_all, its just a memory scanner
when game want to load, plug will check size of file, not size of full archive, and that is why bnk is decompressed, because of speed for reading by CPU and optimizing and some other thing...

anyway, i hope this will help you to set memory scanner size (dont use -r, just using as extracting mode)


Attachments:
BNK_FIXER.rar [484 Bytes]
Downloaded 5 times

_________________
Be Good, Even in distressing or defamation and chill, Even Everyone's Called You a Bad Guy Or Lier and Mad
Top
   
PostPosted: Fri Nov 16, 2018 7:49 am 
User avatar

Joined: Wed Jul 19, 2017 5:04 am
Posts: 151
GHOST DEAD wrote:
not Chunk_all, its just a memory scanner
when game want to load, plug will check size of file, not size of full archive, and that is why bnk is decompressed, because of speed for reading by CPU and optimizing and some other thing...

anyway, i hope this will help you to set memory scanner size (dont use -r, just using as extracting mode)


oh... and i forgot to tell you somthing, game cant read wem file in new offset, must be one by one (forgot bms and try something else)

_________________
Be Good, Even in distressing or defamation and chill, Even Everyone's Called You a Bad Guy Or Lier and Mad


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited