Anahkiasen / cookie-monster

A rehosted, cleaned up and updated version of the CookieMonster plugin.
31 stars 24 forks source link

This project is not maintained anymore

If you want to fork it and continue the legacy, you can, but I just recommend to switch to CookieMaster which now greatly surpasses Cookie Monster in terms of UI and features.

Cookie Monster Build Status

Cookie Monster is a plugin 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.

This is a helper, and it is here to help you at 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

You can see the current version, and a full history of all versions and what they changed by consulting the Releases page.

What it does

At its core, Cookie Monster computes two indexes on both buildings and upgrades :

Cookie Monster also indicates the time left before being able to buy an upgrade or building, and takes it into consideration. It will take everything in consideration, meaning if buying a building also unlocks an achievement which boosts your income, which unlocks an achievement, it will know and highlight that building's value.

Both these indexes are computed for buildings and upgrades. If the relevant option is enabled, it will color-code each of them based on their value :

Note : for both these indexes, lower is better, meaning a building with a BCI of 1 is more interesting that one with a BCI of 3.

What it doesn't do

Most likely you'll find items in grey like Golden Cookie upgrades, clicking upgrades – everything that doesn't earn you a direct bonus to your income will display as grey. This means the following upgrades are not taken into account by Cookie Monster :

Do note though that, although these upgrades have no direct value, if buying them earns you an achievement of some sort which in return gives you milk and income, Cookie Monster will display that value.

Using

Bookmarklet

Simply use like the previous plugin, create a bookmark and set this as the URL. Then when in the game, click on that bookmark.

javascript: (function () {
  var jA = document.createElement('script');
  jA.setAttribute('type', 'text/javascript');
  jA.setAttribute('src', 'http://cookie-monster.autopergamene.eu/cookie-monster.min.js?' + new Date().getTime());
  document.body.appendChild(jA);
}());

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 plugin as a script via, for example, Greasemonkey or Tampermonkey, you can use the following script, which will automatically load Cookie Monster every time the original game loads. You may need to specify http://orteil.dashnet.org/cookieclicker/ when asked for a namespace or Includes. For how to add an userscript to your browser, refer to your browser/plugin's documentation as the method changes for each one.

// ==UserScript==
// @name        Cookie Monster
// @namespace   Cookie
// @include     http://orteil.dashnet.org/cookieclicker/
// @version     1
// @grant       none
// ==/UserScript==

var init  = Game.Init;
Game.Init = function() {
  init();
  (function () {
    var jA = document.createElement('script');
    jA.setAttribute('type', 'text/javascript');
    jA.setAttribute('src', 'http://cookie-monster.autopergamene.eu/cookie-monster.min.js?' + new Date().getTime());

    document.body.appendChild(jA);
  }());
}

Bugs and suggestions

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

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 http://cookie-monster by http://dev.cookie-monster in the bookmarklet above. If the bug is still here, you can submit an issue for it.

All suggestions are welcome, even the smallest ones.

Contributing

All edits must be made to the develop branch, that's where the latest version of the code is.

To contribute to the project, you'll find the files you want to edit in src/, split by what the methods are related to. If you're not familiar with Git, the simplest way to contribute is to go into a file, click the Edit button at the top, edit the code, and click on "Propose file change".

Setup the repository

If you are familiar with git, simply click the "Fork" button at the top of the page. You'll be redirected to your fork of the repository. Copy its address in the right side bar. Then clone the repository and install the dependencies :

# Clone repository
git clone https://github.com/YOURNAME/cookie-monster.git
cd cookie-monster

# Install dependencies
npm install
bundle install

You'll need NPM for that, if you don't have it, you can find a one-click installer on NodeJS's website or if you're more familiar with development and have per example Homebrew, you can just do brew install node or on a Linux distrobution such as Ubuntu, apt-get install npm nodejs-legacy or equivalent. Other dependencies (as named on Ubuntu 13.10) include ruby2.0 and ruby2.0-dev.

If you don't have bundle run gem install bundler.

Editing

Make the edits you want in the src/ folder.

Compiling and sending

Then rebuild the assets by running Grunt :

./node_modules/.bin/bower install
./node_modules/.bin/grunt

Test your changes by hosting a local http server with the contents of the dist directory and using a modified bookmarklet such as

javascript: (function () {
  var jA = document.createElement('script');
  jA.setAttribute('type', 'text/javascript');
  jA.setAttribute('src', 'http://localhost:8000/cookie-monster.min.js?' + new Date().getTime());
  document.body.appendChild(jA);
}());

Next you can commit your changes and push :

git commit -m "Edited some stuff" src
git push origin master

Once that is done, go back on Github where your fork is, and create a pull request from there.

Contributors