Legend
This page and the pages linkied here contain the full list of important memory addresses that you will want to edit to modify the game.
For an instruction on how to use HxD, please visit this page.
1. All the hexadecimal values, shown on this page, will have prefix $ for clarity.
2. All the hexadecimal values, which are addresses in HxD, will have prefix @. To get an address in Cheat Engine, add $400000 to it.
3. Names of the registers, instructions and such will be written in ALL CAPS.
4. Since that OG Plants vs Zombies release is a 32-bit executable, the maximum capacity of the registers will be 32-bit.
5. The pages are divided into the following topics:
1. General
2. Seed packets
3. Levels
4. Plants
5. Zombies
To navigate trough the pages, refer to the color coding of each topic.
AND ALSO: BEFORE MAKING ANY CHANGES TO THE GAME, HIGHLY CONSIDER MAKING A BACKUP. EVEN BETTER, MAKE A BACKUP BEFORE EVERY CHANGE YOU MAKE.
List of Speed Packets
In the source code, as evidenced by decompilation, information about the plants' seed packets is stored in constant array of structures that includes the 50 plants that are unlocked in adventure mode and shop + unobainable plants.
This array is located at address @29F2B0 and each element of it takes $24 bytes, so for the ease of use, set HxD alignment to 36.
Day:
@29F2B0 - Peashooter
@29F2D4 - Sunflower
@29F2F8 - Cherry Bomb
@29F31C - Wall Nut
@29F340 - Potato Mine
@29F364 - Snow Pea
@29F388 - Chomper
@29F3AC - Repeater
Night:
@29F3D0 - Puff Shroom
@29F3F4 - Sun Shroom
@29F418 - Fume Shroom
@29F43C - Grave Buster
@29F460 - Hypno Shroom
@29F484 - Scaredy Shroom
@29F4A8 - Ice Shroom
@29F4CC - Doom Shroom
Pool:
@29F4F0 - Lily Pad
@29F514 - Squash
@29F538 - Threepeater
@29F55C - Tangle Kelp
@29F580 - Jalapenio
@29F5A4 - Spikeweed
@29F5C8 - Torchwood
@29F5EC - Tall Nut
Fog:
@29F610 - Sea Shroom
@29F634 - Plantern
@29F658 - Cactus
@29F67C - Blover
@29F6A0 - Split Pea
@29F6C4 - Starfruit
@29F6E8 - Pumpkin
@29F70C - Magnet Shroom
Roof:
@29F730 - Cabbage Pult
@29F754 - Flower Pot
@29F778 - Kernel Pult
@29F79C - Coffee Bean
@29F7C0 - Garlic
@29F7E4 - Umbrella Leaf
@29F808 - Marigold
@29F82C - Melon Pult
Upgrades:
@29F850 - Galting Pea
@29F874 - Twin Sunflower
@29F898 - Gloom Shroom
@29F8BC - Cattail
@29F8E0 - Winter Melon
@29F904 - Gold Magnet
@29F928 - Spikerock
@29F94C - Cob Cannon
@29F970 - Imitater
Unobtainable:
@29F994 - Explode O Nut
@29F9B8 - Ball Nut
@29F9DC - Sprout
@29FA00 - Reverse Repeater
Seed Packet Properties
Each element has the following 9 propeties (4 bytes each) (number is the offset from the entry address):
$00 - Seed ID
Defines what what seed packet spawns this plant, altough changing it doesn't affect much.
For more information on Seed IDs, look at the image below
$04 - Scrapped field, changing it doesn't affect anything
$08 - Reanim ID
Defines what type of animation this plant uses.
$0C - Unknown value
$10 - Sun cost
$14 - Recharge time (in 100th of a second)
$18 - Subclass
If anything other than zero, then plant is a shooter.
$1C - Action rate (in 100th of a second)
$20 - Unknown value