Qhimm.com Forums

Final Fantasy 7 => Troubleshooting => Topic started by: NERV Agent on 2016-04-24 23:33:21

Title: FF7Tools lzss unclear syntax.
Post by: NERV Agent on 2016-04-24 23:33:21
I extracted "MOVIE/OPENING.BIN" from an FF7 PSX disc. I used "unbinlz" to decompress it, and managed to edit one of the ".data" files that came out to my liking.

But how exactly do I compress all those data files back into "OPENING.BIN"?

The README says this:

Quote
lzss / unlzss
-------------

Usage: lzss [OPTION...] <fromfile> <tofile>
  -V, --version                   Display version information and exit
  -?, --help                      Show this help message

Usage: unlzss [OPTION...] <fromfile> <tofile>
  -V, --version                   Display version information and exit
  -?, --help                      Show this help message

The 'lzss' and 'unlzss' tools compress and decompress individual files
compressed with the game's version of the LZSS algorithm.

Examples for such files are the field maps (FIELD/*.DAT) and all files
having the .LZS extension.

The command line seems to specify a single file, and not a bunch of files (or a whole directory). How do I compress all the ".data" files back into "OPENING.BIN"?

I tried doing this, but got this:

>python lzss OPENING_00.data + OPENING_01.data + OPENING_02.data + OPENING_03
.data + OPENING_04.data + OPENING_05.data + OPENING_06.data + OPENING_07.data +
OPENING_08.data + OPENING_09.data + OPENING_10.data + OPENING_11.data + OPENING_
12.data + OPENING_13.data + OPENING_14.data + OPENING_15.data + OPENING_16.data
+ OPENING_17.data + OPENING_18.data + OPENING_19.data + OPENING_20.data + OPENIN
G_21.data + OPENING_22.data + OPENING_7472_0.data OPENING.BIN
Usage: lzss [OPTION...] <fromfile> <tofile>
  -V, --version                   Display version information and exit
  -?, --help                      Show this help message

Error: Unexpected extra argument 'OPENING_01.data'

So I try putting it in brackets, and got this:

>python lzss <OPENING_00.data + OPENING_01.data + OPENING_02.data + OPENING_0
3.data + OPENING_04.data + OPENING_05.data + OPENING_06.data + OPENING_07.data +
 OPENING_08.data + OPENING_09.data + OPENING_10.data + OPENING_11.data + OPENING
_12.data + OPENING_13.data + OPENING_14.data + OPENING_15.data + OPENING_16.data
 + OPENING_17.data + OPENING_18.data + OPENING_19.data + OPENING_20.data + OPENI
NG_21.data + OPENING_22.data + OPENING_7472_0.data> <OPENING.BIN>
< was unexpected at this time.

I scoured Google and there is no information on the command line syntax for this program. It can't be unknown. How do you use this thing?!?
Title: Re: FF7Tools lzss unclear syntax.
Post by: nfitc1 on 2016-04-25 02:04:12
try:

Code: [Select]
python lzss OPENING*.data OPENING.BIN
Title: Re: FF7Tools lzss unclear syntax.
Post by: sithlord48 on 2016-04-25 11:57:24
seams very strightfoward to me..

1. when you see <INFILE> <OUT> that a place holder you replace with what your doing.. so NO < or >
2. why did you use a + thats not going to work  with any cli program.
3. the error clearly states that the second file is unexpected input  . if your gonna use cli programs learn to read the errors.
Title: Re: FF7Tools lzss unclear syntax.
Post by: NERV Agent on 2016-04-27 02:32:36
try:

Code: [Select]
python lzss OPENING*.data OPENING.BIN

Didn't work either. This is what happens:

>python lzss OPENING_*.data OPENING.BIN
Error opening file 'OPENING_*.data': invalid mode ('rb') or filename

I also just realized that I should of posted this in the Troubleshooting forum. Will the mods move this thread?

seams very strightfoward to me..

1. when you see <INFILE> <OUT> that a place holder you replace with what your doing.. so NO < or >
2. why did you use a + thats not going to work  with any cli program.
3. the error clearly states that the second file is unexpected input  . if your gonna use cli programs learn to read the errors.

Have you ever heard of this trick?

cd [dir]
copy /b my_pic.jpg + my_song.mp3 mynewpic.jpg

I'm not gonna explain to you what it does. The point is, it involves a plus sign.
Title: Re: FF7Tools lzss unclear syntax.
Post by: sithlord48 on 2016-04-27 14:58:45
In your example its the copy command that is allowing the use of the plus sign. I see some other windows Cli programs also support using a + sign (like dir) . I never knew that  however i wouldn't assume that all programs allow for this .