1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by aluigi »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 1bsr archives and pgsr files (sub-archives)

Post by aluigi »

Script updated to version 0.2.

If the pgsr filesystem is compressed, quickbms will dump it as-is instead of using a memory file.
It's not correct but at least it allows reimporting.
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives)

Post by RayXu »

So can I use the script to reimport it?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 1bsr archives and pgsr files (sub-archives)

Post by aluigi »

Yes the script allows reimporting, I decided to "sacrifice" the correct extraction of the files (the note about the compressed file system said before) in place of the possibility of reimporting the data.
So in some situations you may have a big file that contains 2 or more files inside it.

Note that the files are often compressed so, depending by the game, the result usually works but with some rare games it may not work. Considering that here the game uses zlib I guess it should work.

For using the reimport mode you have to follow the SAME steps you did for extraction.
With "SAME steps" I mean just selecting the same files and folders.

You can find additional information in section 3 of quickbms.txt.
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

So I should just use the reimport.bat and choose the file I want to replace and then choose output folder as the archive?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by aluigi »

No, you must choose the script, the original archive and the original output folder you selected during the extraction.
The files are automatically found and reimported by quickbms.

So if during the extraction you selected c:\path\file1.rsb and the folder c:\patch\output now you must to the same.

In the folder you should leave only the file you changed and delete all the others.

Remember to make a backup of your original rsb archive.
colorfulwish
Posts: 1
Joined: Tue Jun 30, 2015 6:52 am

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by colorfulwish »

hello,I am the one who asked some question about this by e-mail,Thank you very much
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

Oh, I see. Thank you . I'll try later.
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

And I only need to choose the script ?(don't need reimport.bat ???)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by aluigi »

You must start reimport.bat and then selecting script, input file (that will be modified) and folder (that now acts as input folder).
It's really very easy.
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

It works! Thank you so much, Luigi!
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

I have just met a problem: I reimported the file that I edited, and I entered the game, it doesn't work anymore..P.S.The game updated a few hours ago, in the last version of this game, the reimported rsb still worked..
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by aluigi »

Do you think that it's a problem affecting only some files or a sort of obstacle inserted by the developers?
I don't remember to have seen CRC or other strange fields that may be used to check if the content has been changed (the reimporting feature doesn't change the crc fields).
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

Actually, I want to do a Localization on PvZ2, and I translated some of the text (\LawnStrings_ENUS\LOCALES\EN-US\PROPERTIES\LAWNSTRINGS.TXT), and the edited file is just as the same size as the original file. Then I reimported it into the rsb, however, the game doesn't run...
RayXu
Posts: 10
Joined: Mon Jun 29, 2015 11:41 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by RayXu »

Maybe because Game Strings are resources..And maybe the Game Company did let the program check the content..(Another story: Before 3.4.4 version of PvZ2, 'Arcade_Config.rton' is not compressed in rsb, because of all the hacking of the game, PopCap compressed the source code into the rsb...Maybe they do check if this file is changed)
kvn
Posts: 21
Joined: Sat Aug 29, 2015 11:43 pm

Re: 1bsr archives and pgsr files (sub-archives) [Plants vs Zombies 2]

Post by kvn »

This script can't unpack this file. Also a PvZ2's data.
https://mega.nz/#!LUt3nAjI!DW6xikWGZf62 ... MY3c8XaYuE