User blog:RealKingPiggy/Plants vs Zombies 2 Hex Edit Tutorial! Editing Zomboss fight zombies and plants!

== THIS IS A TUTORIAL THAT IS GETTING UPDATED, MORE WILL BE ADDED SOON. I WILL ALSO TRY TO FIND A WAY TO DO THIS EASY ON IOS ASWELL. Otherwise, this tutorial is for android users, and some who have an editable obb for ios.

There are many things you have to do before we can get to the editing.



The first thing is a few requirements:

    
 * 1) An Android Device or Emulator.
 * 1) A file explorer app, such as Es File Explorer,
 * 1) PVZ2 game, na or row, (this will be explained later)
 * 1) a way to transport your edited file to your game

The second is obtaining an Editable OBB:



<p data-parsoid="{"dsr":[215,439,0,0]}">IMPORTANT NOTE BEFORE WE GET STARTED: obb's before 3.4 do not need to be made "editable", this means if you are using an old version under 3.4, you do not have to get an editable obb for that version. just edit the one from the downloaded one.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[1258,1262,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}"> In the pinned post, there should be a link that reads "Editable obb", and give you a file called main.(#).com.ea.game.pvz2_(row/na).obb.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[1441,1445,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">QUICK NOTE: If you have an apk that is for na, and an obb for row, just rename the obb to "na" instead of "row". Basically, The "row" version is an international version of the app on the google play store. The "na" is a soft release, or beta version.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[1738,1742,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">To check which version you have, In your file explorer, go to /sdcard/Android/obb/com.ea.game.pvz2_(row/na). Which ever version is there, "na" or "row", use that for the obb instead.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[1966,1970,0,null]}">

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[1972,2017,0,null]}"><p data-parsoid="{"dsr":[215,439,0,0]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">Now that you have your obb, there is 3 ways you can edit.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2116,2120,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">If you would like to edit on the go from your android device, you can download an app called "Hex Editor" from the google play store.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2295,2299,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">If you would like to edit on a Windows computer, use HXD Hex editor, which can be downloaded here.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2439,2443,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">If you would like to edit on a Mac computer, use IHex from the mac app store, this is one of the best I could find.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2600,2604,0,null]}">

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2606,2651,0,null]}"><p data-parsoid="{"dsr":[215,439,0,0]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">Now that you have a way to edit, we can finally begin!

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2747,2751,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">Open your file at the target path with your app/program.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2849,2853,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">Now you should see some code say 1bsr and a bunch of random symbols after that.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[2974,2978,0,null]}">

<p data-parsoid="{"dsr":[215,439,0,0]}">Next, I'm going to explain a few things before i get too far. The only things we really know about editing zomboss fights, are editing what zombies he spawns, and what plants are on the conveyor belt aswell as a few properties about the conveyor belt.

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[3271,3275,0,null]}">

<p data-parsoid="{"autoInsertedStart":true,"stx":"html","dsr":[3277,3322,0,null]}"><p data-parsoid="{"dsr":[215,439,0,0]}">

<p data-parsoid="{"dsr":[3324,3324,0,0]}">

EDITING PLANTS
<p data-parsoid="{"dsr":[3345,3667,0,0]}">First you need to find which zombot you want to edit. Currently this can only be done with 4 legged ones. This includes: zombossmech_egypt, <span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[3485,3546,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">zombossmech_pirate,  <span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[3546,3607,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">zombossmech_cowboy,  <span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[3607,3667,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">zombossmech_future,

<p data-parsoid="{"dsr":[3669,4100,0,0]}"><span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[3669,3868,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">Take one of those codes without the comma, and search for it. I use zombossmech_future as an example. There are multiple results, the first result should be:  3IMAGE_UI_ALMANAC_PACKETS_ZOMBIES_ZOMBOSSMECH_FUTURE. This is not correct. search again. you should go to another zombossmech_future under this ^. Search one more time. then you should get a result with "ZombossMechType' before it.

<p data-parsoid="{"dsr":[4102,4501,0,0]}">Then, scroll up. you should see a bunch of plants, and the words "initial plant list" This is the list of plants in the conveyor belt. PLEASE NOTE THAT SOME PLANTS ARE NOT BY THERE ACTUAL NAME. THERE ARE CODE NAMES INSTEAD. EXAMPLE: Infi-nut is codeworded as holonut. SOME ALSO HAVE _ IN THERE NAMES. EXAMPLE: CherryBomb's codename is cherry_bomb. a list of these plants codenames can be found here.

<p data-parsoid="{"dsr":[4503,5089,0,0]}">Now you edit them! If anybody knows how to add bytes to the words, please let me know. Whenever I do, the game crashes :/    Anyway, let me give an example: the plant is "holonut". holonut has 7 letters. You cannot change to plants with a higher number of letters in the codename without adding bytes, which you can do, but i dont know how on some devices, and my game crashed when i did. if you change holonut to "stunion" that is ok. if you change holonut to "citront" that is not ok. you need to NULLIFY the t. This can be done by taking the hex numbers of the "t" and make them "00"

<p data-parsoid="{"dsr":[5091,5138,0,0]}">For example. 68 6F 6C 6F 6E 75 74 holonut --->

<p data-parsoid="{"dsr":[5140,5174,0,0]}">63 69 74 72 6F 6E 74 citront --->

<p data-parsoid="{"dsr":[5176,5294,0,0]}"><span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[5176,5294,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">63 69 74 72 6F 6E 00 citron. (the period is a dot representing the code "00")

<p data-parsoid="{"dsr":[5296,5462,0,0]}"><span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[5296,5462,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">you can use the list above to get the codenames. AGAIN: if anybody knows the deal with inserting bytes, please let me know :D

<p data-parsoid="{"dsr":[5464,5464,0,0]}">

<p data-parsoid="{"dsr":[5466,5523,0,0]}"><span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[5466,5523,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">ADVANCED EDITS:

<p data-parsoid="{"dsr":[5525,5590,0,0]}"><span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[5525,5590,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">How much of each plant: This is the dollar sign before holonut which the byte after it is how many can appear at once. In this case, it is 3.<p data-parsoid="{"dsr":[5738,6308,0,0]}"><span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[5738,6308,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">First, you need to open the level. Now, try to plant everyone of each plant without defeating zomboss. See how many of each plant that you have when the conveyor belt stops giveing you that plant. I will put some pictures here showing soon. To basically explain this, i will be using infinut in future zomboss battle. There are a maximum of 3 available at a time. For every plant that you find the maximum of, There will be this number in hex after a $. This dollar sign for that plant will always be one before the plants name.

<span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[6312,6368,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">EDITING ZOMBIES
<p data-parsoid="{"dsr":[6372,6465,0,0]}"> <span class="ve-pasteProtect" data-parsoid="{"stx":"html","dsr":[6373,6465,34,7]}" data-ve-attributes="{"style":"font-weight:normal;"}" style="font-weight:normal;">This is a little bit different than the one before.