ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Dec 10, 2018 5:07 am

All times are UTC




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Nov 06, 2018 4:47 pm 

Joined: Sun Feb 01, 2015 5:31 pm
Posts: 56
Hi,

We have a small problem with some entries that have a different pattern than the script that swuforce created for us.

We need to change some entries like "Huev" (pos 1025358 and 102D83B) or "Puert" (pos 101B7B0) in the file 00000a43.dat

In principle, the structure is an xml where the second entry is extracted, these examples are the words "Vela" and "Pan"

Code:
<T209 T12="Id: 66400 - ch4-kerze-|02|-043" T13="66400" T14="282" T55="-1">
         <T761>
            <T26 T209="Kerze" T7="" T27="0"/>
            ------> <T26 T209="Vela" T7="" T27="1"/>
            <T26 T209="Свеча" T7="" T27="5"/>
            <T26 T209="Åšwieca" T7="" T27="6"/>
            <T26 T209="Candela" T7="" T27="3"/>
            <T26 T209="bougie" T7="" T27="2"/>
         </T761>
      </T209>
      <T209 T12="Id: 66401 - ch4-brot-|02|-044" T13="66401" T14="282" T55="-1">
         <T761>
            <T26 T209="Brot" T7="" T27="0"/>
            ------><T26 T209="Pan" T7="" T27="1"/>
            <T26 T209="Хлеб" T7="" T27="5"/>
            <T26 T209="Chleb" T7="" T27="6"/>
            <T26 T209="Pane" T7="" T27="3"/>
            <T26 T209="pain" T7="" T27="2"/>
         </T761>
      </T209>



The problem is that for the words "Puert" and "Huev" are placed in the fourth entry.

Code:
<T209 T12="Id: 66397 - 4008 - Haus von Bozos Freundin: e-|02|-to_ins_boot" T13="66397" T14="65553" T55="-1">
         <T761>
            <T26 T209="Tür" T7="" T27="0"/>
            <T26 T209="Door" T7="" T27="3"/>
            <T26 T209="porte" T7="" T27="2"/>
            ------>  <T26 T209="Puert" T7="" T27="1"/>
            <T26 T209="Дверь" T7="" T27="5"/>
            <T26 T209="Drzwi" T7="" T27="6"/>
            <T26 T209=" " T7="" T27="7"/>
         </T761>
      </T209>
      <T209 T12="Id: 112918 - 4012 - Bellevue: obj-08-|02|-garten-minigame_stinkt" T13="112918" T14="30108" T55="-1">
         <T761>
            <T26 T209="Ei" T7="" T27="0"/>
            <T26 T209="Egg" T7="" T27="3"/>
            <T26 T209="Å“uf" T7="" T27="2"/>
            ------>  <T26 T209="Huev" T7="" T27="1"/>
            <T26 T209="Яйцо" T7="" T27="5"/>
            <T26 T209="Jajo" T7="" T27="6"/>
         </T761>
      </T209>


These are the script created by swuforce .

Export
Code:
goto 8
get name basename
string name += .dat
get size long
get zsize long
clog name 16 zsize size
open FDSE name
log MEMORY_FILE 0 0
get name basename
string name += .txt
for
findloc offset string "\x00\x00\x00\x00\x02\x00\x00\x00x06" 0 ""
if offset == ""
get size asize MEMORY_FILE
log name 0 size MEMORY_FILE
cleanexit
endif
math offset -= 4
goto offset
get null long
if null = 0
getdstring d 8
else
getdstring d 8
get size long
savepos pos
get check byte
get check2 byte
get check3 byte
get check4 byte
if check = 0x00 ||  check = 0xff || check2 = 0x00 || check2 = 0xff
elseif check3 != 0x00 &&  check3 != 0xff && check4 != 0x00 && check4 != 0xff
goto pos
getdstring string 5
if string != "data/"
goto pos
getdstring string size
get size long
getdstring string size
get lang long
if lang = 0
get size long
if size != 0
getdstring string size
putdstring string size MEMORY_FILE
put 0x0a0d short MEMORY_FILE
get null byte
endif
endif
endif
endif
endif
next


Import
Code:
log MEMORY_FILE3 0 8
get name basename
get name2 filename
string name += .dat
open FDSE name
get name basename
string name += .txt
open FDSE name 1
log MEMORY_FILE 0 0
get asize asize
set offset1 0
for
findloc offset2 string "\xff\xff\xff\xff\x06\x00\x00\x00" 0 ""
if offset2 == ""
xmath dsize "asize - offset1"
append
log MEMORY_FILE offset1 dsize
append
get size asize MEMORY_FILE
comtype zlib_compress
clog MEMORY_FILE2 0 size size MEMORY_FILE
get zsize asize MEMORY_FILE2
goto 8 MEMORY_FILE3
put size long MEMORY_FILE3
put zsize long MEMORY_FILE3
append
log MEMORY_FILE3 0 zsize MEMORY_FILE2
append
get size asize MEMORY_FILE3
log name2 0 size MEMORY_FILE3
cleanexit
endif
math offset2 -= 4
goto offset2
get null long
if null = 0
getdstring d 8
else
getdstring d 8
get size long
savepos pos
get check byte
get check2 byte
get check3 byte
get check4 byte
if check = 0x00 ||  check = 0xff || check2 = 0x00 || check2 = 0xff
elseif check3 != 0x00 &&  check3 != 0xff && check4 != 0x00 && check4 != 0xff
goto pos
getdstring string 5
if string != "data/"
goto pos
getdstring string size
get size long
getdstring string size
get lang long
if lang = 0
savepos offset2
get size long
if size != 0
xmath dsize "offset2 - offset1"
append
log MEMORY_FILE offset1 dsize
append
get msize asize MEMORY_FILE
goto msize MEMORY_FILE
getdstring string size
savepos offset1
getct string string 0x00 1
get ad short 1
strlen len string
math len += 1
put len long MEMORY_FILE
putdstring string len MEMORY_FILE
endif
endif
endif
endif
endif
next


I have tried to modify the script many times and I can not make it work.

Maybe another way to modify these two entries, is to directly access their position and edit them, but I've tried and I have not known how to create a valid script.

Could you please help?

https://mega.nz/#!hBhDCQZZ!yfsXXlCzrZDe ... hufCTNz3H0

Greetings and thanks.


Top
   
 Post subject: Re: Help with script
PostPosted: Fri Nov 09, 2018 3:39 pm 

Joined: Sun Feb 01, 2015 5:31 pm
Posts: 56
Hi,

It is possible that it works by accessing the string position directly, but we would not know how to do it either.

Can you help us with this?

Greetings and thanks.


Top
   
 Post subject: Re: Help with script
PostPosted: Fri Nov 09, 2018 7:30 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
Have you tried contacting swuforce?
I don't know if he will see this topic.


Top
   
 Post subject: Re: Help with script
PostPosted: Fri Nov 09, 2018 9:51 pm 

Joined: Sun Feb 01, 2015 5:31 pm
Posts: 56
Hi,

Yes of course, I tried to contact swuforce, but I have not gotten any response, it has been a while since he published anything in the forum, I think he will be very busy now.
It's a shame that having the translation almost finished, and not being able to solve that "little" problem, that's why I ask for help in the forum.

Aluigi, Can you modify the script to edit those entries?

Greetings.


Top
   
 Post subject: Re: Help with script
PostPosted: Tue Nov 13, 2018 11:25 pm 

Joined: Tue Nov 15, 2016 11:37 pm
Posts: 13
Please aluigi or swuforce or whoever. We have almost finished translation of that game and that's the only missing detail. ¿Can you help us?


Top
   
 Post subject: Re: Help with script
PostPosted: Wed Nov 14, 2018 6:13 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
Trust me if I tell you that I have absolutely no idea of what you need or where is the problem or what is this format and what these scripts are meant for.

export generates a txt file with NUL delimited strings from the VBI input.
import... no idea what it should do.
No idea where you got that xml file and there is no "Puert" word in the txt.

Sorry, but I can't help.
I support only the scripts written by me.

If there is a topic open by swuforce about this game and scripts, please post there or link it here and I will move these posts there.


Top
   
 Post subject: Re: Help with script
PostPosted: Wed Nov 14, 2018 11:08 am 

Joined: Mon Aug 06, 2018 6:59 pm
Posts: 11
aluigi wrote:
Trust me if I tell you that I have absolutely no idea of what you need or where is the problem or what is this format and what these scripts are meant for.

export generates a txt file with NUL delimited strings from the VBI input.
import... no idea what it should do.
No idea where you got that xml file and there is no "Puert" word in the txt.

Sorry, but I can't help.
I support only the scripts written by me.

If there is a topic open by swuforce about this game and scripts, please post there or link it here and I will move these posts there.


Hello, thanks for your answer and your work.

I understand your concern, so could you help us with this script you write? viewtopic.php?f=9&t=680#p3568

We are using your script to fill the lines wich swuforce's script doesn't found. The issue is when I add or remove a character in the .dat file generated by your script, the game stops working, that's why we have to write "Puert" or "Huev" instead "Puerta" or "Huevo".

I mean, if there is this line in the .dat file:

Quote:
This


I only can replace that line with a line that has 4 letters, not less or more, if I want the game to still work. I can use empty spaces for fill the remaining characters when the new string is smaller than the original, but when is bigger I have to cut it out.

I uploaded the .vbi file and the extracted .dat file with your script: http://www.mediafire.com/file/q3p9cu0ej ... t.zip/file

Regards.


Top
   
 Post subject: Re: Help with script
PostPosted: Wed Nov 14, 2018 12:40 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
Now the problem is clear but I can't help you and swuforce can't too.
The script made by swuforce is called "importer", it's NOT a rebuilder, therefore everything is limited by the original size of the strings.


Top
   
 Post subject: Re: Help with script
PostPosted: Wed Nov 14, 2018 2:02 pm 

Joined: Tue Nov 15, 2016 11:37 pm
Posts: 13
Hello aluigi

Problem is that for some unknown reason script does not export "Egg" and "Door" (repeated and located in different addresses from .DAT file) to the txt file that is created. If it could we would be able to translate them and reimport them without any limitation or hexadecimal edition same way as we do with the other strings of the game.

We just need some exporting/importing scripts for those two strings. There is no original size limitation in swuforce script because we are able to translate and import translated txt file without any kind of problem.

Thanks for your help!


Top
   
 Post subject: Re: Help with script
PostPosted: Wed Nov 14, 2018 2:32 pm 

Joined: Mon Aug 06, 2018 6:59 pm
Posts: 11
aluigi wrote:
Now the problem is clear but I can't help you and swuforce can't too.
The script made by swuforce is called "importer", it's NOT a rebuilder, therefore everything is limited by the original size of the strings.


Hello.

Don't know how swuforce's script works, but for example the sixth line of .txt generated by his script is "Behind Toni's House" (19 characters) and in our replaced txt is "Parte trasera de casa de Toni" (29 characters). I can confirm that right now the game is fully working with that and all replaces. Maybe his script removes characters from other strings to compensate the added characters?

I tried to do that with your .vbi script, removing one character from the previous string to add to the next string ("Egg" + "Huev" to "Eg" + "Huevo") but the game stop working.

In any case thanks for your time.


Top
   
 Post subject: Re: Help with script
PostPosted: Wed Nov 14, 2018 6:55 pm 

Joined: Sun Feb 01, 2015 5:31 pm
Posts: 56
Hi,

Sorry it's my fault, I have not explained the problem well.

Daedalic has always used an xml file for the different languages ​​of its games, but for deponia complete journey it has "camouflaged" the xml in a file with extension * .vbi

Aluigi got the way to decrypt the * .vbi file and create a script, everything is in this post viewtopic.php?f=9&t=680

and swuforce using the encoding of aluigi made a script to modify the game,.

The swuforce script converts the file with extension * .vbi to * .dat, the file * .dat is the xml and extracts the entries that need to be translated into an easily editable txt file, and then with another script, the file is imported txt again.

this is a xml entry

Code:
<T209 T12="Id: 66702 - 4011 - Altstadt: obj-05-|01|-kurbelhalterung" T13="66702" T14="30108" T55="-1">
         <T761>
            <T26 T209="Kurbelhalterung" T7="" T27="0"/>
            <T26 T209="490|Hueco para manivela" T7="" T27="1"/>
            <T26 T209="poignée de manivelle" T7="" T27="2"/>
            <T26 T209="Fessura per manovella" T7="" T27="3"/>
            <T26 T209="Ручка" T7="" T27="5"/>
            <T26 T209="Korbka" T7="" T27="6"/>
         </T761>
</T209>


This is the same entry in the * .dat file

Image

The input to translate that extracts the swuforce script is the second "490|Hueco para manivela". All this works correctly,

The problem is that some entries the input that needs to be translated does not occupy the second position, occupies the fourth position, in this for example the swuforce script extracts the second entry "Egg" but we need to extract the fourth entry "Huev"

Code:
<T209 T12="Id: 66700 - 4011 - Altstadt: obj-03-|04|-flugschnabeltierei_links" T13="66700" T14="30108" T55="-1">
         <T761>
            <T26 T209="Ei" T7="" T27="0"/>
            <T26 T209="Egg" T7="" T27="3"/>
            <T26 T209="Å“uf" T7="" T27="2"/>
            <T26 T209="Huev" T7="" T27="1"/>
            <T26 T209="Яйцо" T7="" T27="5"/>
            <T26 T209="Jajo" T7="" T27="6"/>
         </T761>
</T209>


If we look at the format of the xml the nodes "T27" indicate the language,

T27 = "0" --- German
T27 = "1" --- English (the one we need)
T27 = "2" --- French
T27 = "3" --- Italian.
T27 = "5" --- Russian

The idea would be to modify the script so that it could show all the entries T27 = "1", if this is not possible, try to extract the entries of the fourth position.

Unfortunately we do not know how to do it.

I hope that now the situation is understood, I am sorry, but it is not easy to explain it.

Greetings.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited