Jump to content

LEGO STRINGS Binary Format


JrMasterModelBuilder
 Share

Recommended Posts

JrMasterModelBuilder

UPDATE: >Convert tool available here. Also, some of the information below is probably inaccurate.

 

Alrighty, I've reverse engineered most of the format, there's just one thing I don't understand yet. I will detail it below, so if you can lend some knowledge, let me know!

 

In GAME DATATEXT there are almost all of the text that is used thoughout the gameplay, in the different languages the game supports with a 3 letter file extension that denotes the language. There is also a plain text version of the BRI (British English) copy of the text that is presumably the source file.

 

Now for the format specifications:

 

Sources:

{4}   = The number of characters.

{4}   = 0x20000000
{2}   = The last character that will appear in the character set.
{2}   = 0x0000
//Repeat for the number of characters.

    {2} = DBCS character.
    {2} = Incremental counter.
{4}   = UINT32 = The number of key value entries.
//Repeat for the number of key value entries.

    {12} = CHAR   = Key name, NULL terminated
    {4}  = UINT32 = The offset of the string, from the offset of this value.

//The remaining bytes are the NULL terminated DBCS strings that are the values for the keys listed above.

 

As you may have noticed, I called the characters DBCS characters, as 2 bytes are devoted to each character in the strings that appear on screen. I do not presently know what DBCS format they are using, but except for the "Æ" character, they all match up with extended ASCII plus a NULL byte. The "Æ" on the other hand is designated by 0x1320, for reasons I cannot comprehend, because "Æ" is actually in extended ASCII.

 

Anyhow, if anyone knows anything about this peculiarity let me know, but this should be more than enough to write a compatible converter with a little extra logic to deal with this oddity. I won't be finding myself with any excess time this week, so if anyone else wants to have a go at writting a tool, go right ahead!

Link to comment
Share on other sites

Thank you for documenting this, JMMB! :thumbsup: I don't have the knowledge as of yet to build this kind of program, but would certainly love it if someone could.

Link to comment
Share on other sites

  • 1 month later...

Okay I've got quite a few ideas for a cutscene overhaul mod I'd like to make, and I'm sure there are others who'd like to edit the scripts too. Is anyone working on a tool for this?

 

If not, (as silly a question as it may be) how does one go about making such a tool?

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.