Save
All progress in Cookie Clicker is preserved in a save, in the form of a string encoded in base64.
The save is stored in the web browser's cache, allowing the tab or web browser to be closed, or the PC to be turned off, without losing game progress. Game progress is saved automatically every 60 seconds, except when in the ascension screen, unless if sleep mode timeout is on. Whenever the game is saved to the browser cache, a brief notification pops up at the bottom-center of the screen.
Save options
In the "Options" menu, there are various options regarding the save.
Button | Function |
---|---|
Save | This button saves the game's progress to the web browser's cache, which is done automatically every 60 seconds and can also be done by using the keyboard shortcut Ctrl+S. |
Export save | This button opens a pop-up where the save can be viewed as a string and copied. |
Import save | This button opens a pop-up where it is possible to paste a save string obtained from the Export feature. This will overwrite the current progress and replace it with the imported save. |
Save to file | This button downloads a .txt file containing the save string. The name of the file is the bakery name with the word Bakery at the end, with spaces removed. |
Load from file | This button allows for importing a .txt file which obtained from the Save to file button. This will overwrite the current progress and replace it with the imported save. |
Wipe save | This button, which has two confirmation windows, will clear all current progress from the browser cache. This process is irreversible and will result in losing all current progress in Cookie Clicker, unless a backup has been saved. |
Using the above options, it is possible to do the following:
- Back up the current save so that progress will not be completely lost in the event that the save stored in the browser cache is wiped for whatever reason
- Move progress to another device
- Savescum
Disabling autosave
The Options menu doesn't give any option to disable the autosave feature. However, it is possible to disable autosaving through the console. To disable autosave, type this into the console and press enter:
Game.prefs.autosave = 0
To enable the autosave, change 0 to 1:
Game.prefs.autosave = 1
Disabling autosave may result in progress being lost if manual saves aren't made.
Extending save output
The save string can be shown in several different ways, either as string-only, uncompressed string or uncompressed-commented string. To change the save format, find the string Game.toSave=false;
and change the "false" value to 1, 2 or 3 respectively, for each type of output. This option was probably added to test and debug the save behavior.
Note that this will not work in the console, as the game rewrites the value of Game.toSave
back to "false". Instead, use Game.WriteSave(type)
.
Save format
The save uses base64 encoding format, appended with !END! string.[1] This is to ensure portability across all platforms. After removing the !END! appendix, the string can be base64 decoded to a more readable format. The data is structured into several sections, which are separated by a "|" character (ASCII code 124). Inside each section, the particular data entries are delimited by a semicolon ";" character unless they are bitfields, which have no separation character between entries. These special characters are used for easier data parsing from the save string.
The below tables shows all the values stored in the save when decoded from base64 as of version 2.052, separated by section. Some data is in binary form, where 1 is true and 0 is false. Text in quotes are only visible in type 3 (uncompressed-commented).
Variable | Parameter name | Value example | Description |
---|---|---|---|
"Game version" | |||
Game.version |
- | 2.052 | Version of the game in which the save was created. |
(empty) | |||
This section is empty, reserved for future use.[2] | |||
"Run details" (details for current ascension) | |||
Game.startDate |
"run start date" | 1514764800 | Time and date of the current ascension's start.[3] |
Game.fullDate |
"legacy start date" | 1514764800 | Time and date of the whole game's start.[3] |
Game.lastDate |
"date when we last opened the game" | 1514764800 | Time and date of the time we last opened the game.[3] |
Game.bakeryName |
"bakery name" | Bearded Ninja | String with the bakery's name.[4] |
Game.seed |
"seed" | abcde | 5 lowercase letters with the ascension's seed, defining the behavior of certain random events. |
"Packed preferences" (options)[5] | |||
Game.prefs.particles |
Particles | 0 | Toggles particles, which includes the falling cookies in the background and the rotating light around the Big Cookie. |
Game.prefs.numbers |
Numbers | 1 | Toggles display of the numbers when the Big Cookie is clicked. |
Game.prefs.autosave |
- | 1 | Toggles the game automatically saving every 60 seconds.[6] |
Game.prefs.autoupdate |
- | 1 | Toggles the game automatically checking for updates. If on, and a new update is available, a message will pop up asking to reload for the new update.[6] |
Game.prefs.milk |
Milk | 1 | Toggles display of the waves of milk. |
Game.prefs.fancy |
Fancy graphics | 0 | Toggles fancy graphics, which includes shadows, shading, lighting, and the way cursors move around the Big Cookie. Golden and Wrath cookies also appear at max size immediately instead of growing slowly. |
Game.prefs.warn |
Closing warning | 0 | Toggles the game asking for confirmation when attempting to close the window (changeable in Web only) |
Game.prefs.cursors |
Cursors | 1 | Toggles displaying the circle of Cursors. |
Game.prefs.focus |
- | 0 | Toggles defocus to improve performance when window is out of focus.[6] |
Game.prefs.format |
Short numbers | 1 | Toggles the quantity of cookies to be shown using the names of large numbers instead of an exact figure. Currently uses the "short scale" common in the US, Canada, and modern British. |
Game.prefs.notifs |
Fast notes | 0 | Toggles the game notifications fading faster. |
Game.prefs.wobbly |
Wobbly cookie | 0 | Toggles wobbling when the cookie shrinks/enlarges on mouseover, mouseout, mousedown and mouseup. |
Game.prefs.monospace |
Alt font | 0 | Toggles an alternate number font for cookies in bank. |
Game.prefs.filters |
CSS filters | 1 | Toggles drop shadows to all GUI elements with the icon class (upgrades, buildings, achievements, etc.) |
Game.prefs.cookiesound |
Alt cookie sound | 0 | Switches between the two sounds the cookie makes when clicked. |
Game.prefs.crates |
Icon crates | 0 | Toggles boxes around upgrades and achievements. |
Game.prefs.showBackupWarning |
- | 1 | Toggles the game asking for confirmation when attempting to close the window[6] |
Game.prefs.extraButtons |
Extra buttons | 1 | Toggles Mute buttons on buildings except cursors. |
Game.prefs.askLumps |
Lump confirmation | 1 | Toggles the game asking for confirmation before spending sugar lumps. |
Game.prefs.customGrandmas |
Custom grandmas | 1 | Toggles showing Grandmas named by Patreon supporters (changeable in Web only) |
Game.prefs.timeout |
Sleep mode timeout | 0 | Toggles the game putting itself in sleep mode when it ´s inactive and starts to lag out on slower computers. |
Game.prefs.cloudSave |
Cloud saving | 1 | Toggles Steam cloud saving (changeable in Steam only) |
Game.prefs.bgMusic |
Music in background | 1 | Toggles game music playing even when window is not in focus (changeable in Steam only) |
Game.prefs.notScary |
Scary stuff | 0 | Toggles changes to the Grandmapocalypse by removing the Grandmatriarchs in the background, changing the Grandma store sprite, and giving wrinklers googly eyes. |
Game.prefs.fullscreen |
Fullscreen | 0 | Enlarges window to take up entire screen (changeable in Steam only) |
Game.prefs.screenreader |
Screen reader mode | 1 | Allows for selecting a building by clicking or pressing tab and pressing enter to purchase the building. Holding enter and clicking on a building allows purchasing that building in quick succession, which can be used in conjunction with shift to buy that building quickly. |
Game.prefs.discordPresence |
Unknown | 0 | Enables Discord rich presence for the game (changeable in Steam only). This option and the feature is disabled in 2.052. |
"Misc game data" (statistics and other data) | |||
Game.cookies |
"cookies" | 3.655706856891023e+45 | Cookies in bank[7] |
Game.cookiesEarned |
"total cookies earned" | 3.8566611693221904e+45 | Cookies baked (this ascension)[7] |
Game.cookieClicks |
"cookie clicks" | 7529 | Cookie clicks (this ascension) |
Game.goldenClicks |
"golden cookie clicks" | 14621 | Golden cookie clicks (all time) |
Game.handmadeCookies |
"cookies made by clicking" | 2.4335031334747944e+45 | Hand-made cookies (cookies made from clicking)[7] |
Game.missedGoldenClicks |
"golden cookies missed" | 50176 | Natural golden cookies that faded without being clicked (all time) |
Game.bgType |
"background type" | 3 | Background type |
Game.milkType |
"milk type" | 0 | Milk type |
Game.cookiesReset |
"cookies from past runs" | 6.277171831745141e+46 | Cookies forfeited by ascending[7] |
Game.elderWrath |
"elder wrath" | 3 | Stage of the Grandmapocalypse |
Game.pledges |
"pledges" | 12 | Times the Elder Pledge has been bought |
Game.pledgeT |
"pledge time left" | 0 | Time left in current Elder Pledge (0 if not currently pledged) |
Game.nextResearch |
"currently researching" | 65 | ID of upgrade being researched of the bingo center (0 if research is finished) |
Game.researchT |
"research time left" | 5218 | Time left before the next research is unlocked (-1 if research is finished) |
Game.resets |
"ascensions" | 1002 | Number of ascensions |
Game.goldenClicksLocal |
"golden cookie clicks (this run)" | 111 | Golden cookie clicks (this ascension) |
Game.cookiesSucked |
"cookies sucked by wrinklers" | 4.656877288152025e+43 | Total cookies sucked by wrinklers this ascension[7] |
Game.wrinklersPopped |
"wrinklers popped" | 726 | Wrinklers popped |
Game.santaLevel |
"santa level" | 14 | Level of Santa unlocked |
Game.reindeerClicked |
"reindeer clicked" | 64 | Reindeer found (this ascension) |
Game.seasonT |
"season time left" | 2254888 | Amount of time left in the current season in milliseconds (-1 if no season is active) |
Game.seasonUses |
"season switcher uses" | 5 | Times the season has been switched with the season switcher upgrade (does not include seasons switched naturally) |
Game.season |
"current season" | christmas | The name of the current season (blank if no season is active) |
Game.SaveWrinklers().amount |
"amount of cookies contained in wrinklers" | 0 | Amount of cookies contained in normal wrinklers |
Game.SaveWrinklers().number |
"number of wrinklers" | 0 | Number of normal wrinklers currently on the Big Cookie |
Game.prestige |
"prestige level" | 397424532840 | Prestige level |
Game.heavenlyChips |
"heavenly chips" | 58501002299 | Amount of heavenly chips in bank (not including chips spent nor unclaimed chips still on the Legacy tab) |
Game.heavenlyChipsSpent |
"heavenly chips spent" | 338923530541 | Amount of heavenly chips spent on heavenly upgrades |
Game.heavenlyCookies |
"heavenly cookies" | 0 | Amount of heavenly cookies (not currently used; left over from a feature in an early version) |
Game.ascensionMode |
"ascension mode" | 0 | Challenge mode chosen for this ascension |
Game.permanentUpgrades[0] |
"permanent upgrades" | 189 | ID of the upgrade in permanent upgrade slot I |
Game.permanentUpgrades[1] |
532 | ID of the upgrade in permanent upgrade slot II | |
Game.permanentUpgrades[2] |
425 | ID of the upgrade in permanent upgrade slot III | |
Game.permanentUpgrades[3] |
462 | ID of the upgrade in permanent upgrade slot IV | |
Game.permanentUpgrades[4] |
494 | ID of the upgrade in permanent upgrade slot V | |
Game.dragonLevel |
"dragon level" | 23 | Stage of dragon training unlocked |
Game.dragonAura |
"dragon aura" | 15 | ID of the dragon aura in slot 1 |
Game.dragonAura2 |
"dragon aura 2" | 17 | ID of the dragon aura in slot 2 |
Game.chimeType |
"chime type" | 1 | Sound of a golden cookie spawning according to the Golden cookie sound selector. 0 is no sound, 1 is Chime, 2 is Fortune, 3 is Cymbal and 4 is Squeak |
Game.volume |
"volume" | 50 | Volume |
Game.SaveWrinklers().shinies |
"number of shiny wrinklers" | 0 | Number of shiny wrinklers currently on the big cookie |
Game.SaveWrinklers().amountShinies |
"amount of cookies contained in shiny wrinklers" | 0 | Amount of golden cookies contained in shiny wrinklers |
Game.lumps |
"current amount of sugar lumps" | 101 | Sugar lumps currently in bank |
Game.lumpsTotal |
"total amount of sugar lumps made" | 519 | Sugar lumps harvested |
Game.lumpT |
"time when current lump started" | 1540483239887 | Time and date when the current sugar lump started coalescing[3] |
Game.lumpRefill |
"time when last refilled a minigame with a sugar lump" | 1539491651114 | Time and date of the last time a sugar lump was used to refill a minigame[3] |
Game.lumpCurrentType |
"sugar lump type" | 0 | The type of sugar lump currently coalescing |
Game.vault.join(',') |
"vault" | 227,38,137 | IDs of the upgrades contained in the vault (multiple IDs are separated by a comma) |
Game.heralds |
"heralds" | 41 | Number of heralds active |
Game.fortuneGC |
"golden cookie fortune" | 0 | Whether the "Today is your lucky day!" fortune has been clicked in this ascension |
Game.fortuneCPS |
"CpS fortune" | 1 | Whether the "Your lucky numbers are xx xx xx xx" fortune has been clicked in this ascension |
Game.cookiesPsRawHighest |
"highest raw CpS" | 2.655706856891023e+41 | Highest raw CpS (this ascension) |
Game.volumeMusic |
"music volume" | 50 | Music volume (changeable in Steam only) |
Game.cookiesSent |
"cookies sent" | 1000 | Cookies sent with gifts |
Game.cookiesReceived |
"cookies received | 1000 | Cookies received with gifts |
"Buildings : amount, bought, cookies produced, level, minigame data" | |||
Game.Objects[0] |
"Cursor" | Explained in table below. Each building is separated by a semicolon. | |
Game.Objects[1] |
"Grandma" | ||
Game.Objects[2] |
"Farm" | ||
Game.Objects[3] |
"Mine" | ||
Game.Objects[4] |
"Factory" | ||
Game.Objects[5] |
"Bank" | ||
Game.Objects[6] |
"Temple" | ||
Game.Objects[7] |
"Wizard tower" | ||
Game.Objects[8] |
"Shipment" | ||
Game.Objects[9] |
"Alchemy Lab" | ||
Game.Objects[10] |
"Portal" | ||
Game.Objects[11] |
"Time machine" | ||
Game.Objects[12] |
"Antimatter condenser" | ||
Game.Objects[13] |
"Prism" | ||
Game.Objects[14] |
"Chancemaker" | ||
Game.Objects[15] |
"Fractal engine" | ||
Game.Objects[16] |
"Javascript console" | ||
Game.Objects[17] |
"Idleverse" | ||
Game.Objects[18] |
"Cortex baker" | ||
Game.Objects[19] |
"You" | ||
"Packed upgrades bitfield (unlocked and bought)" (unlocked and purchased achievements)[5] | |||
Math.min(Game.UpgradesById[0].unlocked,1)[8] |
Upgrade 0 unlocked | 1 | Is upgrade ID 0 (Reinforced index finger) unlocked? |
Math.min(Game.UpgradesById[0].bought,1)[8] |
Upgrade 0 bought | 1 | Is upgrade ID 0 (Reinforced index finger) purchased? |
Math.min(Game.UpgradesById[1].unlocked,1)[8] |
Upgrade 1 unlocked | 1 | Is upgrade ID 1 (Carpal tunnel prevention cream) unlocked? |
Math.min(Game.UpgradesById[1].bought,1)[8] |
Upgrade 1 bought | 0 | Is upgrade ID 1 (Carpal tunnel prevention cream) purchased? |
Math.min(Game.UpgradesById[2].unlocked,1)[8] |
Upgrade 2 unlocked | 1 | Is upgrade ID 2 (Ambidextrous) unlocked? |
. . . | |||
Math.min(Game.UpgradesById[873].bought,1)[8] |
Upgrade 873 bought | 0 | Is upgrade ID 873 (Undecillion fingers) purchased? |
Math.min(Game.UpgradesById[874].unlocked,1)[8] |
Upgrade 874 unlocked | 1 | Is upgrade ID 874 (Omniplast mouse) unlocked? |
Math.min(Game.UpgradesById[874].bought,1)[8] |
Upgrade 874 bought | 0 | Is upgrade ID 874 (Omniplast mouse) purchased? |
"Packed achievements bitfield (won)" (unlocked achievements) | |||
Math.min(Game.AchievementsById[0].won)[8] |
Achievement 0 unlocked | 1 | Is achievement ID 0 (Wake and bake) unlocked? |
Math.min(Game.AchievementsById[1].won)[8] |
Achievement 1 unlocked | 1 | Is achievement ID 1 (Making some dough) unlocked? |
Math.min(Game.AchievementsById[2].won)[8] |
Achievement 2 unlocked | 0 | Is achievement ID 2 (So baked right now) unlocked? |
. . . | |||
Math.min(Game.AchievementsById[874].won)[8] |
Achievement 530 unlocked | 0 | Is achievement ID 641 (All on deck) unlocked? |
Math.min(Game.AchievementsById[874].won)[8] |
Achievement 531 unlocked | 0 | Is achievement ID 642 (A round of applause) unlocked? |
"Buffs : type, maxTime, time, arg1, arg2, arg3" (buffs) | |||
Game.buffs |
Active game buffs | Explained in table below. If no buffs are currently active, this entry is blank. |
Building data
Information on each building is included in large data entries, with the different building types separated by semicolons. The smaller individual data points are separated by commas, and minigame data points (if applicable) are separated by regular colons. i refers to the ID of the building.
Variable | Parameter name | Value example | Description |
---|---|---|---|
Game.Objects[i].amount |
Amount owned | 600 | Amount of this building currently owned |
Game.Objects[i].bought |
Amount bought | 950 | Amount of this building bought this ascension, including those that have been sold (ex. buying 10, selling 10, then buying 10 again, would mean this value is 20) |
Game.Objects[i].totalCookies |
Cookies produced | 4.593698631478832e+40 | Cookies produced from this building this ascension |
Game.Objects[i].level |
Level | 1 | Level of this building |
Game.Objects[i].minigame.save |
Minigame data | Only present in Farms, Banks, Temples and Wizard towers. Contains data for minigames. The Stock Market graph is not saved. | |
Game.Objects[i].muted |
Muted | 0 | Is this building muted? (0: no, 1: yes) |
Game.Objects[i].highest |
Highest owned | 600 | Highest amount of that building owned this ascension |
Game buffs
As with the building data, multiple effects are separated by semicolons, with the data entries separated by commas. Any combination of effects can happen at the same time, but if more than one of the same effect is stated, it will only be applied once. i refers to the position of that buff in the list.
Variable | Parameter name | Value example | Description |
---|---|---|---|
Game.buffs[i].type.id |
Effect ID | 12 | The ID of the game boost. |
Game.buffs[i].maxTime |
Maximum time | 2310 | The maximum duration of the effect in frames (normally 30 fps) |
Game.buffs[i].time |
Time remaining | 300 | The time remaining in the effect in frames (normally 30 fps) |
Game.buffs[i].arg1 |
Optional: Argument 1 | 7 | Effect multiplier (Frenzy is 7, Elder frenzy is 666, etc.) |
Game.buffs[i].arg2 |
Optional: Argument 2 | 6 | Ignored by all effects except building boosts and rusts; denotes the targeted building (0 for cursors to 19 for You) |
Game.buffs[i].arg3 |
Optional: Argument 3 | Ignored by all effects; most likely reserved for future use |
- ↑ This string appears as %21END%21, due to URL encoding.
- ↑ In the code, this empty section has the following comment: //just in case we need some more stuff here
- ↑ 3.0 3.1 3.2 3.3 3.4 This number is a Unix timestamp, which describes the number of milliseconds elapsed since January 1st, 1970 UTC, 00:00:00.
- ↑ If there are special characters in the name, such as spaces, they are saved normally, without any special encoding (space is saved as ASCII code 32, for example).
- ↑ 5.0 5.1 Values here are either 0 for OFF, or 1 for ON. These 1s and 0s are not delimited by semicolon.
- ↑ 6.0 6.1 6.2 6.3 This option cannot be changed in the Options menu. However, it can be changed in the console with the following: Game.prefs.[VARIABLENAME] = 1;
- ↑ 7.0 7.1 7.2 7.3 7.4 The number uses the same format as in "short numbers OFF", i.e. scientific notation.
- ↑ 8.00 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 8.10 8.11 8.12 Returns 1 if the achievement/upgrade has been bought/unlocked and 0 if not.