Darkness II

How to translate the files of a game
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Darkness II

Post by patyek »

Hi!

I used the quickmbs to extract the H.misc.cache file, and i've got the localization file (Languages.cl), but how i extract/repack or edit it?

Br.: Patyek
desperado
Posts: 14
Joined: Thu Oct 09, 2014 9:28 pm

Re: Darkness II

Post by desperado »

Up.
swuforce
Posts: 233
Joined: Thu Oct 16, 2014 4:39 pm

Re: Darkness II

Post by swuforce »

Try the tools from the sources.
viewtopic.php?f=12&t=645
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

swuforce wrote:Try the tools from the sources.
https://zenhax.com/viewtopic.php?f=12&t=645


Hi!

I installed the autolt and download the 2 script for darkness 2 (import and export) i put these files and the Languages.cl in one directory try to run the extract script and get this error (see the attachment).
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Darkness II

Post by MerlinSVK »

Binary.au3 is missing.
viewtopic.php?p=25414#p25414
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

MerlinSVK wrote:Binary.au3 is missing.
https://zenhax.com/viewtopic.php?p=25414#p25414


Very big thanks! :R
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

I stuck again. I tried to repack the files, and i've got an error message (in this case too, when i tried to repack the unkpacked unedited file). :(

What could be the problem?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Darkness II

Post by aluigi »

Reimporting the files compressed with the "evolution" algorithm is not possible because there is no re-compressor available.
If I remember correctly that "evolution" is a known algorithm and library (lz4 maybe?) but I don't remember what it it so it can't be replaced (anyway if it was lz4, it can't be used in reimporting because the game will crash).
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

Unfortunately, I do not know what kind of compression algorithm used. So useless managed to extract the file that contains the text and managed to put back the original file recompression is no longer possible.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Darkness II

Post by aluigi »

Ok I made a check and those algorithms are, apparently, all the same:
LCF (67)
DARKSECTOR_NOCHUNKS (213)
FASTLZAH (274)
EVOLUTION (362)
UNKNOWN6 (371)
LZFX (350)

The good news is that LZFX has a recompression function and so it can be used in reimport mode :)
That does NOT mean that the game will work for sure with the edited files but now you can try.
Keep me update
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

Okay, but how i reimport the languages.cl into the original files (H.Misc.cache and H.Misc.toc)? Please write it step by step. Sorry, but i don't percfect in the compression methods, i just translate texts. :( Thanks!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Darkness II

Post by aluigi »

Yesterday I have added the following to the rules topic:
How to reimport files with QuickBMS?
Read section 3 of http://aluigi.org/papers/quickbms.txt
If that's still not clear take a look at this example viewtopic.php?p=23032#p23032
Long story short: the procedure is the same you used for extraction (I really mean the same: same input file and folder!)
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

aluigi wrote:Yesterday I have added the following to the rules topic:
How to reimport files with QuickBMS?
Read section 3 of http://aluigi.org/papers/quickbms.txt
If that's still not clear take a look at this example https://zenhax.com/viewtopic.php?p=23032#p23032
Long story short: the procedure is the same you used for extraction (I really mean the same: same input file and folder!)


Hi!

1. reimport.bat file
2. browse the darkness2.mbs file
3. browse the H.Misc.toc file
4. click on the save, because i don't create a folder (but i try too)

And then the qmbs ask me a question, i answer this - y. See bellow:

- open input file D:\ds2\H.Misc.toc
- open script D:\ds2\darkness2.bms
- set output folder D:\ds2

offset filesize filename
--------------------------------------
- enter in folder D:\ds2
coverage file 0 0% 0 2754536 . offset 00000000
- open input file D:\ds2\H.Misc.toc
- enter in folder D:\ds2
- open input file D:\ds2\H.Misc.cache
- REIMPORT MEMORY_FILE WORK-AROUND: "/Languages.cl"

- Do you want to use the experimental reimporting of chunked MEMORY_FILE (y/N)?
y

Error: unsupported compression 362 in reimport mode

Last script line before the error or that produced the error:
85 clog MEMORY_FILE OFFSET CHUNK_ZSIZE CHUNK_SIZE 1

Press ENTER or close the window to quit
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Darkness II

Post by aluigi »

You used it correctly but you forgot to replace comtype evolution with comtype lzfx.
Anyway it's useless to do it because now I have noticed that the format uses chunks so no real working way to do reimporting.
In short: no solution.
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Darkness II

Post by patyek »

Thanks for your answer! :R That was exactly what I was curious about. Unfortunately, this is a dead project.