Localization file of Fortnite

How to translate the files of a game
Antoine
Posts: 5
Joined: Mon Apr 08, 2019 7:07 pm

Localization file of Fortnite

Post by Antoine »

Hi, i have a bms script who get all text but i would have the file with the format key/hash: value
because i want to check between all lang.

I have this script

Code: Select all

get CHECKER_FILESWQ long
if CHECKER_FILESWQ == 1970541582 | CHECKER_FILESWQ == 1
   goto 0
   get HEAD long
   if HEAD == 1970541582
      get DUMMY byte
      get DUMMY longlong
      get DUMMY long
      get OFFSET long
      goto OFFSET
      get COUNT long
      goto OFFSET
   endif
   if HEAD != 1970541582
      goto 0
      get DUMMY longlong
      get COUNT long
   endif

   for i = 0 < COUNT
      math UNICODED = 0
      if HEAD != 1970541582
         get SIZE long
         savepos OFFID
         math SIZE a SIZE
         math SIZE * 2
         getdstring DUMMY SIZE
      endif
      savepos VERSION
      getdstring DUMMY 3
      get TEST byte
      goto VERSION
      if HEAD == 1970541582
         if TEST == 0
            get ID long
         endif
      endif
      if TEST == 255
         math COUNING + 1
      endif
      if HEAD != 1970541582
         get ID long
      endif
      savepos PROCESSES
      get LENGTH long
      savepos TEXTOFF
      math LENGTH -= 1
      goto PROCESSES
      getdstring CHECKER 3
      get UNICODE_FILE_CHECKER byte
      if UNICODE_FILE_CHECKER == 255
         math LENGTH += 1
         math LENGTH a LENGTH
         math LENGTH * 2
         math LENGTH -= 2
         get DUMMY byte
         math UNICODED + 1
      endif
      getdstring TEXT LENGTH
      get DUMMY byte
      if UNICODED = 0
         slog "" TEXTOFF LENGTH
      endif
      if UNICODED = 1
         slog "" TEXTOFF LENGTH unicode
      endif
      next i
   cleanexit
else
   goto 0
   print "\n\nERROR: Your File Is NOT a .locres file at all, or not supported yet!\n\n"
endFunction


Thank you :)
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Localization file of Fortnite

Post by Shokoniraya »

here a reversion for id and hash

Code: Select all

get NAME filename
string NAMER p "%s.txt" NAME

get CHECKER_FILESWQ long
if CHECKER_FILESWQ == 1970541582 | CHECKER_FILESWQ == 1
goto 0
get HEAD long
if HEAD == 1970541582
get DUMMY byte
get DUMMY longlong
get DUMMY long
get OFFSET long
getdstring DUMMY 12
savepos IDHE
goto OFFSET
get COUNT long
goto OFFSET
goto IDHE
endif
if HEAD != 1970541582
goto 0
get DUMMY longlong
get COUNT long
endif
set MEMORY_FILE0 binary "\x3C\x49\x44\x3E"

log NAMER 0 4 MEMORY_FILE0

for i = 0 < COUNT
set MEMORY_FILE1 binary "\x0d\x0a\x3C\x49\x44\x3E"
append
log NAMER 0 6 MEMORY_FILE1
append
goto IDHE

math UNICODED = 0
if HEAD != 1970541582
get SIZE long
savepos OFFID
math SIZE a SIZE
math SIZE * 2
getdstring DUMMY SIZE
endif
savepos VERSION
getdstring DUMMY 3
get TEST byte
goto VERSION
if HEAD == 1970541582
if TEST == 0
get ID long
endif
endif
if TEST == 255
math COUNING + 1
endif
if HEAD != 1970541582
get ID long
endif
savepos PROCESSES
get LENGTH long
savepos TEXTOFF
math LENGTH -= 1
goto PROCESSES
getdstring CHECKER 3
get UNICODE_FILE_CHECKER byte
if UNICODE_FILE_CHECKER == 255
math LENGTH += 1
math LENGTH a LENGTH
math LENGTH * 2
math LENGTH -= 2
get DUMMY byte
get DUMMY long
math UNICODED + 1
endif
getdstring TEXT LENGTH
get DUMMY byte

savepos IDHEADE
if UNICODED = 0
slog "" TEXTOFF LENGTH
endif
if UNICODED = 1
slog "" TEXTOFF LENGTH unicode
endif
math IDHE2 = IDHE
math IDHEADE -= IDHE2
math IDHE + IDHEADE
goto IDHE
set MEMORY_FILE2 binary "\x3C\x74\x65\x78\x74\x3E"
append
log NAMER 0 6 MEMORY_FILE2
append
goto OFFSET

math UNICODED = 0
if HEAD != 1970541582
get SIZE long
savepos OFFID
math SIZE a SIZE
math SIZE * 2
getdstring DUMMY SIZE
endif
savepos VERSION
getdstring DUMMY 3
get TEST byte
goto VERSION
if HEAD == 1970541582
if TEST == 0
get ID long
endif
endif
if TEST == 255
math COUNING + 1
endif
if HEAD != 1970541582
get ID long
endif
savepos PROCESSES
get LENGTH long
savepos TEXTOFF
math LENGTH -= 1
goto PROCESSES
getdstring CHECKER 3
get UNICODE_FILE_CHECKER byte
if UNICODE_FILE_CHECKER == 255
math LENGTH += 1
math LENGTH a LENGTH
math LENGTH * 2
math LENGTH -= 2
get DUMMY byte
math UNICODED + 1
endif
getdstring TEXT LENGTH
get DUMMY byte
savepos OFFADER
if UNICODED = 0
slog "" TEXTOFF LENGTH
endif
if UNICODED = 1
slog "" TEXTOFF LENGTH unicode
endif
math OFFSET2 = OFFSET
math OFFADER -= OFFSET2
math OFFSET + OFFADER
goto OFFSET
set MEMORY_FILE3 binary "\x0d\x23"
append
log NAMER 0 2 MEMORY_FILE3
append

next i
cleanexit
else
goto 0
print "ERROR: Your File Is NOT a .locres file at all, or not supported yet!"
endFunction
Antoine
Posts: 5
Joined: Mon Apr 08, 2019 7:07 pm

Re: Localization file of Fortnite

Post by Antoine »

Hi, thank you :) but i have a error :

Code: Select all

incomplete input file 0: D:\FortniteGame\Content\Localization\Game_BR\en\Game_BR.locres
Can't read 1602118690 bytes from offset 001e600a.

< 1:
+ 00000000 6          fr.locres.txt
< 2: /
+ 00000000 2          fr.locres.txt
+ 00000000 6          fr.locres.txt

Error: the requested amount of bytes to allocate is negative (0xcf4d64ac)
Last script line before the error or that produced the error:
  75  getdstring TEXT LENGTH
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Localization file of Fortnite

Post by Shokoniraya »

script is not for reimport for now
and can you give a sample file?
Antoine
Posts: 5
Joined: Mon Apr 08, 2019 7:07 pm

Re: Localization file of Fortnite

Post by Antoine »

I don't want to reimport just export to txt
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Localization file of Fortnite

Post by Shokoniraya »

Antoine wrote:I don't want to reimport just export to txt

i have to work on it, last script just work on unicoded files (but first script is fine)
Antoine
Posts: 5
Joined: Mon Apr 08, 2019 7:07 pm

Re: Localization file of Fortnite

Post by Antoine »

Ok i will wait, thank you :D
Antoine
Posts: 5
Joined: Mon Apr 08, 2019 7:07 pm

Re: Localization file of Fortnite

Post by Antoine »

Hi, any news ?
mityorka1
Posts: 9
Joined: Sun May 05, 2019 8:19 am

Re: Localization file of Fortnite

Post by mityorka1 »

- Hey. - hey. Translation program? If so, where can I download it.