Modify Plants vs. Zombies

This will tell you how to Modify Plants vs Zombies. For people who do not support it, do not read this.

Modification will allow you to change the art, sound(and else) of plants vs zombies.

Before Modifying
There is a file called "main.pak" which contain files that you are using later on to edit. You'll have to extract the pack first. 


 * data: Contains the game's font.
 * properties: In this folder, only LawnStrings.txt should be messed with. This file contains all the texts in the game, like almanac entries, Crazy Dave's speeches, etc. Game of The Year version has a new file: ZombatarTOS.txt (Zombatar's Terms Of Service), but it's NOT recommended that you mod this file, since you may violate some laws.
 * compiled: This folder contains files in a .compiled format, and they define the body parts placement and movements of characters in the game (For more info see this topic). Modifying them is possible, but pretty difficult (See this topic)
 * images: Contains various images (but not all, unlike what the name suggests) in the game, like lawns backgrounds, items in the game, etc.
 * particles: Contains images for "particles" like splats, chunks, explosions,... and zombie heads when they're decapitated.
 * reanim: Contains the characters' body parts, like plants, zombies, Crazy Dave, and more.
 * sound: Like what the name suggests, this folder contains various sounds of the game and could be modified like the images too. Most of them are in .ogg format, with the exception of 2 in .au format. The game's music is in here too, in .mo3 format.



Change venue
Go to images folder, find background1.jpg (Day), then copy the file to your folder and edit it with photo editor (Example: Adobe Photoshop). After editing, replace the original file in the images folder to the file you have created.

Change Almanac Entry
Go to properties folder, "open LawnStrings.txt". then find:

For example:

[PEASHOOTER_DESCRIPTION] Peashooters are your first line of defense. They shoot peas at attacking zombies. {SHORTLINE} {KEYWORD}Damage:{STAT} normal {SHORTLINE} {FLAVOR}How can a single plant

grow and shoot so many peas so quickly? Peashooter says, "Hard work, commitment, and a healthy, well-balanced breakfast of sunlight and high-fiber carbon dioxide make it all possible."

 Then change the text according to above. After that, save the text file.

Get Survival: Roof (Night)

 * 1) Go to Dr. Zomboss's Revenge, then quit after a while.
 * 2) Change the value to Whack a Zombie and kill every Zombie (including Zomboss) and collect sun.
 * 3) Then Change it to Survival: Roof or Survival: Roof (Hard).
 * 4) COMPLETE.

Cheats
Unlimited Sun
 * Type the number of sun you have in Hex Box.
 * Click "First Scan".
 * Then, go to Plants Vs Zombies, plant ONE PLANT on the lawn.
 * Go back to Cheat Engine, type the number of sun you have left in Hex Box.
 * Click "Next Scan"
 * Double-click at the address found at the left table.
 * Double-click at the number in the Value row in below table.
 * Type the number of sun you want.
 * Click at the box in Frozen or Active row.
 * COMPLETE.

Recharge Hack For Old PC Version

Requirement:

Steps: (COMPLETE. Special: This hack will stay even after closing the Cheat Engine. For Game of the Year Edition
 * Cheat Engine
 * Plants Vs Zombies
 * Click "Memory View".
 * Right-click at the address and choose "Go to Address".
 * Type "0048728C".
 * Double-click at the coloured text.
 * Change "01" to "200" behind the comma.
 * Click OK.

Requirement:

Steps: Another way (GOTY)
 * Cheat Engine
 * Plants Vs Zombies
 * Click "Memory View".
 * Right-click at the address and choose "Go to Address".
 * Type "00491E4C".
 * Double-click at the coloured text.
 * Change "24" to "48". (Or change inc to add, add comma and 200 at the end of the code also works.)
 * Click OK.
 * COMPLETE.
 * Click "Memory View".
 * Right click at the address and choose "Go to address".
 * Hack.png "00491E55".
 * Double click on the coloured text.
 * Change the address code to "nop". (Original text is "jle 00491E6B")
 * There is a message says the generated code is 1 byte long and the opcode is 2 bytes long, click yes to replace "00491E56" to "nop".
 * COMPLETE