Tuesday, February 28, 2012

Cheat for FieldRunners on any MAP or MODE

In this post, I'll show a way to hack the game FieldRunners to get as much money as you want.

This applies to all maps and all modes on Google Chrome browser (where the game was installed from the web store). Just repeat the procedure outline below everytime you want to hack-play.

WARNING: This is a little technical and you need to adhere to this guide for it to work the right way.

You have been warned ;)

Step1: Start the game normally till you come to choosing the map and mode.

Step2: Follow these instructions in the mentioned order

a) Open your console with the keystrokes (Ctrl + Shift + I on Windows/Linux Machines or Command + Shift + I on Mac machines). Then do as indicated in the figure order-wise and in the steps below

b) As indicated, first go to "SCRIPT" window.
c) Click the drop down circled "2".
d) Choose the file "FR.JS"
e) Click the curly braces as circled by "4".
f) Wait for the code to show up as in the figure.
g) Go to line 2385, (the line should say something like "this.mResources = 0 ...."
h) Where it is circled "5", click once to mark that line as "Breakpoint". It should show a blue color once this is done.
i) When all of this is done, choose your map and mode and click "START", all this while keeping this small window open.

Step3: When the game loads it will stop at this "SCRIPT" window and refer the below image for the next steps.

a) First click the button circled "1" or "F10" once.
b) Click on "CONSOLE" as circled "2".
c) Enter these lines of code, all at one go....

this.AddResources = function(a) {
                console.assert(a >= 0, "Subtracting a negative amount of resources is not allowed."), this.mResources += (a*5);
                var b = AchievementManager.GetSingleton();
                b.SetTotalAccumulatedWealth(b.GetTotalAccumulatedWealth() + (a*5))}

d) and press Enter. Voila you are done. (just one more step to finish these off)

Step4: First click the button circled "1" or "F8" once and then close this window with the circle marked "2".

It is done. Now for every kill you will get "5 TIMES THE NORMAL MONEY". 

This comes from the code you inserted. Notice the term "(a*5)" repeated twice in that code. You can change that to any value.

For eg., a*7 will mean you will get 7 TIMES THE NORMAL MONEY for every kill.

Very soon you will have loadza money and you can buy Mortars in 4-5 levels. :D

Have fun.

Below some images from some of my trials ....
Endless - Grasslands - Went on to 300 rounds with 20 lives, and then I got bored.

Classic - Grasslands - Just for fun, and this did finish a Perfect score.

Extended - Crossroads - Piece of cake :D

Just to prove the point that this works on any map and any mode...

Remember, each time you want this to happen, before STARTING/RESTARTING the game repeat all the steps one by one....

Friday, February 17, 2012

Fieldrunners Drylands Perfect Strategy

This guide is the cheapest way to get to perfect victory in Extended/Classic - Easy - Drylands map. No need for extra weapons and long paths... Only as much as needed.

To begin with, place 3 gatlings as shown
By round 3, place 2 more gatlings, top then bottom
By round 6, add 4 gatlings, 1 top, 2 center, another 1 top.
By round 10, fully upgrade the middle 2, top 2, then first bottom gatlings. Upgrade as soon as you get money.
As and when you get money, fully upgrade all the previous gatlings, and then, if possible, place the column of gatlings, top to down, all together (by pausing the game).

Now wait for 70$ and build a Tesla tower as shown in next picture.
Also, when available build a Goo tower, just above the Tesla.

Dont upgrade it yet.
By round 21, build another Tesla at the top.
By 23, build a Tesla at the bottom and a Goo next to it. Dont upgrade them yet.
By 26, build a Tesla and a Goo at the top. Dont upgrade them yet.
First build the Tesla, then as soon as you begin getting money, start adding gatlings in the centre from bottom up.
As soon as you get enough money, build the 2 Tesla's in the mentioned order.
Before putting the structures, UPGRADE ALL Goo's. As soon as you get money, build the Tesla's and the gatlings in the order mentioned.

Build as soon as you get. Pause if needed.
By round 47, you should have enough money to build the gatlings as shown.
Build the rest of the maze on the left part as shown. Build as and when you have money.

The idea is to increase the path.
Note that we do not have much damage in the long stretch of the path, its not needed.
Again by 52, you should have these structures in the order mentioned.

Get the Tesla and its goo together.
It is now that you begin upgrading the Tesla's.

Follow this order.
One level up for Top, then one level up for bottom,
This way upgrade the shown Tesla's to max, one by one.

Keep upgrading the rest, as and when you have money.
One level top, one level bottom. Till you have upgraded all Tesla's to max except the ones at the right half. They are just for safe, if some heli's might escape.

By round 82, all Tesla's should be at max, except right half ones.

Put Tesla's in the order mentioned and then upgrade them to max, in the same way as before.

One level for top, one level for bottom, as and when you have money.

This is almost enough, but still upgrade the right halves in the order mentioned. Upgrade the top one to max first.

After this nothing much to add, just sit back and enjoy ----

Javascript closure for callbacks

Closures are useful mostly when invoking callbacks.

Like in case of Youtube iframe API's, it expects a global function to be defined.


var yt_player = new YT.Player('elementId', {
                              width : Xpx,
                              height : Xpx,
                              events : {
                              'onReady' : onPlayerReady,
                              'onError' : onPlayerError

Where the documentation for the method can be found here.
The methods onPlayerReady, onPlayerError are expected to be in global scope.

But if you have Javascript based prototyping, i.e., Object-ness in your code and one of your objects needs to have a Youtube player as one of its properties, the code would become something like

MyObject.prototype.readyEvent = function(e) {
  this.yt_player = e.target

MyObject.prototype.loadPlayer = function() {
  var that = this;
  // that to make JS point to MyObject
  var yt_player = new YT.Player('elementId', {
                                width: ...,
                                height: ...,
                                events : {
                                'onReady' : that.readyEvent
While you would expect this to run, your instance of MyObject would not have yt_player anything.

The reason is the callback expects a global function, where this refers to DOMWindow object.

If you put a client side debugger through the browser in the readyEvent function, it will stop there, but if you do an inspection on this, it will say DOMWindow.

Javascript closure to the rescue. Your code would have to be like :

MyObject.prototype.loadPlayer = function() {
  var that = this;
  // that to make JS point to MyObject
  var yt_player = new YT.Player('elementId', {
                                width: ...,
                                height: ...,
                                events : {
                                'onReady' : (function(){
                                  var obj = that;
                                  return function(e) {

The return function inside the onReady event returns a function which when gets executed, makes a call to the desired function (readyEvent in this case) of the instance of MyObj (obj in this case).