Need help translating games in other languages? Have your language problems solved here.
SonofUgly
beginner
Posts: 21 Joined: Sat Feb 25, 2012 2:43 pm
Has thanked: 6 times
Been thanked: 2 times
Post
by SonofUgly » Thu Sep 29, 2016 5:31 am
Wondering if anyone could make a tool for these, convert them to and from a basic text form like:
Code: Select all
000013EF - Result
000013F1 - Clear Time
...
They seem pretty simple, and a lot like Rockstar's gxt/gxt2 language files.
A couple of sample files:
http://www.mediafire.com/file/2r6h9s1b3 ... amples.rar
Here's the basic idea, from what I can tell:
http://i.imgur.com/3n8YkoA.png
The part there that I'm not sure about I think might be junk data - nothing like that in the bigger files, and seems inconsistent.
WRS
ultra-veteran
Posts: 603 Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times
Post
by WRS » Fri Oct 28, 2016 12:33 am
edit - here is a better one to parse all files
Code: Select all
struct head
{
uint strings;
uint un_1; // 0
uint un_2; // 0
uint un_3; // 0
};
struct data
{
int id;
uint offset;
};
head hdr;
local int num;
local int i;
local string str;
num = (ReadUInt(FTell()+4)-16) / sizeof(data);
data body[num];
for(i=0;i<num;++i)
{
if(body[i].id > 0 && body[i].offset != 0)
{
str = ReadString(body[i].offset);
Printf("%08X - %s¥n", body[i].id, StringToWString(str, CHARSET_JAPANESE));
}
}
gives
00072BF0 - 赤き箱を探し出し
00072BF1 - 全て打ち砕くべし
00072C04 - よくぞ成し遂げた
with m037.msg
WRS
ultra-veteran
Posts: 603 Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times
Post
by WRS » Fri Oct 28, 2016 11:08 pm
SonofUgly wrote: Also turns out 1 (just 1... of course) file is slightly different, and the output is missing strings.
Didn't go through it thoroughly, but I can see that at least "000702EF - GAME 2" is missing
yeah this file is a problem. there are no flags to control how large the 'data info' structure should be.
here is an update - uncomment the #define on line 1 to for menu.msg
Code: Select all
//#define MENU_MSG
struct head
{
uint strings;
uint un_1; // 0
uint un_2; // 0
uint un_3; // 0
};
struct data
{
int id;
uint offset;
#ifdef MENU_MSG
uint unknown;
#endif
};
struct str
{
string c;
};
head hdr;
local int num;
local int i;
num = (ReadUInt(FTell()+4)-16) / sizeof(data);
data body[num];
for(i=0;i<num;++i)
{
if(body[i].offset != 0)
{
FSeek(body[i].offset);
str cstr <bgcolor=0xffccee>;
if(WStrlen(cstr.c)>0 || body[i].id > 0)
{
Printf("%08X - %s\n", body[i].id, StringToWString(cstr.c, CHARSET_JAPANESE));
}
}
}