South Park Mega Millionaire "l" (Localization) file

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

South Park Mega Millionaire "l" (Localization) file

Post by LolHacksRule »

The format is super simple. Language separation is internallly called though...

Code: Select all

Repeating per text
1byte: 00
2byte: Bytesize of text
?bytes: UTF-8 text


Oh and I kinda wrote a script that eventually dies, can someone fix it if possible?

Code: Select all

get NAME basename
string NAME + ".txt"
get asize asize

savepos curr

for curr = curr < asize
   # Dump the strings
   get dummy byte
   get strSize byte
   if strSize >= 128
      get strSize2 byte
      xmath strSize "strSize + (strSize2 - 1) * 128"
   endif
   savepos curr
   slog NAME curr strSize
   getdstring temp strSize
   savepos curr
next
Zmkiy
Posts: 27
Joined: Mon Mar 09, 2020 3:14 pm

Re: South Park Mega Millionaire "l" (Localization) file

Post by Zmkiy »

Big Endian

Code: Select all

get NAME basename
string NAME + ".txt"
get asize asize
endian big
savepos curr

for curr = curr < asize
   # Dump the strings

   get strSize short

   savepos curr
   slog NAME curr strSize
   getdstring temp strSize
   savepos curr
next
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: South Park Mega Millionaire "l" (Localization) file

Post by LolHacksRule »

Thanks, it works perfectly.
Last edited by LolHacksRule on Wed Dec 02, 2020 5:16 pm, edited 1 time in total.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: South Park Mega Millionaire "l" (Localization) file

Post by LolHacksRule »

13 *: in bytes are internally indicators for the below. Replace "*" with the number.
"1:" appears to be black (plain) text.
"2:" appears to be bold text.
"3:" appears to be the header (?), similar to "2".
"4:" appears to be the pink bold.