Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

True Crime: New York City .DAT Language Files

Featured Replies

  • Author
  • Localization

WillWNTD, posted Mon Mar 14, 2022 7:35 pm (70490)


Hi, i need some help to export and import the texts from .dat files. I tried to edit the texts via hex editor, but the game crashed. Can someone take a look at the file structure, please? If it is possible to create a tool. Thanks in advance!

Sample files:
  • Author
  • Localization

WillWNTD, posted Tue Mar 15, 2022 12:38 am (70492)


I did some more tests, and in fact the game doesn't crash after hex edit, but the text spacing/formatting is wrong if the edited text has more or less characters than the original text. I took some screenshots:

https://imgur.com/a/JCQdC4W

Can anyone help, please?
  • Author
  • Localization

NoobInCoding, posted Tue Mar 15, 2022 9:33 am (70497)


This is the structure of the files. But there is no StringCount in the files, maybe it is in another file :idea:

Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
//      File: True Crime: New York City
//   Authors: NoobInCoding
//------------------------------------------------
local int Pos=0;
int BaseOff;
struct{
int ID;
int Offset;
Pos = FTell();
FSeek(Offset BaseOff 4);
string Str;
FSeek(Pos);
}String[150];
  • Author
  • Localization

WillWNTD, posted Tue Mar 15, 2022 4:47 pm (70507)


NoobInCoding wrote:
This is the structure of the files. But there is no StringCount in the files, maybe it is in another file :idea:

Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
//      File: True Crime: New York City
//   Authors: NoobInCoding
//------------------------------------------------
local int Pos=0;
int BaseOff;
struct{
int ID;
int Offset;
Pos = FTell();
FSeek(Offset BaseOff 4);
string Str;
FSeek(Pos);
}String[150];


Thanks for your attention! I attached some files that might contain some information about StringCount. If you can take a look at them, I would really appreciate it.

One more information: in "Lang" folder, there are 6 language folders (Eng, FRE, GER, ITA, SPA, UK), and all folders have exactly 38 files inside.
  • Author
  • Localization

rabatini, posted Tue Mar 15, 2022 5:12 pm (70508)


NoobInCoding wrote:
This is the structure of the files. But there is no StringCount in the files, maybe it is in another file :idea:

Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
//      File: True Crime: New York City
//   Authors: NoobInCoding
//------------------------------------------------
local int Pos=0;
int BaseOff;
struct{
int ID;
int Offset;
Pos = FTell();
FSeek(Offset BaseOff 4);
string Str;
FSeek(Pos);
}String[150];


The char count is in there, but in a different way to see.

Image

You have take the baseoffset 0x04 and sum with pointers of the photo above.
or
goto baseoff
get finalbaseoffset long
finalbaseoffset - baseoff = 4


Example:

C0570000
LITTLE ENDIAN ALWAYS
000057C0 0X04 = 57C4 = first string
57C4 00 00 00 2F = 57F3

57F3 = second string

57C4 00 00 01 03 = 58C7

58C7 = third string

just keeping sum
BASEOFF 0X04 POINTERS.

as per you can see in the next image, to offset let us to the exactly begin of the second string.

Image

Here the bms script to extract the text individually as per pointers that i show above.
its kind useless but, it will be very easy to create a tool with these informations.

Code:
#true crime text pointers extract
#rabatini (luke)

get baseoff long
xmath mainoff "(baseoff 0x04)"
goto 0x10
get size long
math i = 0
string NAME p "%01x.txt" i
log name mainoff size
xmath filecount "(baseoff / 8)"

xmath entries "(filecount - 1)"
goto 0x10


for rip = 1 to entries

get offset long
xmath offset "(mainoff offset)"
get null long
savepos temp
get size long
xmath sizeking "(mainoff size)"
xmath size "(sizeking - offset)"
get null long
goto temp
String FILENAME P "%rip%.txt"
if size == 0x741e4fec
get size asize
xmath size "(size - offset)"
log FILENAME offset size
endif
slog FILENAME offset size

next rip




works on langtable.dat
i think is the main text.
  • Author
  • Localization

WillWNTD, posted Tue Mar 15, 2022 5:47 pm (70510)


@rabatini Thank you so much for the information, appreciate it!
@NoobInCoding With the information given, would it be possible for you to create a tool please?
  • Author
  • Localization

h3x3r, posted Thu Mar 17, 2022 6:09 pm (70556)


Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
//      File:
//   Authors:
//   Version:
//   Purpose:
//  Category:
// File Mask:
//  ID Bytes:
//   History:
//------------------------------------------------
local int i,strcount;

int tablesize;
strcount=tablesize/8;
struct{
for( i = 0, i = 0; i < strcount; i )
    struct{
        int hash;
        int string_offset;
    }strtable;
}Table;
struct{
for( i = 0, i = 0; i < strcount; i )
    struct{
        string Text;
    }text;
}Texts;
  • Author
  • Localization

rabatini, posted Thu Mar 17, 2022 9:49 pm (70560)


h3x3r wrote:
Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
//      File:
//   Authors:
//   Version:
//   Purpose:
//  Category:
// File Mask:
//  ID Bytes:
//   History:
//------------------------------------------------
local int i,strcount;

int tablesize;
strcount=tablesize/8;
struct{
for( i = 0, i = 0; i < strcount; i )
    struct{
        int hash;
        int string_offset;
    }strtable;
}Table;
struct{
for( i = 0, i = 0; i < strcount; i )
    struct{
        string Text;
    }text;
}Texts;

I never use 010 editor before.
did is possible make a script with pointers recalculation?
Just curiosity.
  • Author
  • Localization

h3x3r, posted Fri Mar 18, 2022 2:17 pm (70578)


I think it's possible with this function. But not sure how to connect it to table.
Code:
int ReadStringLength( int64 pos, int maxLen=-1 )
Returns the length of a null-terminated string if it were read at the address pos in the target file.
  • Author
  • Localization

WillWNTD, posted Mon Mar 21, 2022 4:34 pm (70631)


Thanks a lot, Delutto! I really appreciate it.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.