My FarmVille Helper App: Crops Automation
When designing My FarmVille Helper App, I want to make it as generic as possible, where the user can customize every aspect of how the automation should be executed. The easier way to do is to allow user to enter the pattern of how the mouse movement should be, depending on how the farm is laid out. So this blog entry with explain on how this pattern system works.
When working on the blocks of land in FarmVille, the direction of how to traverse the mouse always either to the right or to the left. To traverse to left, use the command l, and to traverse to the right, use the command r. And to apply the action to the block, use the command x.
Let’s take above for example. Here, we are traversing to the right, and there are 4 blocks of land. The command for this will be
rxxxx
Please note that the direction command only needs to be called once. The application will remember the last direction that we set.
In the above example, we are traversing to left, and there are 4 blocks of land. The command for this will be
lxxxx
We can also traversing vertically, either upwards (use the command u) or down (use the command d). The vertical commands only will be executed once, and the application won’t remember like what we have for r and l earlier. Confused? Let’s see an example.
Let say I want to traverse my lands like below.
If I give a command of rxxxxdxxxx, what this will do is the mouse will traverse 4 blocks to the right (i.e. rxxxx) then go down by 1 block (i.e. d). What about the last xxxx? Like I said earlier, d and u commands are executed only once, so xxxx after d will not traverse 4 blocks down, but instead it will still traverse 4 blocks to the right. Remember, the application will remember your last used horizontal command (i.e. r or l). So, the correct commands for the above is
rxxxxd
lxxxx
The next thing that I want to explain is how to handle gaps between block on My FarmVille Helper App. But before that, let see how gaps look like in FarmVille.
The smallest gap that you can make between 2 blocks of land is 1/4 of the size of 1 land block. Meaning, for 1 block of land, there will be 4 gaps in between. Gaps can be entered by specifying the direction of the gap that you want to have (i.e. r, l, u or d) followed by the denominator of how many gaps you want. l1 mean 1 gap to the left, r3 means 3 gaps to the right, d5 mean 5 gaps to the bottom etc. Let’s look at an example.
The command for the above traversal will be
rxxr1xxd
lxxl1xx
Pay a close attention to the command that I underline below for the 1 gap to the right at first row, and 1 gap to the left at the second row.
What about vertical gap? Let’s look at the following example.
The command for the above traversal is
rxxxxd1
lxxxx
Pay a close attention to the command that I underline below that denotes having gap of 1 downwards.
Let’s look at another example. The second block of the second row is not really a land block, but it’s a decoration. So, there will be gap of 1 land block here. As stated previously, 4 gaps will be equal to 1 land block.
So the command for the above traversal is
rxr5x
Why r5? There’s another gap after the monster decoration, thus making total number of gaps is 5.
Let’s look at more complex example. Can you work out how the commands for this will look like? Try first, then check with my answer below just to make sure that you get the concept of this π
The command for the above traversal will be
rxxxxr1xd1
lxl5xxxd
rxxxxr1xd
lxl1xl8xd
rxr8xr1x
Easy stuffs huh!
When you enter those command in the application, you will see the mouse movement, and it does nothing. This is good when setting up for the first time so that you can make sure that the mouse pointers are traversing correctly through all of your land blocks. And, when you are ready for some action, you can specify what you want to do. Below are the available commands that you can use
move (default)
plow
seed
harvest
Usually, when you are doing these actions manually for real, there’s a delay between your mouse clicks. So can also specify how long that the program have to wait (in milliseconds) between mouse clicks. The command to use is
p200
which denotes that you want to pause for 200 milliseconds between mouse clicks. p200 is usually enough, but if you have a lot of things on your farm, or computer is slow, you might need to try and error the value that works best with you. You will understand this better towards the end of this blog entry.
Now for the ultimate test. Below is how my farm looks like at the moment (hehe) and I have already put an arrow on how the traversal should be done (click on the image to see bigger version). Try to work out on how the commands will look like, and compare the one that you work out with my answer below.
The command for the above traversal will be
p200
seed
rxxxxr1xxxxr1xxxxr1xxd
lxxl1xxxxl1xxxxl1xxxxd
rxxxxr1xxxxr1xxxxr1xxd
lxxl1xxxxl1xxxxl1xxxxd1
rxxxxr1xxxr5xxxxr1xxd
lxxl1xxxxl1xxxxl1xxxxd
rxxxxr1xr8xr1xxxxr1xxd
lxxl1xxxxl1xl8xl1xxxxd1
ll18
rxr1xxxxr1xxxxr1xxxxr1xxxxr1xxxxd
lxxxxl1xxxxl1xxxxl1xxxxl1xxxxl1xd
rxr1xxxxr1xxxxr1xxxxr1xxxxr1xxxxd
lxxxxl1xxxxl1xxxxl1xxxxl1xxxxl1xd1
rxr1xxxxr1xxxxr1xxxxr1xxxxr1xxxxd
lxxxxl1xxxxl1xxxxl1xxxxl1xxxxl1xd
rxr1xxxxr1xxxxr1xxxxr1xxxxr1xxxxd
lxxxxl1xxxxl1xxxxl1xxxxl1xxxxl1xd1
rxr1xxxxr1xxxxr1xxxxr1xxxxr1xxxxd
lxxxxl1xxxxl1xxxxl1xxxxl1xxxxl1x
Finally, let’s see this in action. Click the play button below to play the movie. The loading speed can be slow at times. If it slow, just pause the video after you click the play button, and let it download the rest of the movie first before continue playing it again.
So, when the software will be available to public? To be honest, I don’t know. There are still a few more tweaks that I’d like to do. It will be priced at USD99.99 per download. Just kidding. It will be free. So stay tuned π
awesome – let me know when you need someone to test (oh I'm a really good tester – screwed up many betas already…)
Very promising…
Hi Joe. Thanks for offering to be a tester π Just keep watching this space. Will be placing the app here in 2 weeks time I hope.