ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Jul 15, 2019 10:07 pm

All times are UTC




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Apr 08, 2019 7:11 pm 

Joined: Mon Apr 08, 2019 7:07 pm
Posts: 5
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:
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 :)


Top
   
PostPosted: Tue Apr 09, 2019 2:22 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 239
here a reversion for id and hash

Code:
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


Top
   
PostPosted: Tue Apr 09, 2019 3:07 pm 

Joined: Mon Apr 08, 2019 7:07 pm
Posts: 5
Hi, thank you :) but i have a error :
Code:
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


Top
   
PostPosted: Tue Apr 09, 2019 3:25 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 239
script is not for reimport for now
and can you give a sample file?


Top
   
PostPosted: Tue Apr 09, 2019 3:49 pm 

Joined: Mon Apr 08, 2019 7:07 pm
Posts: 5
I don't want to reimport just export to txt


Attachments:
Game_BR.zip [964.02 KiB]
Downloaded 20 times
Top
   
PostPosted: Tue Apr 09, 2019 4:26 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 239
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)


Top
   
PostPosted: Tue Apr 09, 2019 4:29 pm 

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


Top
   
PostPosted: Thu Apr 11, 2019 10:41 am 

Joined: Mon Apr 08, 2019 7:07 pm
Posts: 5
Hi, any news ?


Top
   
PostPosted: Sun May 05, 2019 8:23 am 

Joined: Sun May 05, 2019 8:19 am
Posts: 2
- Hey. - hey. Translation program? If so, where can I download it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited