Gameloft Localization Binary (2012[?]-? *.LANG)

How to translate the files of a game
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Gameloft Localization Binary (2012[?]-? *.LANG)

Post by LolHacksRule »

Gameloft's messy unnamed LZMA archives for C.O.R.E got a recent tool a while back after most of Sonic Unleashed's data was figured out, so I attempted to use it on Ice Age Village, but it didn't work, I then used the LZMA QuickBMS script to get a mess of data and eventually got these binary localization data files. I attempted to crack the binary format, if anyone wants to write a script, please do so, repacking is still going to be a pain.

UPDATE: This is exported from an internal Java application known as FlashExportText.

Code: Select all

STRING ID DATA:
1byte: 00
?bytes: String ID bytesize
?bytes: String ID
1byte: 00
TEXT DATA:
?bytes: Text string bytesize
?bytes: Text string

Eventually ends with 0000001C
Last edited by LolHacksRule on Sun Dec 06, 2020 4:12 am, edited 3 times in total.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Ice Age Village (*.LANG internally)

Post by Shokoniraya »

here a script

Code: Select all

get FILE_NAMER filename
string FILE_NAMER + ".txt"
endian big
for i
savepos CURRENT_LOCATION
get OVER_SIZE asize
xmath REST_SIZE "OVER_SIZE - CURRENT_LOCATION"

if REST_SIZE < 4
cleanexit
endif

get ID_TEXT_LENGTH short
getdstring ID_TEXT ID_TEXT_LENGTH

get TEXT_LENGTH short
savepos TEXT_OFFSET
slog FILE_NAMER TEXT_OFFSET TEXT_LENGTH
getdstring TEXT TEXT_LENGTH

get SECTION_NUMBER long
next i
Last edited by Shokoniraya on Sun Oct 18, 2020 2:00 am, edited 2 times in total.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Ice Age Village (*.LANG internally)

Post by LolHacksRule »

Thank you so much.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Ice Age Village (*.LANG internally)

Post by LolHacksRule »

UPDATE: Minor problem with CDN (ENGLISH). Please double check unless you don't plan to fix.

Code: Select all

Error: incomplete input file 0: C:\Users\LolHacksRule\Desktop\Android\Apps\Gameloft\IceAgeVillage\assets_ext\22000\00000000.dat
       Can't read 2 bytes from offset 00101c72.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0   151%   1599157    1055858    . offset 00101c72

Last script line before the error or that produced the error:
  5   get ID_TEXT_LENGTH short
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Ice Age Village (*.LANG internally)

Post by Shokoniraya »

test it again
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Ice Age Village (*.LANG internally)

Post by LolHacksRule »

Thanks but would it be possible to dump string IDs along with the strings?
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Ice Age Village (*.LANG internally)

Post by Shokoniraya »

LolHacksRule wrote:Thanks but would it be possible to dump string IDs along with the strings?

quickbms is not a xml importer or ini importer, it just export and import raw text
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Ice Age Village (*.LANG internally)

Post by LolHacksRule »

Dang that works then I guess