Tales of Vesperia / Graces TLZC compression
-
- beginner
- Posts: 24
- Joined: Sat Jul 09, 2011 9:16 pm
- Has thanked: 1 time
Tales of Vesperia / Graces TLZC compression
so some guy reverse-engineered the TLZC compression format used in most of the Tales of games.
http://blog.lse.epita.fr/articles/8-sta ... ormat.html
There's a python program at the bottom of the post, I couldn't get it to work though (I would get a 'list index out of range' error on line 37). Any way to convert it to a quickbms script?? Or if someone could get that python program to work, that's be great too!
sample TLZC-compressed files: http://www.mediafire.com/?6423f9rml64tsmd
http://blog.lse.epita.fr/articles/8-sta ... ormat.html
There's a python program at the bottom of the post, I couldn't get it to work though (I would get a 'list index out of range' error on line 37). Any way to convert it to a quickbms script?? Or if someone could get that python program to work, that's be great too!
sample TLZC-compressed files: http://www.mediafire.com/?6423f9rml64tsmd
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: TLZC compression
What game is this?
I couldn't get it to work either.
.............
You should send the samples to the author.
I couldn't get it to work either.
Code: Select all
Traceback (most recent call last):
File "decompress.py", line 39, in <module>
decompress_tlzc(buf, open(sys.argv[2], "w"))
File "decompress.py", line 31, in decompress_tlzc
decompress_block(lzma_params, block, out, remaining)
File "decompress.py", line 11, in decompress_block
out.write(pylzma.decompress(block, size, maxlength=size))
TypeError: Error while decompressing: 6
You should send the samples to the author.
-
- beginner
- Posts: 24
- Joined: Sat Jul 09, 2011 9:16 pm
- Has thanked: 1 time
Re: TLZC compression
They're from Tales of Vesperia. But hey, you got farther than I did in executing it, at least.
I sent the samples to the author, not expecting to get too much though.
I sent the samples to the author, not expecting to get too much though.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: TLZC compression
I made a quickbms script based on his post enjoy.
Code: Select all
idstring "TLZC"
get name basename
string name + ".FPS4"
comtype MSF
get version long
get tzsize long
get tsize long
goto 0x1D
set blockcount tsize
math blockcount += 0xFFFF
math blockcount /= 0x10000
for i = 0 < blockcount
get zsize short
putarray 0 i zsize
next i
for i = 0 < blockcount
savepos offset
getarray ZSIZE 0 i
if tsize >= 0x10000
append
clog MEMORY_FILE OFFSET ZSIZE 0x10000
append
else
append
if ZSIZE == 0
log MEMORY_FILE OFFSET tsize
else
clog MEMORY_FILE OFFSET ZSIZE tsize
endif
append
endif
math tsize -= 0x10000
math offset + ZSIZE
goto offset
next i
get SIZE asize MEMORY_FILE
log name 0 SIZE MEMORY_FILE
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Tales of Vesperia TLZC compression
oops my bad
change the one line
i left a hard coded number in there from a file i tested.
updated post
change the one line
i left a hard coded number in there from a file i tested.
updated post
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Tales of Vesperia TLZC compression
Now it works for book_enemy_20, but still fails on the other non-null books_enemy's (eg: 18, 19).
It fails on the very last iteration of the loop.
Maybe you have to deal with the remaining block separately?
It fails on the very last iteration of the loop.
Maybe you have to deal with the remaining block separately?
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
-
- beginner
- Posts: 24
- Joined: Sat Jul 09, 2011 9:16 pm
- Has thanked: 1 time
Re: Tales of Vesperia TLZC compression
Thanks! The script works perfectly for Vesperia's and Graces' files
-
- veteran
- Posts: 93
- Joined: Wed May 09, 2012 1:13 pm
- Has thanked: 11 times
- Been thanked: 3 times
Re: Tales of Vesperia TLZC compression
Did I make a mistake..? It doesn't work.oathkeeper9918 wrote:Thanks! The script works perfectly for Vesperia's and Graces' files
You do not have the required permissions to view the files attached to this post.
-
- M-M-M-Monster veteran
- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Tales of Vesperia TLZC compression
replacealbert1905 wrote:Did I make a mistake..? It doesn't work.oathkeeper9918 wrote:Thanks! The script works perfectly for Vesperia's and Graces' files
Code: Select all
math blockcount + 0xFFFF
math blockcount / 0x10000
Code: Select all
math blockcount += 0xFFFF
math blockcount /= 0x10000
My Github repo
-
- veteran
- Posts: 93
- Joined: Wed May 09, 2012 1:13 pm
- Has thanked: 11 times
- Been thanked: 3 times
Re: Tales of Vesperia TLZC compression
Thanks a lot.Ekey wrote:replacealbert1905 wrote:Did I make a mistake..? It doesn't work.oathkeeper9918 wrote:Thanks! The script works perfectly for Vesperia's and Graces' filestoCode: Select all
math blockcount + 0xFFFF math blockcount / 0x10000
Code: Select all
math blockcount += 0xFFFF math blockcount /= 0x10000
Re: Tales of Vesperia / Graces TLZC compression
Does this mean you can extract models from Tales of Graces F or Tales of Graces? I have some models from Vesperia Xbox but I want to know if you can get models from Vesperia PS3.