ROM Hack Help needed to unpack and pack a script file.

TyRaNtM

I did some projects..
OP
Member
Joined
Oct 13, 2007
Messages
1,008
Trophies
1
Age
37
Location
Chile
Website
www.power-ups.net
XP
596
Country
Cote d'Ivoire
I need help unpacking and packing a script file in Inazuma Eleven EUR English.
The files are compressed, and are really weird if you see that files in a hex editor.
The files are LZ77, i suppose.

If you are a coder or at least have a experience with rom hacking, will be good if you can support us, because is nearly the only thing left to finish our project.

The files are in:
script/en/evet.pkb
script/en/evet.pkh
script/en/mchat.pkb
script/en/mchat.pkh


Or you can PM if you want the files alone.
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
quickbms might work for you on this you just have to be patient in writing the script file... partial one for xenoblade (same file name but not the same output - what you need to change).

QUOTE said:
# Game: Xenoblade (Wii)
# by Falo - 2010
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
#
# usage :
#
# use WiiScrubber to extract all *.pkb files
# use any u8 tool (arc extractor) to extract static.arc
# you should then have *.pkb and *.pkh files
# use this script on *.pkb

endian big

Open FDDE PKH 1

get Temp long 1 # always 0x00FE1200
get Temp long 1
get ofsHashTable long 1 # not sure, HashTable or FileIDTable
get FileSize long 1
get numFiles long 1

set ofsSizeTable numFiles
set ofsOffsetTable numFiles

math ofsSizeTable *= 8
math ofsOffsetTable *= 2

math ofsSizeTable += ofsHashTable
math ofsOffsetTable += ofsSizeTable

for i = 0 < numFiles
goto ofsHashTable 1
get Hash long 1 # not sure, Hash or FileID
get Temp long 1 # always 0x0
goto ofsSizeTable 1
get Size short 1
goto ofsOffsetTable 1
get Offset long 1

math Size *= 2048
math Offset *= 2048

# use hash/fileid as filename
set Name Hash
set FileExt ".dat"

# get FileExt
goto Offset
get FileID long

if FileID = 1437218861 # Nintendo ARC (U8)
set FileExt ".arc"
endif
if FileID = 1651664243 # Nintendo BRRES
set FileExt ".brres"
endif
if FileID = 2142000 # Nintendo TPL
set FileExt ".tpl"
endif
if FileID = 1264144384 # Xenoblade KYP -> BRRES Archive
set FileExt ".kyp"
endif
if FileID = 1835229440 # Xenoblade MCA
set FileExt ".mca"
endif
if FileID = 1145131057 # Xenoblade DAP1
set FileExt ".dap"
endif
if FileID = 1280263241 # Xenoblade LODI
set FileExt ".lod"
endif

string Name += FileExt

log Name Offset Size

# next file, increase all offsets
math ofsHashTable += 8
math ofsSizeTable += 2
math ofsOffsetTable += 4
next i

CleanExit

Look up the faq for writing quickbms you will understand. I will be using the same type thing for unpacking some files for duel love. Just re-read fast6191's notes and use the saved table of offsets and filesize(s) from crystaltile2. it will be alot of work but it will be decompressed... recompressed I don't know how to do...

you will need to edit the fileid parts for sure. alot of other things too but you will have it decompressed.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: good night