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.
extract strings data format [chronicles of inotia coc]
-
- Posts: 4
- Joined: Fri Nov 25, 2016 6:09 pm
extract strings data format [chronicles of inotia coc]
Last edited by Somalia on Sun Jul 07, 2019 6:52 pm, edited 1 time in total.
-
- Posts: 190
- Joined: Fri Aug 26, 2016 3:11 pm
Re: chronicles inotia iii - extract strings unknown data format
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: Select all
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();
}