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.

HalfBrick Studios Fruit Ninja/Mortar Engine *.STR (String Table)

Featured Replies

  • Author
  • Localization

LolHacksRule, posted Mon May 24, 2021 2:52 am (64245)


I'm currently datamining Halfbrick's games, I found the in-game text, but it's embedded in a STR file, being a String Table. I tried to document the format. Anyone want to finish off the template or make a script to extract the strings?

Code:
//------------------------------------------------
//--- 010 Editor v10.0.2 Binary Template
//
//      File: Halfbrick Studios Fruit Ninja/Mortar Engine String Table File
//      Authors: LolHacksRule
//      Version: 1
//      Purpose: Gets data out of the binary.
//      Category: Deserializing
//      File Mask:
//      ID Bytes:
//      History:
//------------------------------------------------

BigEndian();

struct StringTableFileBin {
    struct StringTableFileHeader {
        int    StringTableVersion;
        char   unk[64]; //Hash?
    } tableFileHdr;

    struct StringDataTable {
       
        long    strTBLChunkSize;
        //if (tableFileHdr.StringTableVersion == 3)
            //long    strTBLUnk;
        //long    strTBLStringListSize;

        //long      unknown;
        //long      unknown2;

        struct StringParamTable {
            long    strSize;
        } stringParams;

        struct StringTableStringList {
            string textString[stringParams];
        } StringDataStringsList[3];
    } StringTableDataContent;
} StringTableContent;
  • Author
  • Localization

gameside, posted Tue May 25, 2021 5:37 pm (64270)


Code:
//------------------------------------------------
//--- 010 Editor v10.0.2 Binary Template
//
//      File: HalfBrick Studios Fruit Ninja/Mortar Engine *.STR (String Table)
//      Authors: GameSide
//      Version: 0.1
//      Purpose: for learning game stringTable format
//      Category: modding
//      File Mask:
//      ID Bytes:
//      History:
//------------------------------------------------
local int i = 0;


struct Header {
    int version;
    byte unknown[64]; // looks like string Ids to me
    int32 strTableChunkSize;
    FSkip(4); //Skip zero
    int32 strTableSize;
};

struct Gstr(int32 size) {
    char str[size];
};

struct TableInfo {
    int32 offset;
    int32 size1;
    int32 size2;
};

Header header;

FSeek(80 header.strTableSize);
int32 ICount;
TableInfo unData[ICount] ;

for( i = 0; i < ICount; i )
{
    FSeek(unData[i].offset 80);
    Gstr gstring((unData[i].size1 == unData[i].size2) ? unData[i].size1 : unData[i].size2) ;
}



here is a template I created for all str file inside of FN_Classic_Android_StringTables.zip
about other file, I don't have time to check it now, maybe later...
  • Author
  • Localization

LolHacksRule, posted Tue May 25, 2021 10:00 pm (64273)


Thank you so much. I was looking for a QuickBMS script as well if possible but this template could probably give me an idea on how to make one.
  • Author
  • Localization

gameside, posted Wed May 26, 2021 8:27 am (64275)


LolHacksRule wrote:
Thank you so much. I was looking for a QuickBMS script as well if possible but this template could probably give me an idea on how to make one.

QuickBms is a little hard to work with for this file, at least you can't import string back to file with reimport mode
So you need to create 2 script, one for export string from file, and one to import back based of infotable
  • Author
  • Localization

LolHacksRule, posted Wed May 26, 2021 4:33 pm (64289)


Yeah this is the most advanced localization file I've seen so far with the way it uses most binary values. I understand.
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.