Giter Site home page Giter Site logo

cookiemonster's Introduction

CI

Cookie Monster

Cookie Monster is an addon you can load into Cookie Clicker, that offers a wide range of tools and statistics to enhance the game. It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want. The mod helps you to whichever degree you want, if you only need some help shortening long numbers, it does that. If you need to be accompanied by hand to pick the best buildings to buy, it does that, but everything is an option.

Current version

The master branch hosts the latest production version intended for general users. All development and pull requests should target the dev branch. Github Pages is hosted from the gh-pages branch

What it does

At its core, Cookie Monster computes an index for both buildings and upgrades: the Payback Period (PP). CM will take everything in consideration, meaning if buying a building also unlocks an achievement which boosts your income, which unlocks an achievement, CM will know and highlight that building's value. CM uses the following formula to calculate the PP:

max(cost - cookies in bank, 0)/cps + cost/Δ cps

If the relevant option is enabled, CM will color-code each of them based on their value. CM compares the PP across all possible buy options: if a buy 10 option is better than any of the buy 1 options Cookie Monster will colour them accordingly. Note that sometimes it is better to buy 10 of a building than to buy only 1, CM will also indicate this!

The following standard colours are used:
  • Light Blue: (upgrades) This item has a better PP than the best building to buy
  • Green: This building has the best PP
  • Yellow: This building is within the top 10 of best PP's
  • Orange: This building is within the top 20 of best PP's
  • Red: This building is within the top 30 of best PP's
  • Purple: This building is worse than the top 10 of best PP's
  • Gray: This item does not have a PP, often this means that there is no change to CPS

Note: For this index, lower is better, meaning a building with a PP of 1 is more interesting than one with a PP of 3.

Using

Bookmarklet

Copy this code and save it as a bookmark. Paste it in the URL section. To activate, click the bookmark when the game's open.

javascript: (function () {
  Game.LoadMod('https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js');
})();

If (for some reason) the above doesn't work, trying pasting everything after the javascript: bit into your browser's console.

Userscript

If you'd rather use the addon as a userscript to automatically load Cookie Monster every time the original game loads, install the CookieMonster.user.js file. You can do this by clicking on the file in the file-list and clicking "raw".

Note that to avoid conflicts Cookie Monster should ideally be loaded after any other content mods have been loaded

Bugs and suggestions

Any bug or suggestion should be opened as an issue in the repository for easier tracking. This allows us to close issues once they're fixed.

Before submitting a bug, make sure to give a shot at the latest version of the addon on the dev branch. This version can be tested by copying the CookieMonsterDev.js file of the dev branch into your console. You can also load the dev-version by using https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonsterDev.js to load the mod. If the bug is still here, you can submit an issue for it. Please do so by using the bug report template.

All suggestions are welcome, even the smallest ones.

For developers

Cookie Monster exposes some of the data it creates to the global scope. This data can be found in the CookieMonsterData object after loading Cookie Monster.

Currently we exposes relevant data for buildings and upgrades (PP, colour and bonus income). If you would like us to add any aditional data, please feel free to open an issue or create a PR doing so!

Contributing

To contribute you can fork and clone the repository and run npm install. Note that you will need to authenticate to the GitHub Package Registery (see this documentation). After creating a Public Access Token you should export this variable to $GITHUB_REGISTERY_PAT as defined in .npmrc.

Please also remember to run npm run build-dev after saving all your changes to build the final CookieMonsterDev.js file.

Before pushing a new version to main and Github pages use the build-final command to build the final file.

Contributors

cookiemonster's People

Contributors

aktanusa avatar amethystmoon avatar azmaeus avatar benblank avatar bonne avatar chorizorro avatar danielnoord avatar dependabot[bot] avatar domoddball avatar florensie avatar fofoni avatar github-actions[bot] avatar grelca avatar humdogm avatar icecream17 avatar jcboorgo avatar jessedufrene avatar lgeorget avatar mason1920 avatar pidgeot avatar pre-commit-ci[bot] avatar puggan avatar redthefed avatar rjlintkh avatar sigv avatar staticvariablejames avatar tsr488 avatar tydus avatar urganot avatar zohnannor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookiemonster's Issues

Golden Cookie multiclick exploit.

When using Mousekeys to click very fast, golden cookies can be clicked multiple times. Tested this without the add-on and it didn't work, so this is a Cookie Monster bug.

It's called an exploit since it can make the game easier.

Suggestion for calculating Lucky+Frenzy caution threshold on buildings/upgrades

Right now, the Lucky+Frenzy caution threshold shows you how many more cookies you need to bank so that when you purchase a building or upgrade, you remain able to hit the maximum reward for Lucky+Frenzy. I think this is the wrong number to be targeting.

Take a look at this screenshot:
screen shot 2014-10-10 at 10 44 14 am

A maxed out Lucky+Frenzy requires 189Qa cookies in the bank for me. I want to purchase something costing 89Qa, and the tooltip tells me I should wait until I have 265Qa more cookies (for a total of 460Qa cookies). If I do wait until I have 460Qa cookies, then when I purchase Kitten Overseers for 89Qa, I'll have 371Qa cookies in the bank, which will be the new minimum bank to continue maxing out Lucky+Frenzy.

However, I believe the real target, instead of being 460Qa, should be 278Qa (the cost of the upgrade + my current required Lucky+Frenzy cookie bank). If I buy Kitten Overseers when I have 278Qa, then my bank will be at my current Lucky+Frenzy minimum (189Qa), and my new minimum will be considerably higher because of the upgrade's CPS boost (371Qa). So, when I get Lucky+Frenzy now, I will clearly not be getting the maximum reward possible. However, my reward will be greater than if I had waited to buy the upgrade, because my bank will be somewhere between 189Qa and 371Qa (the new required minimum).

In short, waiting until you have enough in the bank to stay at the Lucky+Frenzy bank minimum is leaving cookies on the table (in the jar?). The Lucky+Frenzy caution should direct you to wait till you have your pre-upgrade required bank + the cost of the upgrade, not the post-upgrade required bank + the cost of the upgrade.

Greasemonkey Cookie Master conflicts with Cookie Monster

In CookieMonster.js around line 1950 you'll find

    CM.Backup.CalculateGains = Game.CalculateGains;
    Game.CalculateGains = function() {
        CM.Backup.CalculateGains();
        CM.Sim.DoSims = 1;
        CM.Sim.Date = new Date().getTime();
    }

This causes my firebug to complain about too deep recursion while the game gets stuck.

Add a "stop mod" and "restart mod" button

Hi Aktanusa,

Nice Add-on for CookieClicker, CookieMonster BTW, thanks a lot...

I like your Add-on for the Stats and the Calculations (especially for how many Cookies to keep like the ""Lucky!" Cookies Required (Frenzy) : 52.989 Sext" (even if I think the Calculation might be wrong...), but your Add-on when loaded sucks about 30% of the Resources of the JS Engine on FF or PM (Pale Moon).

And the only way to get rid of it is to save and then reload the Game and start all my other Scripts running on the Game... (1 .js Script and 1 iMacros Script on the CookieClicker Page, + other iMacros Scripts running on other Pages running each in different Browser (=PM) Instances.)
=> So I miss an easy 'Kill me' Button (from the CC 'Menu' Page)...
=> As well as an easy way to land on your GitHub Repository (Forum), instead of having to google "CookieMonster"...

The other .js Script I use (not really public, made by a Friend, I first need to check with him if that Info can be disclosed...) has a RealTime CPS Calculator, and CPS go down instantly from Max 100cps to Max 60cps (hum => 40% JS Engine "Suck" actually) as soon as CookieMonster is loaded...
This Friend of mine has already implemented a few things that are on your Requests List (like Buying the Most Profitable Building) and he found a few flaws in your Code, you might be interested to get in contact if he agrees... (but he doesn't really want to go public...)

(Your 'Next Cookie' and 'Next Reindeer' Time Calculations are always wrong BTW...)

(Using CookieMonster v.0466 (+v.0465) on Pale Moon v.24.6.2 (=FF31), Win7-64. + CookieMonster running from your Server, latest Version I reckon, even if it's difficult to find the Version...)

Display the required bank and CpS to reach the next reward level for Cookie Chains in stats

Could you add to the Cookie Chain stats the required bank and CpS to the next reward level ?
Today, it displays the cookies required for the current chain, but it would be interesting to have information about when you'll get the next level.

This information is available on the Golden Cookie table "Rewards for Cookie Chain" on the Wiki.

Thanks to your awesome addon, this is now the only "outside" information I search when playing Cookie Clicker !

Memory leak

I have been noticing that when using this addon, the Cookie Clicker tab uses over 2GB after about an hour. And when not using Cookie Monster, it does not.

I found when I tired to find out what used up all my RAM when everything was being used.

Using the browser Chrome on Linux.
Very late game, six achievements left and about 400k heavenly chips.

Golden cookie sound does not work.

I have the option for the sound to play when I get a golden cookie, but I never hear the sound. I've gotten multiple golden cookies and still no sound. I see the screen flash, but there is no sound. I saw on the cookie clicker subreddit someone had this problem 10 months ago and it was a broken url...Did that happen again?

Bug with the new color picker

If you change either orange, gray, or pink colors, it will not only change it for the buildings, it will also change the timer bars color (I'm assuming the just pull the same color or something).

new way of find the most profit-making building

Hi, i used to play cookies clicker, and i found recently your add-on cookie monster.
I think it's a very good addon but i disagree a bit with the way of searching what building is the most worth.The fact is that in your formula price/cps doesn't take the time to buy the item into consideration.
what I did is pretty simple : i take 2 graphs : One with the actual cps * t
one another with the actual cps * t = Y1(t) but when we reach the price of the building we are testing,
we buy it and we have (cps + G) * t (G is the profit in cookies per second).
So the actual formula of the second graph id (cps + G) * t - ( 1 + G/cps ) _P = Y2(t) because with this when we reach the price of the building ie. t= P/cps we have Y2=0
Then i search T the time when these two graphs are crossing each other, ie the time that the building refund his price + the time loss at waiting the building ,
so Y1(T) = Y2(T)
cps_T = (cps + G) * T - ( 1 + G/cps ) _P
G * T = ( 1 +G/cps ) *P
T = P/(G_cps) * ( Cps + G)
T = P/G + P/cps

then we use this formula for each building and less T is faster the building refund himself

Hope you read all this , Thank you , Bye

Add amortization

It would be really nice if you could add an amortization to the buildings.
So you know how long it will take till the building is payed-off.

Development bookmarklet doesn't work in Chrome or Internet Explorer.

Apparently, due to the way Github serves the script file, Cookie Monster is failing to load via that file.
The following appears in the console in Chrome:
Refused to execte script from https://raw.githubusercontent.com/Aktanusa/CookieMonster/dev/CookieMonster.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

Make sound volume option changeable by click + holding and a text-field

I have to single click the cookie all the time, so please don't make me do it on the volume buttons in the settings. It would be nice, if you'd add click and hold on the volume buttons so that the volume will increase/decrease further when holding the left mouse button. Or make the display of the current volume an editable text field so that one can enter the preferred volume value instead of having to click several times.

Chocolate egg stat

A stat that gives the amount of cookies chocolate egg would give if you at this second sold all buildings and bought it.

Color Blind

could you please add an option for color blind people? The add-on is amazing, the only thing it lacks is an option to make the colors more disctintive. (maybe changing the lime to darker green/blue)
Thanks!

confusion by heavenly chips reset bonus income

I only (relatively) recently started playing Cookie Clicker (with Cookie Monster, of course). After two weeks and currently about 620Qa CBAT I still haven't reset once, because Cookie Monster told me I would only get a bonus of about 5.6 % from heavenly chips, which really didn't seam to be worth it. Even though I was confused because the general advice was to reset when getting 500 HC and the percentage didn't raise at all even with new heavenly chips, I only just realized, that this only refers to the bonus from achievements and not to the bonus gained from the chips themselves!

Even though most people don't seam to have this problem, I'd like to make two suggestions:

  1. Rephrase the tooltip to make it more clear, that only achievements are counted in here.
  2. Add a calculation of how much bonus the new heavenly chips will give as a percentage of the current CpS. Since it doesn't stack with most other bonuses, it's not exactly easy to estimate the actual benefit.

Userscript Not Working

Maybe I'm just not doing something incorrectly, but the Userscript(using Tampermonkey) does nothing. I'm currently using the bookmark as workaround, but I'd prefer the Userscript by far.

Why doesn't Cookie Monster use the Cookie Monster short numbers?

You know, the format with Qa.

Is it because it's currently unimplemented but still in the source of the base game?

What format is the "Short Scale" currently used anyway called (which goes up to Tredec, which I'd put as Te or Td in the Cookie Monster format)?

Lucky/Chain cookies required miscalculation

For me the "cookies required" stats are off - they are greater than the maxes! Or am I misunderstanding what they mean? BTW I am indeed getting lucky cookies and chain cookies (on Easter event), despite CookieMonster telling me I won't.

"Lucky!" Cookies Required : 236.908 Tr (6h, 45m, 54s)
"Lucky!" Cookies Required (Frenzy) : 1.658 Quadr (2d, 8h, 45m, 54s)
"Lucky!" Reward (MAX) : 23.69 Tr
"Lucky!" Reward (MAX) (Frenzy) : 165.836 Tr
"Lucky!" Reward (CUR) : 4.459 Tr

similarly with Chain cookies:
"Chain" Cookies Required : 311.111 Tr (9h, 22m, 30s)
"Chain" Cookies Required (Frenzy) : 3.111 Quadr (4d, 11h, 51m, 57s)
"Chain" Reward (MAX) : 77.777 Tr
"Chain" Reward (MAX) (Wrath) : 66.666 Tr
"Chain" Reward (MAX) (Frenzy) : 777.777 Tr
"Chain" Reward (MAX) (Frenzy) (Wrath) : 666.666 Tr
"Chain" Reward (CUR) : 7.777 Tr
"Chain" Reward (CUR) (Wrath) : 6.666 Tr

Add Current Value of Chocolate Egg if available

An entry under statistics showing the current value of the chocolate egg.
Another entry under statistic showing the current value of the chocolate egg after popping all current wrinklers.

Both entries should only appear, when the chocolate has been found but not been bought, yet.
The second entry should only appear, when there are wrinklers around nibbling on your cookie.

Upgrade bar colors bug

Whenever I turn the upgrade bar colors off, they only stay off for a few seconds, and then they just turn back on.

Manual clicks per second

Would be cool to have a "manual clicks per second" stat (would show your average clicks per second over a 1s/3s period (depending on your stats update setting).

Display chance of random drops in stats or on tooltip

This might be complicated, but it would be great if the add-on would be able to calculate the chances for the random drops, i.e. Christmas cookies, rare and common Easter eggs and all this stuff.
You would see the percentage (for both wrinklers, golden/wrath cookies and reindeers) next to the season specials stats.

Missed golden cookies

Hi, nice add-on. I only miss one feature: too see how many golden cookies I have missed. You can see it by typing "Game.missedGoldenClicks" (without quotes) in the console. Other add-ons have it so I am sure you could add it too.

Indicate in the title bar whether it is a golden or a wrath cookie

I often stop buying research center upgrades right before Elder Pact so that I can still get golden cookies. I like the title bar countdown timer, but I would like it even more if it told me whether it was a golden cookie or a wrath cookie that was active.

It looks easy to do, since Game.goldenCookie has a wrath member that you can switch on.

Number wrinklers

Add a small number over each wrinkler showing how old it is (ie. 1 for first wrinkler, 2 for second, 10 for youngest). Or even better (if easy to code), show the number of cookies each wrinkler contains. This is useful for popping the minimum number of wrinklers to have enough cookies for an upgrade/building.

Hover tooltip isnt working

If ill hover over an building to check if ill lose my cookies requirement, it wont show untill ill hold my mouse button it shows and if its not the requirements i can move out of the building while holding my mouse button. but id like to just hover over would work again.

Make switches and upgrades section of Building/upgrade column hideable

Since the upgrade section now has separated areas for switches and research center upgrades, I would welcome an option to hide these (separately, preferably). They aren't needed most of the time but take up valuable space. Not everyone has an HD screen and I can barely fit in all buildings and the folded upgrade area of the current live version on my laptop screen even in fullscreen mode. With the three new buildings space there is even more precious.

Cookiemonster not working

Hello aktanusa,
I've used cookiemonster a lot in the past and I think it's an awesome plugin.
When I started cookieclicker again today, I decided to add cookiemonster, cause it's awesome.
But it didn't work sadly.
First I tried loading it via a bookmark.
Since it didn't work, I tried via the console, and I got a bunch of errors:

Uncaught TypeError: Cannot read property 'Heavenly chips' of undefined CookieMonster.js:2132
13Uncaught TypeError: Cannot read property 'Heavenly chips' of undefined CookieMonster.js:2132CM.Sim.CopyData CookieMonster.js:2132CM.Sim.BuyBuildings CookieMonster.js:2320CM.Cache.RemakeIncome CookieMonster.js:35CM.Loop CookieMonster.js:2004Game.Loop CookieMonster.js:1998
Uncaught RangeError: Maximum call stack size exceeded CookieMonster.js:1945
Uncaught RangeError: Maximum call stack size exceeded CookieMonster.js:1996
12Uncaught RangeError: Maximum call stack size exceeded CookieMonster.js:1945Game.CalculateGains CookieMonster.js:1945Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains CookieMonster.js:1946Game.CalculateGains
(last rows keep coming)

When I try to load the newest dev I get:

Refused to execute script from 'https://raw.githubusercontent.com/Aktanusa/CookieMonster/dev/CookieMonster.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

Greetings, mijkolsmith

Ensure store tooltips don't run off bottom of page

I'm currently seeing the tool-tips for the time machine (when the cursor is low enough), antimatter condenser, and prism run off the bottom of the screen. For the last two, I can't read the bonus income and other information below that.

"Time Left" Calculation doesn't factor in wrinkler bonuses.

The "Time Left" calculations in building and upgrade tooltips seem to just be based on the current, fully-withered, cps. This just makes things look like they would take up to twelve times longer to buy. Would it be possible to toggle the calculations to be based on cookie bank + potential popped wrinklers in addition to just bank?

Button for popping all wrinklers

First of all, I love this add-on, it's really nice, thanks to all the contributors! :)

Anyway, I've got a suggestion. I'd like to have a button to immediately pop all wrinklers at the same time.
This would be really nice :)

Stuck on Easter

Cookie Clicker: v1.0465
Cookie Monster: Used bookmarklet and "updater" from Cookie Clicker Wiki entry on this addon; also tried the Userscript version
Browser: Chrome 35.0.1916.114 m
OS: Windows 8.1 Update 1 x64 Pro

Every time I load Cookie Monster, I'm on Easter by default with no timer, just "Season: Easter" and it's permanent. I unlocked the Season Switcher and changed to Christmas--after that there was a proper timer. Otherwise, permanent Easter.

problem with number display

When Cookie Monster is active, fractional digits aren't displayed anymore, no matter which format you chose in the options. It doesn' matter at all in the later game play but is pretty adverse at the very beginning.

Removing Bar at the Top of Screen

The original Cookie Monster automatically removed the bar at the top of the screen with all the links to different pages. I was wondering if you could add this feature too.

Please Change Page's FavIcon to Gold Cookie when Gold Cookie Appears

Hi Aktanusa, it'd be handy if the page's favicon's appearance changed when a gold cookie appeared. That way, I could see that something was going on even if the tab was pinned (with only the favicon displaying, without showing the page's title).

(In a similar vein: adding an option to only change the page's title when gold cookies appear, so that the pinned tab isn't continuously highlighted, would be nice.)

[beta] heavenly chips/prestige calculation error

The counter for the cookies needed for the next chip/level behaves oddly. It increases instead of decreasing. The requirement is calculated correctly immediately after a chip is earned (in other words, when the progress bar for the next chip is at the very beginning), but the more it progresses towards the next chip, the more it gets off, counting up instead of down. It's not exactly inverse concerning the amount, though.

I'm not sure, if it's even relevant, because the counter can actually be removed completely, since the game has it's own one now.

Game freezes when I use the script

Hi, I follow all the steps as outlined on the Wiki and whenever I click the bookmark the game freezes. I have tried both scripts in the Wiki and also tried adding the userscript. As soon as the script is enabled the game freezes.

I am using Google Chrome version 43.0.2357.124 m

Any ideas?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.