News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Unpack/repacking arc (and pak) files of bravo music  (Read 1326 times)

wintiger0222

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Unpack/repacking arc (and pak) files of bravo music
« on: July 30, 2016, 05:05:13 am »
I want to localize bravomusic series (english name - mad maestro)
To localize this, i need to unpack the arc file
And it's quickbms script is existed
Code: [Select]
#DATA_LE1.ARC ���� written by ������
#http://aluigi.altervista.org/quickbms.htm

get UNK long
xmath files "UNK - 0x9E0D"

goto 0x800

for i = 0 < files

get name string
strlen namesz name
savepos tmp

xmath tmp2 "tmp - namesz + 0x3F"
goto tmp2

get UNK2 long
get SIZE long
get OFFSET long
get UNK3 long

if SIZE = 0
else

get packname filename
   string packname += _unpacked/
   string packname += name
   log packname OFFSET SIZE
endif

next i

Arc file unpack

Code: [Select]
#*.pak, *.pak2 ���� written by ������
#http://aluigi.altervista.org/quickbms.htm

endian little

getdstring ID 0x8
get null long
get files long

for i = 0 < files

savepos tmp
get OFFSET long
get SIZE long
get name string
xmath tmp "tmp + 0x30"
goto tmp

if ID = TIM2PACK

get packname filename
   string packname += _unpacked/
   string packname += name
   string packname += ".tm2"

log packname OFFSET SIZE

else

get packname filename
   string packname += _unpacked/
   string packname += name

log packname OFFSET SIZE

endif

next i

Pak, pak2file unpack

But when unpack the file
The file names are overlaped so i can't repack these
How i can repack these?