ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Oct 19, 2019 9:59 pm

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Jul 07, 2019 4:08 pm 

Joined: Fri Nov 25, 2016 6:09 pm
Posts: 3
Hi folks.
I need advice with gaining access to the english language strings in chronicles of inotia coc.
I'm hoping that I could translate the game into my language, but unfortunatley it appears that all the strings and some
other resources are stored in an unknown data format and I'm wondering if there is really no option to make the strings file readable for a human.
I collected a whole bunch of these unknown data files. download files
Please take a look at these files if you want. I can't find a working method to analyze the unknown data.
I'm grateful for any help with this problem and I'm curious about any information about this data format.
Thanks.


Last edited by Somalia on Sun Jul 07, 2019 6:52 pm, edited 1 time in total.

Top
   
PostPosted: Sun Jul 07, 2019 6:09 pm 

Joined: Fri Aug 26, 2016 3:11 pm
Posts: 61
Somalia wrote:
Hi folks.
I need advice with gaining access to the english language strings in chronicles of inotia coc.
I'm hoping that I could translate the game into my language, but unfortunatley it appears that all the strings and some
other resources are stored in an unknown data format and I'm wondering if there is really no option to make the strings file readable for a human.
I collected a whole bunch of these unknown data files. download files
Please take a look at these files if you want. I can't find a working method to analyze the unknown data.
I'm grateful for any help with this problem and I'm curious about any information about this data format.
Thanks.


The files that start with 0x01 00 looks like it's lzma (that's probably a specifier) after it is regular lzma, from there you'll need to map the files according but this is an example of an uncompressed file.

Edit: Also just attached the parsed format of that file.

The format is as follows:
long (4 bytes) for count of records
tri offset (3 bytes) location of start of string

You then proceed to each offset and you read until you hit 0x00 for that string
rinse and repeat for all entries

Example C# Code
Code:
OpenFileDialog OD = new OpenFileDialog();
if(OD.ShowDialog() == DialogResult.OK)
{
    List<string> output = new List<string>();
    List<int> offsets = new List<int>();
    FileStream fs = new FileStream(OD.FileName, FileMode.Open);
    BinaryReader br = new BinaryReader(fs);
    int count = br.ReadInt32();
    for (int i = 0; i < count; i++)
    {
        byte[] t = br.ReadBytes(3);
        byte[] temp = new byte[4];
        Array.Copy(t, temp, 3);
        offsets.Add(BitConverter.ToInt32(temp, 0));
    }
    foreach(int loc in offsets)
    {
        List<byte> str = new List<byte>();
        fs.Position = loc;
        while(true)
        {
            byte b = br.ReadByte();
            if (b == 0x00)
            {
                output.Add(Encoding.UTF8.GetString(str.ToArray()));
                break;
            }
            else
                str.Add(b);
        }
    }
    File.WriteAllLines(OD.FileName + "_strings.txt", output);
    br.Close();
    fs.Close();
}


Attachments:
memorytext_en_parsed.txt [377.74 KiB]
Downloaded 9 times
memorytext_en_uncompressed.dat [413.36 KiB]
Downloaded 8 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 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