anahkiasen / cookie-monster Goto Github PK
View Code? Open in Web Editor NEWA rehosted, cleaned up and updated version of the CookieMonster plugin.
A rehosted, cleaned up and updated version of the CookieMonster plugin.
Sometimes when buying something (at least buildings) the value calculations get messed up. In my game Farms usually end up appearing super cheap compared to the other buildings, with a much lower BCI number than they actually have, and the other buildings and upgrades (Including some that are normally gray) are also artificially low.
This (almost?) always goes away the next time CPS changes (purchase, frenzy, etc. - But not wrinklers), until the next time it randomly happens.
(Note: I originally assumed that this was linked to the freeze that happened as part of #25, but that issue has been fixed (for me at least) and this issue remains.)
It may still be more common when buying multiple buildings rapidly, but that is not a necessary condition, I am confident that I have seen it happen on single isolated buys.
First of all: you've achieved a great job. This is a very useful add-on.
My request concerns a different way to count remaining time until player can purchase an upgrade or a building. Currently, "time left" indicator does not count the amount of cookies sucked by the wrinklers. This is why, when all ten wrinklers are up, "time left" goes twice as slow.
I know that cookies sucked by wrinklers may be lost if I set a covenant for example. Even though, I think it would be interesting to take into account, to calculate the "time left" indicator, the actual number of cookies in bank, plus the cookies I will benefit from popping all the wrinklers (i.e. cookies sucked + bonus)
This way, I can determine easily if it is the right time to pop some wrinklers to buy an upgrade/a building.
This change of algorithm in the calculation could also be freely configured in the "menu" page.
If you move your mouse over a purchased upgrade (in the "Stats" tab), the pop-up has the "Purchasing this will put you under the number of cookie required for etc." warnings.
Once I buy Elder Pledge, any action I took afterwards causes the game to go back into Grandmapocalypse mode and the Elder Pledge upgrade comes back. This includes, so far, clicking a golden cookie/heart and buying a building.
The "Bugs and Suggestions" section says:
"Before submitting a bug, make sure to give a shot at the latest version of the plugin on the develop branch. For this, simply replace master by develop in the bookmarklet above. If the bug is still here, you can submit an issue for it."
I understand what you're trying to do here but 'master' doesn't appear anywhere in the userscript or the bookmarklet.
I would like to try out the develop branch to see if my other issue is fixed but the directions don't seem to give me that option.
Chrome, OS X
Uncaught TypeError: Cannot read property 'style' of undefined
http://code.lancepollard.com/github-as-a-cdn/
I've noticed quite a few sites linking to the raw file directly from a non Github Pages repository branch like this:
http://github.com/viatropos/cached-commons/raw/master/javascripts/jquery/jquery-1.4.2-min.js
This seems like a good idea but it's not. When you request the raw file like that, you're not directly accessing the file from the filesystem! You're going through layers of application code too, which will definitely slow your site down. Don't do that. Instead, create a gh-pages branch, and load it from there like this:
http://viatropos.github.com/cached-commons/javascripts/jquery/jquery-1.4.2-min.js
That reads directly from the file system.
Would you consider a pull request to change scientific notation rendering from, e.g.:
1.2 * 10^15
to the more compact
1.2E15 ?
Can someone please add documentation to the Readme about how to build and load a private copy of Cookie Monster? When it was all one file on Pastebin I had a private fork, but I don't know how to do that now.
Even a simple change like adding '|| name == "Cookie Baker"' isn't something I would want to submit without the ability to test it! And I do want to contribute more than that (there are several fixes and features I think I could code myself if I could test them)
Thanks for the great work you're doing.
EDIT: Another bug i just found... Bonus Income calculations for the Trilliion Fingers Upgrade is definitely wrong... it says the BI is 8,192... here's a save so you can check.
MS4wNDAzfHwxMzg4NTkwNDAzNDk5O05hTjsxMzg4NTk3MDAyOTE3fDExMTExMTExfDI1ODA5MTkxODgyMTE2NjQuNTszMzgzODY1NDc3MDQ3ODczLjU7NTM3OTs2Njc2OzUxMzMwNzQ3NjkxNi42ODEzNDsxOTUzMTstMTstMTs1MjM1NjMxMTUxMzQ0MTcxMDAwMDsxOzA7MDswOy0xOzY7NDA7Mjk5MTU0MTU3NzY4MDAxLjk0OzA7MTM7NDF8MTIwLDEyMCw1Mjg1MTM3ODQsMDsxMzYsMTM2LDI4MzA0NzAxODg3LDA7ODQsODQsMTI3NTkwNDAsMDs3Miw3MiwyNjYzODQyOCwwOzY4LDY4LDg2Mzk4NzQzLDA7NjIsNjIsMTMwNjE3MzQ1LDA7NTksNTksNDQ2MjIwMzczLDA7NjMsNjMsODk1MjcwODc4NCwwOzQ2LDQ2LDcxMTk2MDg1MzM2LDA7MzcsMzcsNTE0NDk2NDEyOTI3LDA7fDQ1MDM1OTk2MjczNTQxMTE7NDUwMzE4NzMxMDUxMDA3OTsyMjY5MzkxOTk5NzI5NjM5OzM5NDA2NTI3ODYxNTM5ODM7MjQ0MDM2NjA2NDMxNTI5NTs0MjIyMDEyOTgyMDM0MDkxOzU4NDA0ODQ0MzM3MXw0NTAzNTk5NjI3MzcwNDk1OzIzOTI0Njg1ODI1NjM4Mzk7MTMxMDcx%21END%21
When you start a new game (through "wipe save") and buy a cursor, instead of the cursor's first two upgrades getting unlocked, the first two upgrades for every building gets unlocked. These unlocks have also been found to follow into a new save, but wiping the save again clears them until a cursor is bought.
It should also be noted that the achievements for one building bought are also unlocked as well. When you buy your first cursor, you get the "double click" achievement. Apparently, with cookie monster installed, the game thinks it has one of each building from the start of the game while not really having the buildings. CPS is not altered by this bug in any way besides CPS gained from milk multipliers. Screenshots are below.
This one shows the achievements earned. The CPS ones go up to 10,000,000; or the output of a single prism.
This shows the upgrades unlocked. Note that each of these upgrades are unlocked by owning a single building of its type, and the kitten is unlocked by reaching 13 achievements.
It seems to somehow change the cost of changing seasons instantly to prices well over 1e+23 and only increases from there. After running for 5 minutes the prices change from that to 1e+63. Assuming its due to the April Fools Business season update
When following the README directions to run grunt, I receive the following errors. I was wondering if anyone had run into this problem and solved it. I was hoping to help troubleshoot the most recent break involving tooltips. If this is not the proper place to bring up this problem, I apologize.
[USERNAME cookie-monster]$ ./node_modules/.bin/grunt
Running "compass:compile" (compass) task
error dist/sass/styles.scss (Line 21 of dist/sass/helpers/_variables.scss: I nvalid CSS after "...reen : #76B7E1 ": expected "}", was "!global;")
identical styles.css
error dist/sass/colorblind.scss (Line 21 of dist/sass/helpers/_variables.scs s: Invalid CSS after "...reen : #76B7E1 ": expected "}", was "!global;")
identical colorblind.css
Compilation took 0.724s
Warning: â Use --force to continue.
Aborted due to warnings.
Found on version 1.040.11.
I currently have all upgrades and cookie-monster does not see the correct increase for purchasing portals.
Cookie-monster says bonus income for my 176th portal is:
148.292 M
But it actually is:
703 841 114.4
It seems that some upgrade is not calculated correctly.
Since the Easter update, I had been getting large numbers of notifications of seasons starting and stopping.
But then a few hours ago, Cookie Clicker started giving these notifications continuously. I've tried reloading Cookie Clicker, and Cookie Monster, also exporting and re-importing my game save, but nothing helps.
I'm new to CM and thought I'd give it a try.
I created a bookmarklet with the javascript code as described at http://cookieclicker.wikia.com/wiki/Cookie_Monster_%28JavaScript_Add-on%29#Bookmarklet.
I then went to the tab where I was playing CC (http://orteil.dashnet.org/cookieclicker/), and clicked on the new bookmarklet. I got a mysterious "These aren't the droids you're looking for" message. No clue whether that meant that my version of CC was too new for CM, or vice versa, or what. By looking at the minified CM source code it seems to have something to do with the document title (which in my case contains "Cookie Baker" but not "Cookie Clicker"), or more directly, it has to do with 0===this.$game.length.
I looked at the wiki page referenced above to find out whether CM is supposed to support CC classic, or the beta, or both, but I couldn't find that information.
First of all, great addition. Very useful.
The Cookies Sucked stat is miscalculated. The "up to 6x stacking effect" of wrinklers is counted in here, while it should be counted in the Reward of Popping stat only.
As you can see, no matter how many wrinklers you have on screen, the Reward of popping stat is always 1.1x the Cookies sucked... which is the benefit of a single wrinkler.
Hope i've explained myself. :)
I believe I've found a fix for the latest CookieMonster freeze. I was about to submit a pull request for review, but saw that the contribution guidelines wanted me to run grunt test
So I ran the following, and received an error. Any ideas?
$ ./node_modules/.bin/grunt test
Running "mochaTest:dist" (mochaTest) task
>> Mocha exploded!
>> Error: BLANKET-Error parsing instrumented code: TypeError: Property '$' of object #<Object> is not a function
>> at /home/user/cookie-monster/node_modules/blanket/src/index.js:167:35
>> at Object.blanket._blanket.instrument (/home/user/cookie-monster/node_modules/blanket/src/blanket.js:125:17)
>> at Object.require.extensions..js (/home/user/cookie-monster/node_modules/blanket/src/index.js:148:25)
>> at Module.load (module.js:356:32)
>> at Function.Module._load (module.js:312:12)
>> at Module.require (module.js:364:17)
>> at require (module.js:380:17)
>> at Object.<anonymous> (/home/user/cookie-monster/tests/tests.js:25:17)
>> at Module._compile (module.js:456:26)
>> at Object.Module._extensions..js (module.js:474:10)
Warning: Task "mochaTest:dist" failed. Use --force to continue.
Aborted due to warnings.
For items like Antimatter condenser which are at the bottom of the list, the pop-up with the building info falls off of the bottom of the window making it unreadable.
//C# Pseudo Code
private static int SecondsLeft(double cost, double cookiesInBank, double rewardsFromPopping, double wrinklerCPS)
{
var cookiesNeeded = (cost - cookiesInBank - rewardsFromPopping);
var secLeft = Math.Ceiling(cookiesNeeded / wrinklerCPS);
return secLeft;
}
edit (bug found): It came to my attention that the current Cookie Monster displays Time Left without even considering wrinklers. Even if you have 10 wrinklers and your income is 50% less, it will display the same amount of time as if you had your unwithered cps still. This is incorrect info as there are only 2 situations that are correct:
Would like to add that I don't think anyone would intend not to ever pop wrinklers, so I think #2 should be default. Not sure why #1 would ever be desired.
We are not allowed to run the script via Github anymore, another place to host the script is needed soon.
Achievements are unlocked by CookieMonster's simulateBuy function and never reversed.
As described by @progheal in another thread:
/quote
When Cookie Monster try to calculate the benefit of a building or upgrade, it will actually buy it, see how much cps it gained, and then sell it. If the buy action have side effect (eg. gain an achievement like having 100 building, or in this case, buying Chocolate Egg gives you 5% of your bank), that side effect will not be reversed. I think this is the root cause.
This is also why the achievements like 100 building will unlock with one fewer building when you use Cookie Monster. A rather special case is the achievement 'Just Wrong' which is unlocked when you sell a grandma; if you haven't unlock this achievement, you will unlock it a little while after you load Cookie Monster.
/unquote
Note: The Chocolate Egg side effect has already been addressed in #53
The Valentine's day update appears to break a lot of features in cookie-monster.
Those are just a few things I've noticed.
Not sure if it's just me but everytime I try to to buy an upgrade with cookie monster running it takes the cookies from me but doesn't give me the upgrade. It seemed to be working fine yesterday it's just today. I'll do some more testing see if it might be something else.
I just started using the newest version from this project and it says all buildings except antimatter condensers are far better than they really are. it estimates the bonus income for any building to be roughly 40B, compared to 57B for the antimatter condensers.
Running the current version of CM on Clicker 1.0414 ("not fooling anyone") results in the cookie count not updating (even if the Short Numbers option is changed; it stays on the short scale). Numbers on buildings cycle as normal but do not update when clicked (neither cost nor count). Interestingly, with ROI/BCI enabled, the "best" building changes when a building is clicked. Also, the bottom bar keeps correct track of all its values, but also seems to believe no cookies are being generated ("Time Left" does not update).
Tooltips that normally pop up when hovering over clickable items do not appear.
The green text used is too similar to the yellow text to be able to be distinguished by color blind people. An easy improvement that would help some people would be to darken the green, like to #00BB00. (I believe right now it's #00FF00). A better solution would be to provide some other visual indication or pick a different color entirely. I think best practice would be to find a color scheme that works for everyone, but if that's not possible, a color blind setting could be added that changes green to blue or something.
Elder Covenant does not function at all when Cookie Monster is loaded in Cookie Clicker v.1.0411. When purchasing it, it immediately becomes available for purchase again, and does not set "appeased" status. Sometimes "Elder Covenant" and "Revoke Elder Covenant" will be available for purchase at the same time.
More dangerously, every time an attempt to made to purchase "Elder Covenant", the new stat that tracks the number of season changes is incremented by 5. I'm using this page to see that stat:
https://dl.dropboxusercontent.com/u/73817062/cookies/cookies.html
This is dangerous because it prevents actual season changes from being feasible. The cost of season changes is exponential based on this stat, so mashing the Elder Covenant button a lot of times will actually result in the cost of season changes becoming "Infinity" as shown in the attached image (I took the screenshot with Cookie Monster disabled, but the damage was already done).
Before purchasing the "Specialized Chocolate Chips" the tooltip shows the information about them, just how it is supposed to be. (http://puu.sh/k4E2n/9d0f64bf49.jpg) After purchasing the upgrade (left-click) the tooltip is not updated and stil shows the "Specialized Chocolate Chips" although it should show the tooltip for the grandma-upgrade. (http://puu.sh/k4E4l/22f621739a.jpg) The tooltip is not updated when moving the mouse without leaving the icon, but shows the proper tooltip after leaving the icon and reentering it.
Maybe this helps: After creating a screenshot with the screencapper "puush" by using the Ctrl + Shift + 2 shortcut the tooltip updated.
Hi,
for various reasons I'm using Firefox 15, and there is no menu for the Cookie Monster. Everything else works fine, but I cannot access these settings. Any ideas on this?
Lots of changes including a whole new building:
Next cookie timer is often way off. I witnessed golden cookies appearing while the timer had around 400 seconds left without golden cookie upgrades, with the upgrades it's a magnitude lower - about 50 seconds.
Same error occured with next reindeer timer before the big update, and presumably still does (I just cannot check it now).
On a related note, when a timer is high (several hundred seconds), its bar has a grey part on the left. Not sure if it's intended.
Personally, I prefer the Short Numbers option that is offered by Cookie Clicker natively (which displays shortened numbers in full, eg. "273.013 quintillion") to the more heavily abbreviated options that are offered by Cookie Monster's Short Numbers feature (eg. "273.013 Qi"). However, since Cookie Monster's Short Numbers feature overrides the standard option, it is impossible to access this style of display while Cookie Monster is running.
Perhaps an extra setting could be added to Cookie Monster's Short Numbers feature which matches the standard abbreviation style, or else the "OFF" setting could be changed to a true passthrough where the settings for the native Short Numbers option are reflected.
I found the Chocolate Egg upgrade, and decided not to buy it until I was ready to reset, as that's the best time to use it.
When I left Cookie Clicker running for several hours and came back, my total Cookies had shot up to well over a Decillion, buying the Chocolate Egg stops the madness, but sadly too late for my game.
Purchasing these two Christmas season upgrades results in them still staying in the store. After purchasing Santa's Dominion, I noticed that the price of other upgrades definitely went down.
So, you can purchase them, the effects will occur but they will not get removed from the Store and they will not show up on Upgrades on the Stats page.
I was able to truly purchase these two upgrades by reloading Cookie Clicker without running Cookie Monster. I suppose that the issues on these two upgrades are caused by the price reduction on buildings.
Anytime my CPS changes (buying something, frenzy, clot, etc.) the UI freezes for several seconds. (Not good for catching reindeer!) and If I am trying to buy multiple buildings (also sometimes when not) then it is likely to not finish the calculations properly and point to the wrong thing as 'best' until it recalculates again.
I can deal with this now since I am at the endgame and only need to buy things rarely and one at a time, but when I reset this will make Cookie Monster unusable.
Chrome 32.0.1700.102
As of 4/4/14, the game just completely stops when I load cookie monster. I'm running it in Chrome 33.0.1750.154 (currently up to date). Here's the error message from the console:
Uncaught TypeError: Cannot read property 'style' of undefined main.js?v=1.517:2467
Game.tooltip.update main.js?v=1.517:2467
(anonymous function) cookie-monster.min.js?1396706053718:4
(anonymous function) VM4550:16
Game.Loop Game.Loop main.js?v=1.517:5345
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.