kosemen_76 Posted September 12, 2024 Posted September 12, 2024 (edited) Hello, I would like help with archives that I guess are local files of the ps3 game. I tried all the asura tools and got no results. ÇEŞİTLİ.zip Edited September 12, 2024 by kosemen_76
Engineers h3x3r Posted May 17 Engineers Posted May 17 (edited) Any file ending like this "_AM.ASRBE" is loc file. COMMON.ASRBE uses zlib and overal all files are in big endian since it's ps3. Made a quick struct... for reference. //------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ BigEndian();OutputPaneClear(); char AsuraSign[8]; struct { char TXTHSign[4]; uint32 TableSize; // Must be probably updated. uint32 Unknown_1, Unknown_2, StringCount, Unknown_3, StringSectionSize; // This must be updated after repack. It's size of all strings without StrCRC and StrLen variable. struct { uint32 StrCRC; uint32 StrLen; wchar_t LocString[StrLen]; // If changed StrLen must be updated too. }String[StringCount]<optimize=false>; uint32 IdStringSize; struct { string IdString; }IdString[StringTable.StringCount]<optimize=false>; }StringTable; Edited May 17 by h3x3r
kosemen_76 Posted May 17 Author Posted May 17 3 hours ago, h3x3r said: "_AM.ASRBE" şeklinde biten her dosya loc dosyasıdır. COMMON.ASRBE zlib kullanır ve PS3'e ait olduğu için bütün dosyalar big endian'dır. Referans olması açısından hızlı bir yapı oluşturdum. Thanks for the template. From this template, I can see that the archive file is just a text file. However, I have no idea how to modify the lines in this template to create a text file generator script. Would it be possible for you to edit this template in .1sc format?
Engineers h3x3r Posted May 17 Engineers Posted May 17 You can use qbms to export/import. Only thing which is left is fixing StringSectionSize variable.
kosemen_76 Posted May 18 Author Posted May 18 4 hours ago, h3x3r said: You can use qbms to export/import. Only thing which is left is fixing StringSectionSize variable. Unfortunately, it did not work with Quickbms.
Engineers Solution h3x3r Posted May 18 Engineers Solution Posted May 18 (edited) There you go... ################################### get BaseFileName basename endian big getdstring Dummy 0x0C get TableSize uint32 getdstring Dummy 0x08 get StrigCount uint32 getdstring Dummy 0x04 get StringSectionSize uint32 string FileName p= "%s.txt" BaseFileName for i = 0 < StrigCount get StrCRC uint32 get StrLen uint32 savepos StrOffset math StrLen * 2 getdstring LocString StrLen slog FileName StrOffset StrLen unicode next i And this one should fix it after reimport3. //------------------------------------------------ //--- 010 Editor v14.0 Script File // // File: // Authors: // Version: // Purpose: // Category: // History: //------------------------------------------------ BigEndian(); local uint32 i,j,k; FSkip(8); local uint32 TableStartOffset=FTell(); FSkip(4); local uint32 TableSize=ReadUInt(FTell()); FSkip(12); local uint32 StringCount=ReadUInt(FTell()); FSkip(8); local uint32 StringSectionSize=ReadUInt(FTell()); FSkip(4); local struct { uint32 StrCRC=ReadUInt(FTell()); FSkip(4); local uint32 StrLenPos=FTell(); uint32 StrLen=ReadUInt(FTell()); FSkip(4); local uint32 StrPos=FTell(); wstring LocString=ReadWString(StrPos,StrLen); FSkip(StrLen * 2); local uint32 StrEndPos=FTell(); InsertBytes(StrEndPos, 2, 0); FSkip(2); WriteUInt(StrLenPos, StrLen + 1); }String[StringCount]<optimize=false>; local uint32 StringSectionEndOffset=FTell(); local uint32 IdStringSize=ReadUInt(FTell()); FSkip(IdStringSize + 4); local uint32 TableEndOffset=FTell(); local uint32 StrSectionSize=((StringSectionEndOffset - TableStartOffset) - (StringCount * 8) - 28); local uint32 TabSize=(TableEndOffset - TableStartOffset); WriteUInt(12, TabSize); WriteUInt(32, StrSectionSize); FileSave(); Edited May 18 by h3x3r
kosemen_76 Posted May 18 Author Posted May 18 (edited) 4 hours ago, h3x3r said: İşte böyle... Ve bu, reimport3'ten sonra düzelmeli. get BaseFileName basename endian big getdstring Dummy 0x0C get TableSize uint32 getdstring Dummy 0x08 get StrigCount uint32 getdstring Dummy 0x04 get StringSectionSize uint32 string FileName p= "%s.txt" BaseFileName # Export: Save all strings to external txt file for i = 0 < StrigCount get StrCRC uint32 get StrLen uint32 savepos StrOffset math StrLen *= 2 getdstring LocString StrLen slog FileName StrOffset StrLen unicode next i # Reimport: Read back modified strings from txt reimport FileName goto 0x1C for i = 0 < StrigCount get StrCRC uint32 get StrLen uint32 savepos StrOffset math StrLen *= 2 getdstring OldStr StrLen reimport FileName getdstring NewStr StrLen FileName putdstring NewStr StrLen next i Edited May 18 by kosemen_76
kosemen_76 Posted May 18 Author Posted May 18 I have prepared something like this, but I think it needs to be worked on in terms of character count. Please help.
Engineers h3x3r Posted May 18 Engineers Posted May 18 Create bat file and put this in it and save and run. It automatically updates StrLen based on string length in txt file. Use same script as for export. quickbms.exe -G -w -r -r -r
kosemen_76 Posted May 18 Author Posted May 18 (edited) 21 minutes ago, h3x3r said: Create bat file and put this in it and save and run. It automatically updates StrLen based on string length in txt file. Use same script as for export. Edited May 18 by kosemen_76
kosemen_76 Posted May 18 Author Posted May 18 (edited) Of course, I tried, but this is the result. There is no problem when exporting and importing in the original format, but when changing the format, this problem occurs. Can't read 15898 bytes from offset 0000be62. Anyway don't worry, it's possible that the BMS script has been written to exit in this way if it's reached the end of the archive so check it or contact its author or verify that all the files have been extracted. Please check the following coverage information to know if it's ok. coverage file 0 100%! 118690 48738 . offset 0000be62 Last script line before the error or that produced the error: 31 getdstring OldStr StrLen coverage file 0 100%! 118690 48738 . offset 0000be62 After adding the import code to the script, it still gives this error when exporting. Edited May 18 by kosemen_76
Engineers h3x3r Posted May 18 Engineers Posted May 18 (edited) so what is this then? You didn't update TableSize + StringSectionSize after reimport. Edited May 18 by h3x3r
kosemen_76 Posted May 18 Author Posted May 18 (edited) Because I don't know how to do it. Thanks You're going to share the solution, aren't you? Edited May 18 by kosemen_76
Engineers h3x3r Posted May 18 Engineers Posted May 18 Use BMS which i posted for export/re-import. Do re-import only on clean unmodified files aka original. Never do re-import twice on single file. You fuck it up. After re-import use 010 hex editor script on that file. DONE!
kosemen_76 Posted May 19 Author Posted May 19 21 hours ago, h3x3r said: Use BMS which i posted for export/re-import. Do re-import only on clean unmodified files aka original. Never do re-import twice on single file. You fuck it up. After re-import use 010 hex editor script on that file. DONE! Thank you very much
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now