ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sun Sep 23, 2018 2:26 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jul 03, 2018 3:47 am 

Joined: Sun Nov 12, 2017 12:30 pm
Posts: 52
Hi aluigi

I am using the script you created to extract the texts from the attached file of Red Faction Guerrilla, Xbox 360 version, and extracts perfectly. However, after translating a few words and reimporting, I get this error.

Image

The error occurs when I change the amount of letters of a word after being translated, and in game, the translated texts are strange. Would I have some other solution, or would I have to use the same amount of letters in my text translated from English to Portuguese (my language)?

The script used for export and reimxport is this:

Code:
get NAME basename
string NAME + ".txt"
get DUMMY long  # 0xa84c7f73
get VER short
endian guess16 VER
get STRINGS long
for i = 0 < STRINGS
    get DUMMY long
    get SIZE short
    slog NAME -1 SIZE unicode
    padding 4
next i


An example file: https://www.mediafire.com/file/e9xsbw98 ... be_strings

The error occurs after changing the amount of characters (letters) of a translated word or phrase.

Thanks for listening


Top
   
PostPosted: Tue Jul 03, 2018 10:41 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8816
I guess the problem is just with your longer strings that indeed are going to corrupt the subsequent fields and data.
The reason why quickbms doesn't stop the process after showing the error is that it becomes aware of the overwriting only "after" the operation (long story short: utf8, unicode, conversions and so on make difficult to know it before), therefore the data is already corrupted.

Yeah, that's quite bad but it allows me to keep the SLog string reimporting code simple and error-proof (from a programming point of view).

Anyway I suggest you to use the latest version of quickbms because I remember to have improved that part of code recently, probably it's useless but it's better to stay update.
Remember to keep ever a backup of your original file.


Top
   
PostPosted: Tue Jul 03, 2018 11:20 pm 

Joined: Sun Nov 12, 2017 12:30 pm
Posts: 52
aluigi wrote:
I guess the problem is just with your longer strings that indeed are going to corrupt the subsequent fields and data.
The reason why quickbms doesn't stop the process after showing the error is that it becomes aware of the overwriting only "after" the operation (long story short: utf8, unicode, conversions and so on make difficult to know it before), therefore the data is already corrupted.

Yeah, that's quite bad but it allows me to keep the SLog string reimporting code simple and error-proof (from a programming point of view).

Anyway I suggest you to use the latest version of quickbms because I remember to have improved that part of code recently, probably it's useless but it's better to stay update.
Remember to keep ever a backup of your original file.


thanks for listening. ;)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 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