In this guide I will try to explain how to use PvZ: Replanter, to replace the assets of Plants Vs. Zombies: Replanted
It's not really too hard, that's why I'll be also making a guide on how to create the .emip files, so you can create and distribute your own mods
First, this is what you'll need:
First, locate your game files location; if you're using steam, you can do this by right-clicking the game and hitting the "Browse Local Files" option.
Once you have the game's path, open the executable "PvZ-Replanter-GUI". It should prompt you to paste the game's to continue
Now, you'll be greeted by the (dull) main page of PvZ: Replanter. What you need to do is first check the "spine.bundle" (At the time of writting this
guide, PvZ: Replanter ONLY supports patching and repacking this file, this will change once it gets updated), then "Uncompress Bundle"
and "Unpack Assets".
This will first, well, decompress, your bundle, as it's usually compressed in either brotli, LZ4 or LZMA. Then it will output the unpacked files to your
newly created "unpacked" folder, in a folder structure of "./unpacked/{unpacked.bundle}/{unpacked.bundle}.decomp"
Now, once you have decompressed your bundle, you can now unpack your bundle into CAB files using the "Unpack Assets" button; this is what you'll
need if you want to create mods for the game, so if you want to create mods, you should grab a copy of them. If everything went well, you should get
an output just like this one:
Now, this is a good time to introduce you to .emip files: .emip files are the files output by UABEA's Mod Maker, pretty easy and straightforward to use
and to patch, so that's why I decided to use them for this tool. If everything goes right, a few mods will appear by the time anyone starts reading this guide,
but if not, I can give you one file to get started and to learn how to use this tool. It's a mod that changes the Wallnut's appeareance for it's Nintendo DS
sprite, you can get it from here.
Once you have your mods ready, copy them to the "mods" directory inside the tool's folder, and click the "Mod List" button, this will get the name of every .emip
file inside the "mods" folder.
Once you're happy with your selection, hit the "Save" button. The tool will remember which mods you've marked, so keep this in mind when patching your CAB files.
Now, this is the moment of truth: Once you hit "Patch Mods to Assets", the program will write the mod data to your unpacked CAB files, this is why I said that, if you
wanted to create your own mods, as those files will be permanently altered (Worry not, as there is a backup of your compressed bundle inside your "backups" folder).
Now with that out of the way, it's finally time to hit the "Repack Assets to Bundle". This will take your unpacked CABs and write them back into the bundle. Once it
finishes, and if everything goes right, the only thing left is to hit the "Replace Files" button, which will replace the bundle files inside your game folder with the modified
ones that the tool created. Once it's over, congratulations, you can now open Plants Vs. Zombies: Replanted and enjoy your shiny new assets!.
Now, you might ask: "Sachiko, but how do I create my own mods? I want to create a funny weed Peashooter!". Well, worry not my dear reader, as I, Sachiko, will
teach you how to create your own .emip files, for you to enjoy and share with other people!~.
Well, let's start: First off, you need a clean copy of your unpacked files. If you don't have them, you can either hit the "Unpack Bundle" button in PvZ: Replanter if you
still have your .decomp file, or use the backup file to create a new decomp and then unpack your files (You may be able to do this with your compressed bundle, as it's
still be able to be opened and read by UABEA, but no guarantees). Once you have your unpacked files ready, open UABEA and load the file without an extension, usually
the smallest one, using the "Open" option inside the File menu, or by dragging it into the program.
Once you're here, you can click the "Type" column to sort the files by type, in this case Texture 2D, as we're going to edit the Peashooter sprite into something... else...
First, we locate the "PeaShooter" file, as it contains the texture we're looking for. Then, once we locate it, we select it and we click the "Plugins" button. Here, we choose
the "Export texture" option and we choose the location where we'll be exporting our texture. Once we're done, we can go and edit our texture to our hearts content. I have a job
to do so I'll be back once I'm done with my masterpiece.
Well now that I'm done, we'll go back to UABEA and hit the "Plugins" button once again, but this time, we'll choose "Edit texture" instead
If I'm being honest, I don't know too much about those options, I just know they're options for the png => DDS conversion but I don't really know what they mean, ̶s̶o̶ ̶I̶ ̶j̶u̶s̶t̶ ̶l̶e̶a̶v̶e̶
̶o̶n̶ ̶t̶h̶e̶i̶r̶ ̶d̶e̶f̶a̶u̶l̶t̶ ̶v̶a̶l̶u̶e̶s̶,̶ ̶a̶s̶ ̶i̶t̶ ̶s̶e̶e̶m̶s̶ ̶t̶o̶ ̶w̶o̶r̶k̶ ̶j̶u̶s̶t̶ ̶r̶i̶g̶h̶t̶ . Edit: Use Trilinear for High-Res textures/edits, Bilinear for Pixel Art-like edits
Anyways, back to our task: We click the "Load" button and we choose our edited image, and then hit save.
Now this is the tricky part, so pay attention or else your mods literally won't work for other people.
Once we're happy with our changes, we open the "File" menu and we select Mod Maker > Create package file
Here, we fill the empty fields with their respective info: Mod Name with our mod name, Credits with our name, Description with a description... And for the important part: the Base folder
When we hit "Select", we want to pick the folder where our unpacked files are. That way, it'll take the CAB file as the reference and not the folder where it resides.
This is very important, because if you leave it empty, the mod will only be patchable if there is a CAB file inside the exact same folder where it was when the mod was created. It probably
won't be an issue for (You), but if you share your .emip or move the location of your Replanter, the Replanter WILL crash when patching your emip file to a CAB file.
I can't stress enough how important that step is. Once you fill those fields, and make sure the changed point to a CAB file and not a folder, you can hit OK to save your .emip
file. Choose your location and congratulations! You've created your first mod! You can close UABEA now, if it asks to save changes, it's up to you, as it will irreversibly write the changes
to your CAB files, so I usually exit without saving. Now that we're done, we can go back to our PvZ: Replanter, place the mod inside our mod folder (Don't forget to refresh the mod list by
opening clicking the "Mod List" button and making sure to select it) and finally Patch>Repack our files.
The final result?:
I mean... isn't it just beautiful...?
Well, if you're here, thanks for sticking until the end. This project caused me tons of headaches even if it only took around days to get it to work. I'll leave for now and I hope
both this tool and this guide we're helpful in your adventures. If you have a question, a suggestion, want to show me your creation or something else to say, send me an email to
sachikonya808@gmail.com and I'll be happy to respond. If there's enough questions, I'll maybe do a FAQ section. For now though, stay safe traveler!