CookieMonsterTeam / CookieMonster

Addon for Cookie Clicker that offers a wide range of tools and statistics to enhance the game
MIT License
495 stars 206 forks source link

Next achievement for having a number of a each building should be easier to see, and affordability easier to figure out #729

Closed TakGalaman closed 3 years ago

TakGalaman commented 3 years ago

As the game goes on one's objective is usually to work toward the next achievement to increase milk level and thereby kitten bonuses. One of the most predictable achievements to get is having 100, 200, 300, etc. of each building - we can calculate how much it will cost to buy all the buildings between where we are now and the number we need to reach, and we know which achievements we have gotten and which we haven't.

I would like cookie monster to save me from using outside calculators or lots of scrolling and scanning through the achievements list to see which # of buildings I need to reach next.

Proposed solution: Add to the tooltip for each building what is the number of that building which will result in the next achievement for me. Also tell me how many cookies it would cost to buy my way to that number, and whether I can afford it if I popped all my wrinklers.

Alternatively this should be in the Stats menu.

Optionally this should have toggles for considering optimal pantheon, grimoire spells, krumblor auras, and any other modifier that I'm not thinking of right now. (Like - "you could afford this if you cast Crafty Pixies and popped 4 of your wrinklers")

DanielNoord commented 3 years ago

You are basically proposing two functions here, which I will comment on independently.

1) Figuring out the next achievement is basically a duplicate of #4. However, I was thinking about this some more last week and remember that sometimes the next achievement is not necessarily "x of building", but could also be "x total amount of buildings", "x of all buildings". Therefore, we can't just check for the next "x of building" achievement and subtract the current amount of buildings but we will need to loop over increments to see if the number of achievements changes. (So buy 1 cursor, buy 2 cursors, buy 3 cursors..) Doing this for all buildings on each cps cycle would be very resource intensive. I am trying to figure out a solution but have not come up with anything yet. If you have any suggestions I would recommend you to discuss those in #4.

2) Giving advice on what to do to reach a number of cookies is problematic. Should we suggest selling all your stock? Even if they are super cheap? Should we advise you to use your magic? Even if the magic bar is not full and regenerating would thus cost more time? Should we advise to pop wrinklers? Even if in the long run this is often not effective and the respawn rate of wrinklers is based on luck.

We have tried to fix these issues for the chocolate egg calculations. Where we basically list what you need to do to reach the maximum reward. However, displaying this for every building or upgrade is not feasible and would clutter the interface too much. Making all the questions I asked in the previous paragraph toggles is also not something I am in favor of as it would clutter the settings.

In general, I think we should try to refrain from being to forceful in the advise we give to players and allow the user to pick the information he or she wants to use. We provide suggestions and information for each individual section (the garden interface, the aura interface, the wrinkles stats screen, etc.) and make it clear to users how to optimize those individual sections. This has been the way Cookie Monster does things previously and I think is still the best option. If there are any sections where you are missing relevant information you could certainly create a feature request!

TakGalaman commented 3 years ago

Interesting - I didn't consider the other achievements that building count are used in.

I'll argue that just because it is hard to do this in an all-encompassing way doesn't mean we shouldn't do the simple thing - "how many banks do I need to reach my next # of banks-based achievement". That would be enormously useful and I think simple to implement.

And we'd only need to calculate this when buying or selling a building, not all the time, if we have an infrastructure for that.

DanielNoord commented 3 years ago

While I agree that we should implement something that tells this to the user I think it is better to this is in one new feature that fits all needs rather than only provide half of the desired function. Thus, implementing #4 with accounting for all achievements would be best I think.

We actually do this calculation (PP calculation) quite often. I think it is more than once a second, but don't quote me on that. This is because the original game has a sort of failsafe mechanism to check for changes in cps that it did not notice itself. It runs all calculations anyway on a set interval in order to catch those instances where cps changed without the game noticing it. These calculations also trigger the PP calculation. Therefore, looping over all possibilities is not really feasible and we will need to find a way to easily deduct the number of buildings needed till next achievement and only run the calculations for that number.

TakGalaman commented 3 years ago

The option to show missing achievements mainly satisfies the idea behind this request!

What do you think about showing affordability information in the tooltip for the achievement I don't yet have? Something like this: image

DanielNoord commented 3 years ago

Although I think this would work I prefer adding such info to tooltip of the building-column. I hope to add a line "Buildings needed till next achievement" to the tooltip. I have tested some stuff tonight and think I might have found a solution to calculate this resource-efficiently.

DanielNoord commented 3 years ago

I have now added this to the dev-version. Please test it and let me know what you think!

TakGalaman commented 3 years ago

Love it! I'd like to have the number of cookies to buy those remaining buildings shown. I might splurge and buy 40 of the building if it means another achievement, but it's very difficult to estimate the cost of buying so many based on just the current building price.

On Fri, Apr 9, 2021 at 9:02 AM Daniël van Noord @.***> wrote:

I have now added this to the dev-version. Please test it and let me know what you think!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Aktanusa/CookieMonster/issues/729#issuecomment-816705270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHST53TIJBY4SOCIKE5APYDTH4CI3ANCNFSM4Z3PB76A .

-- Kevin Anderson

DanielNoord commented 3 years ago

I have created #766 to track that request!