Cookie Clicker

Cookie Clicker

Not enough ratings
[Mod] Quick Refresh w/o Saving (w/ Instructions)
By LupinSamurai
This guide will walkthrough how to install a mod that will quickly reload the game to the last save, a feature that is missing from the Browser versions Ctrl+R and/or F5.
2
   
Award
Favorite
Favorited
Unfavorite
Intro and Explanation
In the original browser version of Cookie Clicker, you can quickly refresh the page using F5 or Ctrl+R to reload the page without saving. There are many reasons that refreshing/reloading can be useful in Cookie Clicker, including, but not limited to:
  • Restoring cookies spent on upgrades/buildings, or restoring buildings if sold accidentally
  • Avoiding the negative outcomes of Wrath Cookies or Backfired Grimoire Spells
  • Rerolling random drops when popping Wrinklers or harvesting crops
  • Allows you to pick a mature (but not ripe) sugar lump and refresh if you botch the harvest
  • Allows you to maximize sugar lump gains from unusual sugar lumps
However, in the current Steam version of Cookie Clicker, there is no way to refresh the game without exiting. The only built-in ways of reloading (Changing languages and enabling/disabling mods) save before doing so. As such, I created a mod that will restore a method to refresh anytime using the keybind Ctrl+R. I believe this should be a built-in feature of the game, but until then, this mod will have to do.

This guide will quickly explain how to install the mod for yourself and activate it, install the mod from a premade ZIP folder, or (easiest) subscribe to the Steam Workshop mod.
Method 1: Manual Installation
Below is a step-by-step guide to install the mod manually. If you are at least a little computer savvy, this should be simple. You get the added benefit of getting some understanding how mods work in Cookie Clicker. However, if you get stuck at a step (or would like to quickly install it), Method 2 can be used instead.
  1. Open your Cookie Clicker Mod Folder. This can be done 2 ways:
    • Opening via the in-game Mod Menu at the bottom of the Options Menu, then navigating to "Open /mods folder" and into the "workshop" folder.
    • In Windows, the default location for the "workshop" folder can be found below.
      C:\Program Files (x86)\Steam\steamapps\common\Cookie Clicker\resources\app\mods\workshop
  2. In the "workshop" folder, create a new folder by right clicking--->New--->Folder and name it "QuickRefresh" (without the quotation marks).
    Navigate into that folder and create two files by right clicking--->New--->Text Document and name them exactly "info.txt" and "main.js" (without the quotations marks).
    It should look like this when you are done:

    NOTE: File extensions need to be enabled to properly complete the above step. If you have already completed the above step, you can skip to the next sections.
    File extensions are the tags you see at the end of files such as .txt, .docx, or .exe. Naming the files above with the proper extensions is important, namely the main.js as .js represents a JavaScript file.
    If we name the files above without extensions enabled, the files will internally be "info.txt.txt" and "main.js.txt", which is no good.
    To enable file extensions:
    • Open your search bar on your taskbar and type "File Explorer Options" (Windows 10). Alternatively, navigate to Control Panel--->Appearance and Personalization--->File Explorer Options.
    • Click "View" and uncheck "Hide extensions for known file types."
    • Click Apply and OK.

  3. Open info.txt and paste the following info:
    { "Name": "Quick Refresh", "ID": "refresh", "Author": "LupinSamurai", "Description": "Mod which refreshes the page when Ctrl+R is pressed without saving.", "ModVersion": 2.042, "GameVersion": 2.042, "Date": "09/09/2021", "Dependencies": [], "Disabled": 1, "AllowSteamAchievs": 1 }
    "Disabled": 1 means that the mod will be disabled until enabled in the mod menu; you can change 1 to 0, but it is unnecessary as once it is enabled, it will remain enabled until disabled from the mod menu.
    "AllowSteamAchievs": 1 means that Steam Achievements are Enabled. Mods that give the player an unfair advantage or otherwise break the game can set this to 0, which disables achievements, but as this doesn't give an unbalanced advantage, this can (and should) remain 1.
  4. Right click "main.js" and select Edit. If prompted, select Notepad (or a preferred code editor) to open .js files. In "main.js", paste the following code:
    Game.registerMod("refresh",{ init:function(){ Game.Notify(`Quick Refresh loaded!`,'',[16,5]); addEventListener("keydown", function(event) { if (event.keyCode == 82 && event.ctrlKey) location.reload(); }); }, save:function(){ }, load:function(str){ }, });
    The code works by adding an Event Listener that looks for the combination of the control key pressed (event.ctrlKey) and R pressed (event.keyCode = 82) (82 is the ASCII value for 'R'). If both are true i.e. both are pressed, location.reload() is executed which in JavaScript refreshes the page, or in this case, reloads the game to the last save.
  5. If Cookie Clicker is running, restart the game or refresh it by using the built-in methods discussed above (changing languages or enabling/disabling other mods). Otherwise, run Cookie Clicker.
  6. You should now see "Quick Refresh" in the mod menu. Select it and choose enable. Then, press "Restart with new changes" You don't need to change the priority.
  7. After the game reloads, you should see this in-game popup appear.
    If you see that, try using Ctrl+R to reload. From here on out, as long as the mod remains enabled, you can use Ctrl+R to reload to your heart's content! The mod will remain enabled until you choose to disable it or it is deleted.
Method 2: Automatic Installation & Steam Workshop
Below is a quick and easy way to activate the Quick Refresh mod.
  1. First, download the .zip file from Google Drive here. Quick Refresh[drive.google.com]
  2. Unzip the file by right clicking--->Extract All, and confirm by selecting "Extract".
  3. Navigate into the unzipped folder. Copy the folder named "Quick Refresh". You need to make sure that the folder selected is the one in the unzipped folder i.e. the folder you are copying contains exactly info.txt and main.js, not another folder named "Quick Refresh".
  4. Next, navigate to the "workshop" folder as seen in Step 1 of the Manual Installation method. Paste the copied folder in "workshop".
  5. Then, follow Steps 5-7 of the Manual Installation method to enable the mod and test it out!

    NEW! Quick Refresh is now on the Steam Workshop! You can subscribe there and it will be available in the modding menu after subscribing! Here is the link: https://steamcommunity.com/sharedfiles/filedetails/?id=2686648239
Conclusion
If everything went well, the mod should have been successfully installed (and maybe you did it yourself too!). I hope Orteil choose to officially add a quick refresh/reload back into the game, but until then, I hope you get a lot out of this mod!
If you have any questions, please feel free to post them in the comments below. The instructions focused on Windows OS, but the method should be similar I think for other OS's.
Thank you for checking out this guide, and if it helped you out, feel free to give it a thumbs-up!
9 Comments
Mr_BlueAxolotl Sep 23, 2023 @ 1:00pm 
When I open cookie clicker, I have the "Quick Refresh loaded!" message, but when I try to do ctrl + r, nothing happens. Is it possible that a newer version of cookie clicker has broken the mod?
LupinSamurai  [author] Dec 18, 2021 @ 7:43pm 
Qweba Dec 18, 2021 @ 9:43am 
you should add this to the workshop
Deliard Sep 17, 2021 @ 8:03am 
You cannot avoid them but you can use "random spell one" that can be positive or most time it will hit something like wrinkler pop that is not an issue. And then next spell will basically have new "seed" as you called that will possibly override backfire.
Lord Yeet. Sep 17, 2021 @ 3:15am 
can you actually even avoid backfired grimoire spells? aren't they seeded so regardless if you refresh it'll still be a backfire next time you click. just tried with the FTHOF and it stays as a backfire. I've got Fortune Cookie on and the forecast remains the same. Thanks for the mod tho cause it certainly helps out with the other stuff.
embercoral Sep 16, 2021 @ 6:09pm 
Thank you for this. Now I won't have to waste as much time trying to grow the rarer garden crops.
Icy Wings / Slime Soar Sep 10, 2021 @ 6:19am 
And you missed a feature: To reroll the Garden plant tick :D
Icy Wings / Slime Soar Sep 10, 2021 @ 6:16am 
This was the feature that was lacking in comparison to the browser version, THANKS!
Pyromanic8 Sep 10, 2021 @ 1:02am 
This is exactly what I wanted to have in game, thank you so much!