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.

Complete Guide to Modding

mount201076mount201076 Posts: 1Member
edited February 1 in General Discussion
(Yes, I'm aware there are threads for this, but they never show you how to modify the game at all, and only mention that it is possible.)
How to begin modifying Nested
  1. Go to the Nested game page on Orteil's site. (Sorry, I tried to post a link, but I'm too new, appearently.)
  2. Right click, and select Save Page As. Download it and drop it in a new directory.
  3. There should be a file titled "Nested.html" and a file named "Nested_files"
  4. To modify the game, you have to find Nestedscript.js in Nested_files.
  5. Open Nestedscript.js in a text editor capable of changing Javascript (A easy way to find out is to open the file and see if the code is highlighted)
  6. Scroll down to "And so, the fun begins!" Orteil has written a simple documentation on how to add new objects here. Follow this documentation, and you should be able to add a new object to the game.
The template for an simple object:
new Thing(name,contains,namegenerator);
Documentation that Orteil wrote:
//How to add a new Thing :
// new Thing(name,contains,name generator);
// -name is the referral name for this Thing. Unless a name generator is specified, this name will be the default name for any instances of this Thing.
// -contains is an array of Things that an instance of this Thing contains, specified by their name.
// -For example, ["banana"] means this Thing contains exactly 1 instance of a banana. ["banana","orange"] means it contains 1 banana and 1 orange.
// -["banana","strawberry,25%"] means it will contain 1 banana, and has a 25% probability of also containing a strawberry.
// -["banana,2-7"] means it will contain between 2 and 7 bananas.
// -[".banana"] will not include a banana in the Thing; instead, the Thing will contain whatever the banana normally contains.
// -["banana",["sugar","honey"]] will include a banana, and either sugar or honey. Unfortunately, this does not work with the format ".sugar" or ".honey".
// -name generator is optional; if specified, the instance of the Thing will be named according to this.
// It can be either an array containing other arrays (the name will be patched up from an element of each array) or an identifier for the Name function, like *BOOK*.
// A name generator of [["blue ","red "],["frog","toad"]] will produce names such as "blue frog" or "red toad".

To add a new thing, scroll down to the bottom of the code, and add the template, modifying the variables "name" and "contains" if you want.
To allow others to use your modification, upload your Nestedscript.js, and share it.
Using Modifications (And also, how to play offline.)
  1. Follow steps 1-3 in "How to begin modifying Nested".
  2. Test that you can open Nested.html (the unmodified game) in your browser (Right click -> Open With -> your browser e.g. Firefox, Chrome)
  3. Download the modifed Nestedscript.js.
  4. Open Nested_files and replace your Nestedscript.js with the modifed Nestedscript.js.
  5. Open Nested.html with the modifed Nestedscript.js to begin playing the modifed Nested.
Post edited by Chisako on
Sign In or Register to comment.