Mr.Mine – How to Fix Broken Achievements and Edit Save File

A guide on how to fix broken achievements and edit save file in Mr.Mine.

How to Fix Broken Achievements and Edit Save File


I am not going to tell you how to play your game, if you want to play it the “right” way and grind through level-by-level then you do you

This guide is for those who want to fast-forward their game progress or simply explore what the game has to offer before committing countless hours to the grind. Also, there may be some small spoilers here and there – but majority of the editing takes place at the start of the game

I personally would recommend avoiding the modifications in this guide if you wish to experience the gameplay as the developers intended.

Please ensure you back up your game save code before attempting anything in this guide, as some changes may have irreversible effects.

Save Editing

How are Saves Stored

Your saves are stored in a base64 format, a typical save code looks like the following:


We can ignore the name part (Guide), as we only need the right section of the code for our purpose. This code obviously not legible, so for our sake we can decode it by using an online decoder or any method which can decode from base64 -> utf-8, I personally use Python’s base64 library.

After decoding the save code once we get the following result:


Okay, this is still illegible. If we look at the source code of the game we figure out why:

  • saves[i] b64 to utf8(b64 to utf8(localstorage[sids[i]])).split(” “);

The save code is actually encoded twice, so in theory, if we run our previous result through the decoder again we should get our decoded save:


Great, now we have numbers, but what do they mean Mason. If we look at the source code we get our answers:

money = Math.floor(saves[chosen][0]);
depth = parseInt(saves[chosen][1]);
dexp = parseInt(saves[chosen][2]);
UID = saves[chosen][3];
drill[0] = parseInt(saves[chosen][4]);
drill[1] = parseInt(saves[chosen][5]);
drill[2] = parseInt(saves[chosen][6]);
drill[3] = parseInt(saves[chosen][7]);
hireamt = parseInt(saves[chosen][8]);
if(hireamt > 10){hireamt = 10;}
oldversion = saves[chosen][9];

Let’s break this down:

  • Money is the first element in our save code, if we refer to the code we can deduct that our money is at $363331718
  • Depth is the second element, and just like money, our depth can be seen as 30
  • dexp is our experience
  • UID is the steamID64 of the account which created the save, if you’re curious you can use SteamID I/O to find out the steam account of the creator

If we look in game, we can confirm this at the title screen:

Extra Information

The order of the materials in the save file is as follows:

  1. Money
  2. Depth
  3. Exp
  4. UID
  5. Drill 1
  6. Drill 2
  7. Drill 3
  8. Drill 4
  9. Hireamt
  10. Old Version
  11. Coal
  12. Copper
  13. Silver
  14. Gold
  15. Platinum
  16. Diamond
  17. Coltan
  18. Painite
  19. Black Opal
  20. Red Diamond
  21. Blue Obsidian
  22. Californium

The first material begins at separation ( | ) #10 (money starting at 0). If you’re interested in the full list of the save code here you go.

How to Edit Saves

To edit the save, you can simply modify these values. Say for example we want our dollars to be at $700,000, we refer back to our save code and simply replace the first value with our desired one. Same applies for the depth, for our instance we’ll change it to 5


Once we are done editing our file, we have to convert it back by encoding it twice using base64 encryption. We can use the same website we used to decode, to encode our new modified save.

The first pass gives us the first encoded result, we have to repeat the process to encode this result further:


The second pass gives us our desired result:


Now all we have to do is add a name to the start of our code, and import it into the game. The final code would look like the following:


How to Load Saves

To load a save simply navigate to the load button in the main menu, and paste your new code into the field provided. Then press “Import Game And Close”

If everything worked successfully, we should see our desired result as save file with $700,000 and a depth of 5:

Sell/Buy Prices

How to modify sell prices of minerals

If you’re looking to sell coal for $10,000 a piece then this is the place for you.


Start by navigating to the following file, which is located in the root directory of the game. This can be opened by: Right Clicking the game in your library ➡ Properties ➡ Browse Local Files ➡ win-unpacked

  • \MrMine\win-unpacked\resources\app\index.html

This is essentially the source code for the game, I recommend opening this with notepad++ or an equivalent application to easily navigate it.


Your sell prices are stored in an array called minerals[] which can be found on by searching var minerals =

In this area you can alter the sell price of any of the minerals, for our example we will modify the coal sell price to $10,000

var minerals = [
[_("Black Opal"),2000,0],
[_("Red Diamond"),10000,0],
[_("Blue Obsidian"),20000,0],

Once you’ve modified the code, simply save and reload your game – your changes should be visible right away! Note, that you can always go back and reverse this change once you’re happy with your amount of dollars.

How to Modify Buy Prices and Resource Costs

Worker Hire Costs

Base Costs

The array titled dlvlcost holds the costs of hire, simply by changing it to 0’s you obtain free hire costs.

  •  var dlvlcost = [0,1,1,1,1,1,1,1,1,1,1];

Hire Function

If for some reason you don’t want to alter hire costs, you can change the function titled upgradehire(x) to the following:

  • function upgradehire(x){dlvl++;}

Equipment Upgrade Costs

The array titled upgradeEquipCosts holds the oil/money/time costs of upgrades and can be modified by simply changing the desired values and reloading the game.

Oil Rig Upgrade Costs

The array titled oilRigUpgradeCosts holds, you guessed it, oil rig upgrade costs. Change this to 0’s if you wish to have free upgrade costs:

var oilRigUpgradeCosts = [0,0,0, 0, 0,0, 0,0,0];

UI Editing

How to Change the UI Images

Before we continue I want to stress the fact that all images are legal property of; all rights reserved.


All images are stored in the following location, and most are in the .PNG format.

  • \MrMine\win-unpacked\resources\app

Do edit these, simply open them with any image editing software such as Paint or Photoshop.

Once you made your edits simply save and replace the original image.

After restarting the game, you will see your changes applied 🙂

How to Change UI Extras (Fonts)

To change the majority of the UI fonts you can navigate to the index.html file located in:

  • \win-unpacked\resources\app

For the next step I recommend using a text editor with find & replace functionality. In notepad++ press CTRL+H to open the replace dialogue:

Next, simply replace the default Verdana font with any font of your liking. For my example I chose Lilita One.

There should be ~89 occurrences replaced. Afterwards simply save the file and reload the game

Fixing Achievements/Corrupted Saves

Broken Achievements

Timed Achievements

This game has two two timed achievements

Play for 2hrs

Play for 24hrs

These achievements work by checking the playtime variable of the user’s save at two different times: 7200 and 86400 which is hours converted to minutes; 2hrs & 24hrs respectively.

This code works fine, however, the issue lies in how time is added to the playtime variable:

  • setInterval(function(){if(chosen > -1){playtime+=30;savegame();afk–;if(focus){checkQuests();}}},30000);

Every 30 seconds, the game checks if the user has completed any quests. The issue here is the following line of code: playtime+=30

Every 30 seconds, the game adds 30 minutes to the playtime, which as a result causes all players to earn the timed rewards far ahead of schedule.

A simple solution is to change the function to grand playtime += 0.3 which grants 30 seconds as opposed to 30 minutes – which I assume is the intended functionality 🙂

Infinity Money

This error is supposedly fixed but may occur in older versions of the game, it happens due to the

getRelicMultiplier() function in how your reward is calculated.

Your best option for this is to contact the developers on the official discord. If you remember how much money you had before this occurred then you’re able to modify your amount by setting the value of the money variable.

Custom Functions

What are custom functions

Custom functions allow you to call any in-game function by using keyboard shortcuts, an existing example is the CTRL+S bind, which saves the game. This bind calls the savegame() function which looks like the following:

shortcut.add("ctrl+s",function() {
                console.log("Saved Game");

We can extend this behaviour in index.html to add our own custom functionality!

Sell Everything with 1 Keypress

Let’s create a simple bind to sell all of our resources by simply pressing F1, we can add the following code alongside the other shortcuts 🙂

shortcut.add("f1",function() {
                console.log("Sold Everything!");
                newNews("Sold Everything!");
                for(var x=1; x<13; x++){

First, we assign the key we wish to use: F1

Then we use these functions to log to console and to display a small message that we sold everything:

  • console.log(“Sold Everything!”);
  • newNews(“Sold Everything!”);

Afterwards we open the Sell Center UI by calling sellui(1), without this the code will not work!

And finally, we iterate over all of our resources and sell them, then we close the ui!

Auto-sell at Full Capacity

In this example we’re going to make use of the sell all function above, and extend it further to call it automatically when our capacity is full!

Checking Capacity

First, we need to check if our capacity is full – for that we’re going to create a custom function:

  • function isCapacityFull(){return capacity >= maxcapacity[drill[3]]}

The capacity variable stores our current capacity, maxcapacity[drill[3]] stores the max amount we can hold in our current drill.

We simply do a check to see if our current capacity is equal to or exceeds our max capacity; in some instances it goes over the max.

This function returns a boolean value of either true, or false.

Auto-Sell Function

Although the sellall() function exists, it does not work without a certain “attribute”, so we’ll create our own which also manages the UI interaction.

function sellEverything(){
    for(var x=1; x<13; x++){
Sell at max
Finally, we create our last function, which combines the two.
function sellAtMaxCap(){

We simply check if our capacity is full, if it is, then sell everything! Simple as that!


The last step involves putting the function on a timer, for that we use setInterval(function, milliseconds).

  • setInterval(sellAtMaxCap, 60000);

This code will be called every minute (60000ms), and will check if our capacity is full, if it is, then sell everything 😄!

Sell ‘x’ amount

A user on the discord channel has requested functionality to sell ‘x’ amount of ore instead of instantly selling everything, so here you go!

function sellQuantity(ore, amount){
    if (amount > minerals[ore][2]){
                                console.log("You're trying to sell more than you have!");
                                newNews("You're trying to sell more than you have!");
                                money += (Math.abs(minerals[ore][1] * amount));
                                capacity -= amount;
                                minerals[ore][2] -= amount;
                                console.log("You just sold " + amount + " " + minerals[ore][0] + " for: $" + Math.abs(minerals[ore][1] * amount));

As an example, if we want to sell 1000 gold ore we can call:

  • sellQuantity(4, 1000);

Which returns “You just sold 1000 Gold for: $16000”

Grant / Revoke Achievements

Grant Achievements [STEAM ONLY]

This game has some buggy achievements, to grant yourself an achievement on steam you can use the following command:

  • grantAchievement(“QUEST_0”);

Replace 0 in QUEST_ with your desired quest, note that this will NOT provide you with the in-game rewards for the achievement, it will simply unlock it on steam!

Revoke Achievements [STEAM ONLY]

To revoke an achievement you didn’t want to acquire you can use the following code:

 greenworks.clearAchievement(“QUEST_0”, getApiSuccessLogger(“Achievement Revoked!”, getApiFailLogger(“Achievement Revoked!”)));

If the change is not visible right away, save your game and reload it 🙂

by Twi

Similar Posts:

    None Found

Share your love


  1. This is interesting, but what’s the location for isotopes? tickets? scientists? relics? etc? When editing the save.

    • Hi Vincent
      The below should help. I have added the word HERE in the middle of the number 10000 (for 10,000 tickets) Finding this spot in your string should be the ticket part. Hope it helps.


  2. Really nice and well explained, fun to tinker around with that stuff.But doesn’ twork for web version.There the export contains name|gibberish|reallylonggibberish.
    So two pipes. If i take part two and put it through base64 > utf8 i get a nice series ov numbers seperated by , .If I try the same for the third part of the string it’s utter nonsence.Illegible whichever way I try to convert it.
    part 1 + 2 don’t work either (seems locical because if I look at the convertor used on the site | is not in the char ist, so it has to be a separator no?

      • Wel..ofc
        but it’s gamename|base64version of dirty var in the code| dirtified base64 string

        function dirtify(b64){
        for(d=0;d b64.length){
        d = dirty.length;
        else {
        b64 = b64.substring(0, dirty[d]) + rc() + b64.substring(dirty[d], b64.length);
        return b64;

Leave a Reply

Your email address will not be published. Required fields are marked *