Frame Gride DC TDT file

How to translate the files of a game
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Frame Gride DC TDT file

Post by domingo »

Hi I need to decode and encode this file to edit the text of the game.

Image

File

TALK.rar



Thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Frame Gride DC TDT file

Post by aluigi »

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

Re: Frame Gride DC TDT file

Post by domingo »

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

Re: Frame Gride DC TDT file

Post by domingo »

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

Re: Frame Gride DC TDT file

Post by domingo »

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

Re: Frame Gride DC TDT file

Post by aluigi »

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

Re: Frame Gride DC TDT file

Post by domingo »

Ok,thanks aluigi

I had already created the table, although I lack some characters.
Thanks to the script I have the text almost complete :)