Help with be_stings script by Red Faction Guerrilla

Doubts, help and support about QuickBMS and other game research tools
Graveyard
Posts: 54
Joined: Sun Nov 12, 2017 12:30 pm

Help with be_stings script by Red Faction Guerrilla

Post by Graveyard »

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: Select all

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
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with be_stings script by Red Faction Guerrilla

Post by aluigi »

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.
Graveyard
Posts: 54
Joined: Sun Nov 12, 2017 12:30 pm

Re: Help with be_stings script by Red Faction Guerrilla

Post by Graveyard »

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. ;)