Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.



Check if you are posting in the correct category.



The Off Topic section is not meant for discussing Cookie Clicker.

Cookie Clicker spreadsheet

bob_32_116bob_32_116 Posts: 607Member ✭✭✭
edited June 2016 in General Discussion
Has anyone else here gone to the tragic extent of constructing a Cookie Clicker spreadsheet? I have, and am willing to share it if anyone is interested. I input what I own and how many of them, and it calculates the total CpS and CpS of each item, and along the way the time cost of acquiring the next object or upgrade, making it easy to decide what to buy next.

It is incomplete, as it only incorporates stuff I have encountered in the first incarnation. So as yet it does not have synergies, Bingo Centre upgrades, season stuff or dragon information. I'll insert those when the need arises.

It does not, of course, calculate the number of cookies I have. I have a separate application to do that. It was written by Orteil, and is called Cookie Clicker. :D

To be honest, I probably would not still be playing the game had I not enjoyed the challenge of constructing the spreadsheet. It's quite a joy to get to the stage where the total CpS displayed on my sheet exactly matches what I am actually getting, meaning I have the formulae correct.

Comments

  • CooK364CooK364 Posts: 52Member ✭✭
    Hi bob, how do you calculate the CpS of each building?
    "Those cookies aren't going to click themselves! Oh wait, actually they will."
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    edited June 2016
    CooK364 said:

    Hi bob, how do you calculate the CpS of each building?

    I use the initial CpS, then consider the effect of things that increase the CpS.

    For example, farms start out with a CpS of 8/sec. I currently have 5 farm upgrades - hoes, fertiliser, etc, each of which doubles the output, so there is a factor of 2^5 = 32. I also have the "farmer grandma" upgrade, which with 143 grandmas gives a % increase of 143%, so there is another multiplication factor of 2.43. On top of that there is an overall CpS multiplier of 3.55 which comes from cookies and kittens and applies to every building. All those quantities multiplied together give a current CpS of 2208.4 for each farm.

    All the objects get their CpS calculated this way, except for the cursor which has an added term that comes from the Thousand Fingers, Million Fingers etc. This term is added before applying the overall multiplier.
    Post edited by bob_32_116 on
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    Well, I have now implemented the synergies - which I have not yet encountered in the game - and it was an interesting challenge. I think I now have the formulae correct, but I won't really know until I start buying them.

    Things like the switches and the dragon-related enhancements will be interesting, but I expect that to be less difficult.
  • CooK364CooK364 Posts: 52Member ✭✭
    Yes, the interactions get more complex.

    I get my numbers by checking CpS before and after a purchase:

    - Open the Chrome Console (F12)
    - There is a drop-down (Frame Selection) just under the menu bar . Choose "top"

    Note that the following commands are case-sensitive

    - type and enter at the Console prompt: start=Game.cookiesPs
    - buy your building
    - type and enter at the Console prompt: (Game.cookiesPs-start)/1e+18

    You will get the increase in CpS in Octillions

    These commands can easily be recalled by pressing the up arrow

    Note that the tool tips are totally inaccurate. For example, they show Grandmas are by far the worst building, but in fact Grandmas are third best, only after Prisms and Time Machines
    "Those cookies aren't going to click themselves! Oh wait, actually they will."
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    The information needed to calculate production rates and production increase due to purchases is all there on the Wiki - at least I think it is, it seems to have all the info for the stuff I have already implemented. Translating it into the spreadsheet is not trivial, though.

    I notice that the "Map of all synergies" on the Wikia upgrades page has one synergy missing. There should be a red line connecting the factory and spaceship, corresponding to the "Shipyards" synergy.
  • adam_antichristadam_antichrist Posts: 396Member ✭✭✭


    I notice that the "Map of all synergies" on the Wikia upgrades page has one synergy missing. There should be a red line connecting the factory and spaceship, corresponding to the "Shipyards" synergy.

    There are two red lines between spaceship and mine. I bet one of those is supposed to go to factory instead.


  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭


    I notice that the "Map of all synergies" on the Wikia upgrades page has one synergy missing. There should be a red line connecting the factory and spaceship, corresponding to the "Shipyards" synergy.

    There are two red lines between spaceship and mine. I bet one of those is supposed to go to factory instead.

    I noticed that, but I think that's correct. There are actually two different synergies that connect spaceship and mine.

    I wonder why he did that? It's the only case where there are two links between the same pair.

  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    edited July 2016
    OK, there are some later stage game features that I have not yet implemented in the spreadsheet, but I feel I may as well upload the sheet in its present state of development. I'll try and include the remaining features as i come to them. Meanwhile the sheet may provide fodder for a bit of discussion.

    What you might call the basic game data is on the MAIN sheet in mauve. All the rest is formulae. The mauve columns D and E ("Avbl" and "Quantity") are the only things that contain data needing to be changed as the game progresses, therefore they can be said to represent the current state of the game. "TRUE" or "1" means the item is in the store; it does not necessarily mean i have enough cookies to purchase it. The cell labelled "Show all costs" (cell D17) is normally set to FALSE, in which setting the only "time costs" that are displayed are for items that are available and are not yet purchased. If the setting is TRUE, the time cost of everything not yet purchased is shown, which is useful for debugging and also for checking on items that will soon become available.

    The reason for setting this up in the first place was to provide a quick means of calculating the best next building or upgrade to purchase. This appears in cells B10 and B11, and is got by taking the minimum values in the column labelled "Time cost".

    Constructive comments are welcome, as is pointing out any errors. I am pretty sure of the calculations for CpS, as the calculated CpS can be verified by comparing against what is actually being produced in the game. I am less certain of the calculations for the column labelled dC, which is the increase in CpS after purchasing the item. Some of these calculations are quite complex, especially when grandma types and other synergies are involved.
    Post edited by bob_32_116 on
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    ^^ The above spreadsheet has been well and truly superseded. I'll post another at some stage, one that incorporates many more of the game features, as well as fixing a number of errors I found in the above one.
  • adam_antichristadam_antichrist Posts: 396Member ✭✭✭
    edited September 2016
    I have just started one to see which buildings are better value than prisms using the simple cps(building)/cps(prism)*cost(prism) formula. BUT due to synergies the CPS of the buildings keeps changing with every purchase. My work around for this is to recalculate the building CPS after buying the building by subtracting the new total CPS from the prepurchase total CPS. This works after buying a prism, bc the change in ceiling (where the buildings are not as good value as a new prism) means that I can buy at least one of every building before a new prism.

    The main flaw in this system is that it only calculates value relative to prism and not other buildings, so it is not a question of knowing which building is best value, rather it's to avoid buying buildings which have already passed their current ceiling. To work out the value relative to each other would require a vastly more complex spreadsheet and still require me to calculate the changes in CPS after each purchase. It is possible to work out the boost to CPS for building A given purchase of building B via the synergy description, but since each purchase can affect more than one building at a time I feel like this is beyond my patience to undertake. I'm still questioning whether to bother going ahead with the less complex ranking system I have in mind, which would indicate best value building based only on the prepurchase CPS relative to cost. Since this isn't going to be accurate anyway thanks to the effects of synergies, I wonder if it is too much effort for an inaccurate estimate when I can already make a subjective estimate which will not be much less accurate and requires no effort.

    Does this make sense or have I just rambled on for ages in a way which only I can understand?

  • adam_antichristadam_antichrist Posts: 396Member ✭✭✭
    here is my spreadsheet

  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    edited September 2016


    The main flaw in this system is that it only calculates value relative to prism and not other buildings...

    Nothing wrong with that. If you think about it, that still means you should be buying the best value building at each point. it doesn't matter whether that value is calculated relative to prisms, time machines or cursors. Alternatively you could do what I do and just calculate the time cost of each, and select the one that is smallest for the next purchase. Those methods are all equivalent.



    Does this make sense or have I just rambled on for ages in a way which only I can understand?

    Yes, and yes. :D

    You did ramble on. But yes it does make sense.

    The synergies are very messy to calculate. I thought I had the formulae correct in my spreadsheet, until I actually started to acquire synergies and discovered I was way off. I located the error and can state that the calculated CpS is now correct - which probably means that the changes in CpS from each new building are also correct, but that's something I can't be certain of.

    It occurred to me afterwards that the cursor upgrades - thousand fingers, million fingers etc., are just another synergy, and could have been handled in the same way as the rest of them, but I'm not going to redesign my spreadsheet now.

    There is one thing I found. You won't be able to acquire synergies until you have done a few ascensions, by which time you will be making purchases so fast in the early stages of the run that it's not worth the time spent deciding which ones to make first. Buying things in the best order, as opposed to buying them more or less randomly, might save you a few seconds of time - the calculation is just not worth the trouble. That also applies to buying the synergies themselves. As soon as they are available they are worth buying.

    Once the numbers against the building start to turn red, and stay red for more than a few seconds, that's the time to stop buying randomly and start planning your purchases.

  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    Here is the current version of my CC spreadsheet.

    As you will see. Adam, mine is a lot more comprehensive and complicated than yours, however mine started out by looking much the same as yours. Extra features were added little by little. It wasn't very long before I realised that I could calculate the cost of each building using the known "inflation" rate of 15%, meaning I could just enter the number of buildings owned rather than type in the cost. then I realised I could do the same thing with building CpS, just by knowing the initial CpS along with which upgrades had been purchased. And so on.

    Had I known I was going to end up with a spreadsheet of this size, I doubt I would have
    started in the first place - but the journey has been fun.

    CC.xls 306.5K
  • adam_antichristadam_antichrist Posts: 396Member ✭✭✭
    Holy shit Bob, but you still need another tab to quantify how much fun you've had.

    I just realised that my sheet can indicate which building is best to buy next based on the ratio of ceiling over cost. The buildings with the higher ratio should logically be better value than those with a value closer to 1.

  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭



    I just realised that my sheet can indicate which building is best to buy next based on the ratio of ceiling over cost. The buildings with the higher ratio should logically be better value than those with a value closer to 1.

    Yes exactly, as I said at the beginning of my last-but-one post.

    If you check the formulae entered in the cells that give what I call "Time cost", you will see that the formula is slightly different from just cost divided by unit production; there is an extra term. In most cases however the difference due to the extra term is hardly noticeable. Mostly it's only significant when buying the first one or two of whatever is currently the highest building.
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    Having got to the stage where most of the time is spent waiting for the run to end, I am going ahead and completely redoing my spreadsheet. I am not totally convinced that the existing one handles synergies properly, Some of the recommended next purchasses seem a bit odd. Things were added to the current one as I went along, and it has become hard to recall just what my reasoning was at each stage. Now that I understand the advanced bits of the game a bit better, hopefully I can make a new simpler spreadsheet.
  • nunyrdambiznessnunyrdambizness Posts: 3Member
    New player here. And, I love spreadsheets.

    I've messed around with the latest spreadsheet by bob in this thread. There seems to be something that I can't wrap my head around and I'm not sure if it's just me or if there is something wrong with the spreadsheet.

    At times, it will suggest the best buy is a building that is extremely (2 or even 3 times) more expensive than a better producing building (2 or even 3 times more productive). Holding out for the lower producing building seems to be counter-intuitive.

    Also, let's assume you let the game run overnight (I can't image no one does this). When you wake up you might have enough cookies to get 2 of the highest producing buildings you have unlocked. Doesn't that seem like the better way to go?

    I seem to be of the mindset that getting the CpS as high as possible is the name of the game.

    Oh, and if there is a more updated spreadsheet, I'd like to see it ;).
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    "At times, it will suggest the best buy is a building that is extremely (2 or even 3 times) more expensive than a better producing building (2 or even 3 times more productive). Holding out for the lower producing building seems to be counter-intuitive."

    That's possible, because of the way the synergies work. The screen tells you how much each building is producing, hence how much the next one will produce, but it does not show how much the acquisition affects the productivity of another building. But as I say, I am not confident that I have calculated synergies properly, so the spreadsheet may very well be in error. Stay tuned for updates.

    The only time I have noticed what you describe is with grandmas. The Farmer Grandmas, Miner Grandmas etc upgrades mean that each new grandma has ad effect on production that goes way beyond the direct production of the grandmas. Hence it can appear from looking at the screen that I am buying too many grannies for what they produce, but I think I have calculated those correctly.


  • nunyrdambiznessnunyrdambizness Posts: 3Member
    Well, first let me say, your spreadsheet is dead on in calculating the CpS, as I have been using it for a while into my run at work, and have started a new run at home.

    What's nice is I can put in the amount of building and see what my CpS changes to without doing it in game. I can do this for as many variables and steps as I would like. I just undo them and do whatever I did in the game. Easy.

    I probably should have provided an example. I'm at a spot where it's doing it now (it was doing it before I posted, but decided to do my own thing, lol). Anyway....
    The spreadsheet suggest I purchase a Portal. The cost is 619.585t and produces 391.202m. I have 46 of them. But, TMs cost is 609.494t and produces 1.079b and I have 27 of them. Clearly, the TM has much much better CpS increase and costs less.

    In these situations, I don't follow the spreadsheet's suggestion, but I am curious if I am making the right choice. It seems right, but so does your math.
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    ^^ It certainly seems from your description that the spreadsheet is supplying the wrong advice. When I have a spare moment I'll upload the latest version and you can see whether that fixes the problem.

    However I won't be doing any more fixes to this spreadsheet as I am retiring it to work om mark2, and it's just too confusing trying to maintain two at once.
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    edited May 19
    Try this one.
    Post edited by bob_32_116 on
    CC.xlsx 101.7K
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    edited May 19
    Forget it. The uploading doesn't seem to be working properly. It worked before, not sure what's going on.

    Edit: Tried with xlsx format, should be able to open it now.
    Post edited by bob_32_116 on
  • nunyrdambiznessnunyrdambizness Posts: 3Member
    Thanks bob.

    But, I think something is still off. I only sync'd it up and it was telling me to pick something that was gonna take 12hrs at normal rates. Perhaps your spreadsheet works better with someone who is much further along in the game than I.

    I don't think this is that easy of a task; too many variables. I'll play around with what you have so far and tweak it to fit my needs...if I feel like it ;)
  • bob_32_116bob_32_116 Posts: 607Member ✭✭✭
    ^^ Oh well, I have not found it to behave as you describe, but maybe the bad behaviour will be fixed in version 2. :)
Sign In or Register to comment.