Thursday, January 23, 2014

Python Script to Remove Unbreakable Blocks in Robominer


Robominer is an Android game where you use a robot to drill around searching for a diamond. There are blocks that can't be drilled, so you have to either go around them or use dynamite to blow them up. After a while, I got really annoyed dealing with these blocks. So I poked around and found a way to replace them with other blocks.

Basically, when you save a game, it saves the entire map too. This includes the types and locations of all of the blocks. The save file can be modified to remove the unbreakable blocks.

I have SL4A and Python installed on my Android device, so I wrote a Python script I can run on my device to make the changes for me. If needed, you can also copy the file to a PC, run the script, and then copy it back. Note, however, that the script has to be run on every new level. Being able to run the script on the device is a lot more convenient.

Here is the script. It assumes your saved game file is on the SD card. I don't think you can modify the save file in the "Phone" slot unless your device is rooted.



#!/usr/bin/python
# Replace gray blocks with regular blocks on Android app Robominer
#
# 01-15-2013: Created by BitJunkie
# 01-16-2013: For gray blocks, generate random mineral type
# 01-22-2013: Block info starts 3 bytes before 0x3f80, adjust file pointer info
import random 

count=0
random.seed()
# Open the file in binary mode for reading and writing
fh=open("/sdcard/Android/data/com.rnet.robominer/files/last_1.sav","rb+")

# Go to the beginning of the block info +3 bytes, from the beginning of the file
fh.seek(0x30, 0)
header = fh.read(2)

while header == b"\x3f\x80": 
  fh.seek(-4,1)  # Move file pointer to start of block info
  blk = fh.read(1)
  if blk == b"\x01": # if block is gray
    fh.seek(-1,1)
    fh.write(b"\x02")  # Make it regular 
    r = random.sample(["\x01","\x02","\x03","\x04","\x05","\x06","\x07","\x08","\x09","\x0a","\x0b","\x0c","\x0d","\x0e","\x0f","\x10","\x11","\x12"],1)
    fh.write(r[0])  # Add random mineral/element
    fh.seek(13,1)  # Go to next block
    count+=1  # Count how many blocks are changed
  else:
  # Go to next block header
    fh.seek(14,1)
  header = fh.read(2)

print "Blocks changed: %d" % count

I have only used this for games on the "Easy" level. I'm sure the script would have to be modified for the higher difficulties.

Have fun!

Thursday, January 9, 2014

Gift Codes for Despicable Me: Minion Rush

Updated 5/14/2015. See below.
Updated 3/28/2015. See below.
Updated 2/11/2015. See below.
Updated 12/10/2014. See below.
Etc., etc.

NOTE: Comments are moderated, so it might take a while for posted comments to show up.

Despicable Me: Minion Rush is a running game for Android (maybe other OSes too). If you select Options from the main screen and press the gift icon, you can enter codes here to get some goodies. Here are the codes I've found so far.

Use the up and down arrows to select different minion types. The different types are: classic, baby, maid, golfer, dancer, firefighter, and dad.

classic, firefighter, baby: Unlock Baby minion
baby, dancer, golfer: Unlock x5 score perks
baby, firefighter, maid: Unlock x5 banana points
maid, classic, golfer: Unlock loser taunt
dancer, firefighter, dad: Unlock x3 minion launcher
----------------------------------------------------------------------------
May 14, 2015 Update: Version 2.8.0k; Content Version 421 (also Version 2.8.1d) 
Looks like gift codes have been removed in this update.
----------------------------------------------------------------------------
March 28, 2015 Update: Version 2.7.1c; Content Version 412
This update adds an April Fools Day special mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
February 11, 2015 Update: Version 2.6.2c; Content Version 398
This update adds a Valentine's Day special mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
December 10, 2014 Update: Version 2.5.0p; Content Version 383
This update adds special missions, in particular the Arctic Base mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
November 10, 2014 Update: Version 2.3.1a; Content Version 370
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
November 8, 2014 Update: Version 2.3.0f; Content Version 370
No surprise, I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
October 21, 2014 Update: Version 2.2.1f; Content Version 367
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
September 18, 2014 Update: Version 2.1.0m; Content Version 343
I didn't find any new codes in this update. I'm starting to think this feature isn't used anymore. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
August 20, 2014 Update: Version 2.0.3b; Content Version 326
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
July 30, 2014 Update: Version 2.0.2e; Content Version 325
Big update. The game mechanics have changed, but gameplay is about the same. But I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
May 26, 2014 Update: Version 1.8.1g; Content Version 294
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
May 14, 2014 Update: Version 1.8.0u; Content Version 289
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
March 22, 2014 Update: Version 1.7.2; Content Version 227
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
February 10, 2014 Update: Version 1.6.1b; Content Version 202
I didn't find any new codes in this update. :( If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
January 2014 Update: Version 1.6.0u; Content Version 200
Golfer, golfer, baby: x3 Score Perks

Golfer, dancer, dad: 20 Tokens

Dancer, maid, baby: x3 Banana Perks

Dad, baby, dancer: 1500 Bananas


Enjoy!