Caesar IV DAT. File

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
p1isdead
Posts: 8
Joined: Fri Jun 29, 2018 2:08 am

Caesar IV DAT. File

Post by p1isdead »

Hey guys,
I'm trying to edit some strings of the province's names in this game, but i can't because there is an DAT. file that limits or "notes" when i change something in the XML. file. I don't know if there is something to do with SQL.

Image

The thing is, if want to change the text in the XML. file, i need to change it in the DAT. file first, like "Genoa" i want it to be "Gênova", but there is an character limit in the DAT. file that i can't exceed. My question is if there is a way to increase the character limit or some proper software to it.

I attached the file so you guys can examine. Thanks!
LokiReborn
Posts: 190
Joined: Fri Aug 26, 2016 3:11 pm

Re: Caesar IV DAT. File

Post by LokiReborn »

p1isdead wrote:Hey guys,
I'm trying to edit some strings of the province's names in this game, but i can't because there is an DAT. file that limits or "notes" when i change something in the XML. file. I don't know if there is something to do with SQL.

Image

The thing is, if want to change the text in the XML. file, i need to change it in the DAT. file first, like "Genoa" i want it to be "Gênova", but there is an character limit in the DAT. file that i can't exceed. My question is if there is a way to increase the character limit or some proper software to it.

I attached the file so you guys can examine. Thanks!


What do you mean by a character limit, because I'm not sure that's the correct word? In the picture you should as long as you encode it to the value the way it expects it for unicode it would work fine. I looked at the file and it's a fairly simple format. If you wanted to change the length of a string though you also need to change the length specifier. Below is from the files start for the first 2 pieces of information

Code: Select all

00 00 00 00 //Leading 4 0s
27 00 00 00 //Number of entries in little endian format

01 00 00 80 //static value at start of block
09 00 00 00 //length for unicode string, note unicode uses 2 bytes per character so 9 will consume 18 bytes
41 00 71 00 75 00 69 00 74 00 61 00 6E 00 69 00 61 00 //unicode string
01 00 00 80 //static after string
09 00 00 00 //length of unicode string
42 00 75 00 72 00 64 00 69 00 67 00 61 00 6C 00 61 00 //unicode string
D2 00 00 00 //unknown value 1, it relates to something outside of the dat. Potentially to the xml not included.
54 01 00 00 //unknown value 2, it relates to something outside of the dat. Potentially to the xml not included.
D2 00 00 00 //Repeat unknown 1
54 01 00 00 //Repeat unknown 2
0C 00 00 00 //static
0C 00 00 00 //static
0C 00 00 00 //static
0E 00 00 00 //static

01 00 00 80
06 00 00 00
41 00 72 00 61 00 62 00 69 00 61 00
01 00 00 80
06 00 00 00
42 00 6F 00 73 00 74 00 72 00 61 00
32 00 00 00
13 01 00 00
32 00 00 00
13 01 00 00
0C 00 00 00
0C 00 00 00
0C 00 00 00
0E 00 00 00
p1isdead
Posts: 8
Joined: Fri Jun 29, 2018 2:08 am

Re: Caesar IV DAT. File

Post by p1isdead »

LokiReborn wrote:
p1isdead wrote:Hey guys,
I'm trying to edit some strings of the province's names in this game, but i can't because there is an DAT. file that limits or "notes" when i change something in the XML. file. I don't know if there is something to do with SQL.

Image

The thing is, if want to change the text in the XML. file, i need to change it in the DAT. file first, like "Genoa" i want it to be "Gênova", but there is an character limit in the DAT. file that i can't exceed. My question is if there is a way to increase the character limit or some proper software to it.

I attached the file so you guys can examine. Thanks!


What do you mean by a character limit, because I'm not sure that's the correct word? In the picture you should as long as you encode it to the value the way it expects it for unicode it would work fine. I looked at the file and it's a fairly simple format. If you wanted to change the length of a string though you also need to change the length specifier. Below is from the files start for the first 2 pieces of information

Code: Select all

00 00 00 00 //Leading 4 0s
27 00 00 00 //Number of entries in little endian format

01 00 00 80 //static value at start of block
09 00 00 00 //length for unicode string, note unicode uses 2 bytes per character so 9 will consume 18 bytes
41 00 71 00 75 00 69 00 74 00 61 00 6E 00 69 00 61 00 //unicode string
01 00 00 80 //static after string
09 00 00 00 //length of unicode string
42 00 75 00 72 00 64 00 69 00 67 00 61 00 6C 00 61 00 //unicode string
D2 00 00 00 //unknown value 1, it relates to something outside of the dat. Potentially to the xml not included.
54 01 00 00 //unknown value 2, it relates to something outside of the dat. Potentially to the xml not included.
D2 00 00 00 //Repeat unknown 1
54 01 00 00 //Repeat unknown 2
0C 00 00 00 //static
0C 00 00 00 //static
0C 00 00 00 //static
0E 00 00 00 //static

01 00 00 80
06 00 00 00
41 00 72 00 61 00 62 00 69 00 61 00
01 00 00 80
06 00 00 00
42 00 6F 00 73 00 74 00 72 00 61 00
32 00 00 00
13 01 00 00
32 00 00 00
13 01 00 00
0C 00 00 00
0C 00 00 00
0C 00 00 00
0E 00 00 00


That's it, thank you! I can increase the character limit now.