How to translate the files of a game
domingo
Posts: 83 Joined: Fri Aug 19, 2016 11:53 am
Post
by domingo » Wed Oct 19, 2016 11:04 am
Hi I need to decode and encode this file to edit the text of the game.
File
TALK.rar
Thanks
aluigi
Site Admin
Posts: 12984 Joined: Wed Jul 30, 2014 9:32 pm
Post
by aluigi » Thu Oct 20, 2016 8:06 am
Moved in the correct section. I guess the strings are compressed (lzss?), otherwise I would have suggested you to modify it with a hex editor.
domingo
Posts: 83 Joined: Fri Aug 19, 2016 11:53 am
Post
by domingo » Fri Oct 21, 2016 9:59 am
I have tried several times to create a table and I have not accomplished anything and it seemed to me strange, so I decided to post it
domingo
Posts: 83 Joined: Fri Aug 19, 2016 11:53 am
Post
by domingo » Fri Nov 04, 2016 12:54 am
Hello, I have been trying to unzip the file with lzss decompressor, but I get the corrupt file error or it is not a lzss file Any ideas?
domingo
Posts: 83 Joined: Fri Aug 19, 2016 11:53 am
Post
by domingo » Fri Nov 04, 2016 4:51 pm
I think I already have the solution to decode the text. Each character is composed of 3 bytes example 0C A0 01 = A 0C B0 01 = B 0C 00 11 = G So successively
aluigi
Site Admin
Posts: 12984 Joined: Wed Jul 30, 2014 9:32 pm
Post
by aluigi » Sat Nov 05, 2016 8:46 am
Something like this, it's a raw visualization, not real parsing, you can use the console redirector to dump the output like quickbms.exe script.bms talk.tdt > list.txt:
Code: Select all
# incomplete!!! set TABLE string "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#" idstring "TXTCONV " get ID long get OFFSET long xmath FILES "(OFFSET - 8) / (4 + 4)" goto 8 for i = 0 < FILES get ID long get OFFSET long next i set OUTPUT string "" for savepos OFFSET get VAR1 byte # 0x0c get VAR2 byte get VAR3 byte if VAR1 == 0x0c xmath IDX "((VAR3 >> 4) << 4) | (VAR2 >> 4)" getvarchr TMP TABLE IDX #print "%OFFSET|X% %TMP|X%" string TMP = TMP string OUTPUT + TMP else if OUTPUT != "" print "%OUTPUT%" endif set OUTPUT string "" endif next
domingo
Posts: 83 Joined: Fri Aug 19, 2016 11:53 am
Post
by domingo » Sun Nov 06, 2016 12:21 am
Ok,thanks aluigi
I had already created the table, although I lack some characters.
Thanks to the script I have the text almost complete