Hello, can anybody help me with a script for recompressing a file?
Here is the script I used for decompression
comtype LZSS
CLog "decompressed" 0x0c 0xAE4 0x3577
But the problem is that when I use it in the reimport feature, it builds the file in a different way, so the game can't read it , can anybody help me with this? I will link the file that contains both the original and decompressed file below.
Need Help!
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Need Help!
Try this script with reimport2:
But I guess it's better if you build the compressed file from scratch, use this script on the decompressed file:
Code: Select all
comtype lzss
get DUMMY long
get DUMMY long # 1
get SIZE long
savepos OFFSET
get ZSIZE asize
math ZSIZE - OFFSET
clog "decompressed" OFFSET ZSIZE SIZE
But I guess it's better if you build the compressed file from scratch, use this script on the decompressed file:
Code: Select all
get SIZE asize
log MEMORY_FILE 0 0
put 0xd3e9e2e2 long MEMORY_FILE
put 1 long MEMORY_FILE
put SIZE long MEMORY_FILE
log "compressed" 0 12 MEMORY_FILE
comtype lzss_compress
append
clog "compressed" 0 SIZE SIZE
append