Sunday, March 11, 2012

Plants vs Zombies - How To Get Unlimited Sun (Or Any Amount You Want) with Cheat Engine - Tutorial (Video Removed, Steps Below)

Note: While the utility used herein and the steps below are still valid, for some reason, YouTube has decided to remove the video tutorial (2015-10), despite there still being similar videos still on YouTube.  
This is currently under investigation.


Who doesn't love Plants vs Zombies? The simple and easy to learn gameplay, the catchy full-of-character music, the simple yet pleasing graphics. With fun levels and achievements and mini-games to boot, it was destined to be a classic.

Screenshot of the game, showing the variety of units and usage of the Unlimited Sun cheat, described herein.
Click to see Full Size

This past Christmas, Santa saw fit to put PvZ in my stocking and after completing the adventure levels and mini-games I wanted more. I wanted the feeling of wind rushing through my hair and hot sand under my feet while I sipped a drink out of a coconut. That's what you get when you use Cheat Engine: 'Anything You Want' (in a game)...



The Cheat Engine (by Dark Byte and many other contributors) and similar utilities have been around for a while and if you play games and program you probably tried one in the past. The basic way a utility like this works is:
  • Tell the program to look for a value in the game, let's say 25 Gold as an example.
  • Buy something and now let's say you have 23 Gold. 
  • Tell the program to now look for all those 25's that have turned to 23 and it will find one or more "23"s.
  • Tell the program to change that 'new' 23 to 2500. 
  • In the game, you now have 2500 Gold. 
  • Sip coconut drink.

Programs like this are great because it's not limited to just 'gold'. It can work for almost any value in a game, such as ammunition for your gun, health, minerals, food, anything. It works on most games, even ones that don't have built-in cheats or have limitations like achievement-disabling (such as Starcraft2). It will work on these games and allow you to pretend to be an "Elite Haxor", Kobayashi Maru-ing your way through games [yes I use that as a verb] and getting achievements in games that wouldn't normally allow them after using cheat codes (such as Starcraft2 and others).




There are really only two things that would get in your way once you know how to do it. One is, some games have not just one 'spot' that has an amount you want to change, like Gold in our example, they will have multiple 'spots' that will hold the value you want to change. Usually you can just change all 6 or however many come up, but sometimes a game developer is 'tricky' and will use an algorithm instead - some formula that the game goes through to calculate how much you 'have' of something. When this happens, you will not find any results when looking for, in our example, "25" Gold. The other thing that can happen is that the values are not 'kept' on your system, but are only on the server that you are playing on ("Server Side"). This happens with most Massively Multiplayer Online Games (MMOs). In this case, you may not be able to 'inject' the value that you want for something (like Gold).


Note: In most Online games, especially MMOs where you play with/against other people, I do not suggest utilizing the "cheat utility" described in this article, as may present an unfair situation to others. I do not condone nor support "cheating" when the game is not a Single Player game (where it is done 'just for fun' and not affecting anyone else).




In Plants vs. Zombies however, it works great, and after 'finishing' the game, I used it to give myself the freedom of Unlimited Sun and a bunch of Money, so that I could buy more plants and grow The Tree Of Wisdom and finish up some Achievements I had missed as well. The Unlimited Sun was a lot of fun, cleaning up harder levels and it allowed me to try new setups and tactics.

And so, [although it would have probably been more helpful a few years ago lol] here is our Tutorial video on How To Get Unlimited Sun (Or Any Amount You Want) with Cheat Engine:

*** VIDEO REMOVED BY YOUTUBE FOR UNKNOWN REASONS OCT.2015
CURRENTLY UNDER INVESTIGATION
(Update just below)

*** VIDEO REMOVED BY YOUTUBE FOR UNKNOWN REASONS OCT.2015
CURRENTLY UNDER INVESTIGATION

(Update 2015-12:  It appears that YouTube is taking movements towards "possibly deceptive" or "harmful"-type Videos and Information. It was suggested that the use of Tags such as 'Hack' or even 'Cheat' and similar terms, was the trigger for this removal. 
I will follow this up further and see if this is fully the case. I do not want to post something that YouTube finds Questionable, but I also wish to help gamers enjoy 'Cheats' or other additions to games, to their fullest extent ('doing whatever you want' in a video entertainment vein). Once I find a compromise between these two goals, I may update this video above. Until then, please use the Steps below to carry out this 'Cheat', if you desire.)



Here's a breakdown of the steps shown in the video:
  • Start a level in the game
  • Start Cheat Engine
  • After the level begins, pause the game and open the PlantsVsZombies process (.exe) in Cheat Engine by clicking the first button and choosing "popcapgame1.exe" and click Open
  • Enter the amount of Sun to look for (present value, 50)
  • (Optional, may need to be different for different games - set the Scan Type for "Exact Value" and set the Value Type for "4 Bytes")
  • Hit the First Scan button to begin scanning the game in memory for the value (50), multiple results are shown
  • Go back to the game and change the amount of sun (shown in the video as clicking on a dropping sun for +25 additional sun, making the sun amount now 75)
  • Pause the game and go back to Cheat Engine and change the Value from 50 (what it was) to 75 (what it is now) and hit the Next Scan button
  • One value results, which was the only thing to change from the old value (50) to the new value (75)
  • Click on the one result (75) anywhere on the line of the result and click the Red Arrow button to move it to the bottom area where we can work with it
  • Right-click the Value (75) and in the submenu select "Change Record" and click "Value"
  • Enter a new value (750 in the video)
  • (Optional, put a checkmark in the "Frozen" box, if you want the value to be 'locked' and never change (if possible))
  • Go back to the game and plant and use sun, it should stay 'locked' at 750 (if using the amount shown in the video)

If it isn't working for you, let us know and we'll help you out!

Note that in the video, we showed how to do everything side-by-side (so you could see what was happening and how to do it easily). It does not have to be set up in this way in order to use Cheat Engine, you can ALT+TAB out of a game and still do this with some value you want to set/lock in a game running in the background.

Have fun and see you in there!


[Personal Story: I remember playing a game quite a number of years ago that had the same concept as PvsZ. You were to 'defend a gate' by placing little turrets that shot dots at invading triangles and squares and depending on the placement of the turrets you chose (some shot missiles that did area-of-effect damage, etc) if too many invaders got by, you lost. I'm not saying that PvsZ ripped that game off (there were a lot of that type of game and since then) who knows, maybe the developers are the same ones that made that game that I enjoyed so many years ago...] 



Plants vs Zombies game material is Copyright PopCap Games, All Rights Reserved. 
This "How To" video is for educational purposes only and is covered by Fair Use. No infringement on the Plants vs Zombies Trademark is implied or intended and cannot be inferred.
The author of this article and this blog and any affiliates, throughout all chains of degrees, do not condone nor endorse "cheating" in any games that are not Single Player games. "'Cheating' should only be done in Single Player games, where it cannot possibly present an unfair situation or negatively affect others in any way" - that is the Official View of this blog, in perpetuity.
The video above and the steps described herein are not to be taken as a substitute for medical attention.