Page 1 of 3

Nonpacked Archive Editing

Posted: Wed Jan 04, 2006 8:06 pm
by nikita
anyone know of a wav ripper which saves each file like file_offset.wav and can put them back in the position they where taken?

Or has someone an idea how to make it?

It could be a nice temp tool for ppl waiting for archive being openable...
Offcourse this would only work with archives without compression.

Posted: Wed Jan 04, 2006 8:27 pm
by nikita
Or just an wav/ogg/mp3 ripper which saves the offset in filenames
that way u can always put it back where it belongs..

Posted: Wed Jan 04, 2006 10:43 pm
by friendsofwatto
The main complication that prevents us from doing this, is that if you change the size of one file, it could potentially stop the game from working.

Most archives have some kind of directory that tells the offset to the file, and the file length. If we replace a file with one of exactly the same size - no problem. If the size is larger or smaller, we can replace the file but the other files in the archive won't work, stopping the game from working. This is because the directory needs to be changed so that it contains the new file lengths and offsets, and working out the directory is one of the hardest things that we have to do.

Basically what you want is not really possible, unless we come up with some amazing program that can alter the directory automatically without knowing anything about the directory at all. If this could happen, there wouldn't be any need for people like Mr Mouse and I, because a program can do it all for us :)

Sorry mate - its a great idea but it just isn't possible.

WATTO
[email protected]
http://www.watto.org

Posted: Wed Jan 04, 2006 11:11 pm
by Mr.Mouse
Well, what could be done is to have a program like that replace files, but keep the size of the file intact. So only smaller files or files equal in size could be used, but that's for the user to fix.

I once created a tool that would do just that for Doom WAD files (LOOONG TIME AGO!!!). :P

I ripped the original sounds, altered them (making sure they were of same size) and then put them back.

Posted: Thu Jan 05, 2006 12:03 am
by Turfster
I had something in my code archive that should do what you want.
It's up on my site (Generic file ripper and re-injector).
I haven't looked at the code for ages, so if it doesn't work the way it should, drop me a line.

Posted: Thu Jan 05, 2006 9:04 pm
by Savage
Im' trying your reinjector..but maybe it's too experimental.

I'm trying to reinject the data audio from War of the ring (H2O format)

The extraction it's ok and creates a .log file.

I created a empty dummy file (Dialogue.H2O) only with the header using hex workshop, and filling the body of that with 0's. The file size it's 57mb's aprox.

I do the nexts steps:
I open the program and go to MAIN.
Open the log file.
Shows: 42 injection points found.
Go to Reinjector and select any ogg file and shows the:
"File not found in table."

Maybe i'm using wrong the program. Any idea? Thanks!!!

Posted: Thu Jan 05, 2006 10:22 pm
by Turfster
The file needs to have the same name and size as the reinjected one, including position({filename}[8 digit hexvalue].ext).

Posted: Thu Jan 05, 2006 10:54 pm
by Savage
The file as the same filesize and file name, can you have a look a this zip?
Unpacked it's 55 mb's

Posted: Thu Jan 05, 2006 11:31 pm
by KorNet
2pulposo - How for you it did be possible to press file with weight 50 into one small RAR? :eek: :eek:

Posted: Fri Jan 06, 2006 2:29 am
by Turfster
KorNet wrote:2pulposo - How for you it did be possible to press file with weight 50 into one small RAR? :eek: :eek:
It's a file containing zeroes, so it compresses well ;)

I've upped a new version (1.6) to the site which should fix the problems with the previous version (unless I missed something, that is. The code is a real mess :roll: and it's rather late :|). You'll have to delete the old log file and rerun an extraction on it, but it *should* work now.

Posted: Fri Jan 06, 2006 12:02 pm
by Savage
I'm trying the 1.6...but all time it's

"access violation at adress xxx.xxxx.xxx" "Read of adress fffffff"

:(

@Kornet, i replaced all data with 0's, except the header, of course the compression it's superb :D

Posted: Fri Jan 06, 2006 12:29 pm
by Turfster
pulposo wrote:I'm trying the 1.6...but all time it's

"access violation at adress xxx.xxxx.xxx" "Read of adress fffffff"
Weird, it works fine here for every file I tried it on.
When exactly did you get the error?
I've upped a new build with a few more bugs fixed and a different way of handling the log files. I hope that fixes it.

Posted: Fri Jan 06, 2006 12:42 pm
by Savage
Still with errors, now less errors, but when i open a file appears the error:
Image
And can't do nothing. :(

Step2step:
-Run the program
-Go to MAIN>OPEN>select the file to open
ERROR.

My system it's Win Xp pro sp2

Posted: Fri Jan 06, 2006 1:49 pm
by Turfster
Huh, weird, I can't reproduce it on any of my PCs...
OK, I fixed just about the only thing it could be (selecting fixed dir without actually specifying a directory in the options) and made it a little more verbose.
Try the new build. If it still gives access violations, I have no idea why.

Posted: Fri Jan 06, 2006 3:33 pm
by Savage
Okai, now extracts perfect, but i have a new error xD.
"File size does not match log file size or not a File Stripper log file"
The file it's the same of the example: 59227545 bytes

Any idea?