Cookie Clicker

Cookie Clicker

410 avaliações
CookiStocker | Automatic Stock Market Trading mod
Por Gingerguy e 1 colaborador(es)
Incredibly effective stock trader, available in local mod, workshop item and console script form.
7
7
8
4
3
5
2
2
   
Premiar
Adic. a Favoritos
Nos Favoritos
Desfavoritar
What is this?
This is a mod that will automatically trade the Stock Market for you.

*
* - this footage is sped up about 5000 times.

Over a typically short length of time, this mod will easily get you the achievements Liquid Assets (profit 10 million $econds, or $10 million) and Gaseous Assets (profit 1 year of $econds, or $31.536 million), the latter of which is currently the rarest Cookie Clicker achievement of all time. The current version of this mod is capable of achieving Gaseous Assets in under two days of continuous runtime; even if you don't level up your buildings as described in the section below labeled Increasing the Mod's Efficiency, you should still be able to achieve Gaseous Assets within three days, as long as you follow the other guidelines within that section.

If you find this guide outside of Steam - It has been copied without our permission. Click this link to see the most up-to-date original guide.
Installation
Option zero: Subscribe to the mod on Steam Workshop
- Workshop page -

This is by far the best way to get the current version of this mod, and to have it automatically updated in your game when new releases come out.

Option one: Install the mod
- Download CookiStocker 2.0 - [drive.google.com]

To install the mod, extract the archive into your mod directory (...\Steam\steamapps\common\Cookie Clicker\resources\app\mods\local). Restart your game, go to Options -> Mods -> "Manage mods", and enable CookiStocker.
You should be greeted by the Stocker when you press "Restart with new changes".

Option two: Run the script from the console
- Pastebin with the console script 2.0 -[pastebin.com]

If you do not want to install the mod, open your console, copy the whole script from the Pastebin, paste it into the console, and then press Enter. Please note that if you choose this method, you will have to repeat it every time you restart the game if you want to continue using the mod.

Instructions on how to open the console in the Steam version of the game can be found here. Be sure to follow this method if you are running the Steam version of Cookie Clicker, as simply setting the variable DEV to 1 at the beginning of the file will have the side effect of disabling Steam achievements.
How it works
Version 1.6, which until recently was the current version of CookiStocker, used a fairly basic trading algorithm based only on mode changes. An excellent (though slightly dated) explanation of how the stock market works can be found in the Steam Guide entitled Ultimate Stock Market Guide (WIP for v2.048). This guide is somewhat more up to date than the information found in the Cookie Clicker Wiki[cookieclicker.fandom.com].

Version 2, which is now the current version of CookiStocker, uses an algorithm that takes into account not only mode changes, but short term changes that occur while the mode stays the same. It also fixes a number of bugs. Finally, it handles boundary conditions intelligently, buying whenever a stock falls below $2, never selling when a stock is below $11, and being cautious about stocks selling for high prices.

The internal workings of CookiStocker 2.0 are covered in much more detail in the discussion The Trading Algorithm. A new and improved trading algorithm is currently being worked on, and will be present in CookiStocker 3.0.
Options
To access options, open the main.js file inside the mod folder. You will see all of the avaliable options at the start of the file.
Some options can either be turned on or off by writing "true" or "false" respectively, and some require a number.

Here are the current options:

• Toggle the Trading State
Toggles the mod between being active and inactive. Default - on . It hasn't been implemented yet, so right now it does nothing.

• Transaction Notifications
Turns on/off the notifications for every transaction. Here are examples of the types of transactions you will see; you can click on them to get a larger image displayed. (Default - on.)





Note that all notifications are now timestamped, using a 24-hour clock. This should make it a lot easier to see what happened when.

Both the buy and sell notifications refer to the stock's current mode, as well as its previous mode if the stock was bought or sold at a mode transition. Modes, along with many other details of the inner workings of the stock market, are explained in depth in the excellent Steam Guide Ultimate Stock Market Guide (WIP for v2.048). CookiStocker uses slightly different names for the modes than the Guide, but there are no "official" names. What's most important to remember is that even though "rapidly rising" means that most of the time the stock in question will be rapidly rising, this is not always true (which the Guide acknowledges), and sometimes the stock price may steadily fall in this mode.

The same goes for all the other modes as well. That's why you may see CookiStocker buying a stock that's in "slowly falling" mode or selling a stock that's in "rapidly rising" mode; if you look at the stock graphs in the main stock market display, you will see that in cases such as these, the actual stock movement is In the opposite direction than the one that the mode name would imply.

Users of previous versions of Cookie Stocker will notice that stock transactions occur much more frequently than they did before. Fortunately, the game limits the number of transactions displayed at one time to five, with earlier transactions being stacked. If this obscures your screen too much, though, you may simply want to disable notifications and turn on the console (see below), as the console contains all the information contained in the notifications and much, much more.

CookiStocker now makes an important distinct between profits and revenue. The number displayed as "Profits" in the upper left of the main stock market display is actually just the total amount of money generated by the stock market, with or without this mod. Whenever you buy a stock, the total purchase price of your stock is immediately subtracted from this number, even though you haven't actually suffered any losses. That's why in the early stages of play this number is always negative, and it explains CookiStocker's opening message of "click clack you are now in debt".

With CookiStocker 2.0, for the first time there is a way of seeing what your actual profits and losses from individual stock trades are. Profits are defined in the usual way as the stock sell price minus the stock buy price, all times the number of units (or shares) sold. If this number is negative, it is called a loss. Revenue is the total amount of money received for selling a stock, and it is always positive. It is this revenue figure that is added to the "Profits" number shown in the upper left of the main stock market display. Over time, as your true profits grow, total revenue and total profits tend to converge.

• Activity Report
Toggles the activity report (shown below). Default - on.



• Activity Report Frequency
Controls the frequency of the activity reports described above, as well as the corresponding activity report if console announcements are turned. on. If the Activity Report option is turned off but console announcements are turned. on, then this interval will still control the frequency of the periodic activity summary shown on the console. See the thread New Changes and Additions to the Console Output for an example of this console output; the first part of the output shows an example of the console output that occurs after every tick, while the second part, which occurs about a third of the down with the line that begins "Running", shows an example of console periodic activity summary. For those people who want to closely monitor stock market activity, setting this value to one minute can be very instructive. Note that if you reduce Loop Frequency from its default (see below), Activity Report Frequency should be set to be the same as Loop Frequency. Default value for Activity Report Frequency - 60 minutes.

• Fast Notifications
Makes the mod's notifications fade away quickly on their own. If you have 'Fast notes' option of the base game turned off, then the notifications will stay up until closed manually. Default - off

• Console Announcements
Shows more info about the algorithm's logic in the game console. See the Discussion thread New Changes and Additions to the Console Output for full details. Default - off

• Loop Frequency
This option controls the frequency at which the algorithm looks at the market.

The market itself updates every 60 seconds, so it is set to 30 seconds (30000 in milliseconds) to make sure the logic triggers every update no matter when the mod initialized. However, if the option Force Loop Updates is turned on (see below), then CookiStocker will be running the stock market, typically at a faster tick rate, and the market's tick length will be set to the value of Loop Frequency.

• Force Loop Updates
When this option is turned on, CookiStocker runs the stock market at the frequency specified by Loop Frequency, as noted above. Normally, this is done to speed up the stock market. Doing so is a blatant cheat, however, and in future versions of CookiStocker, setting this option to "true" will disable Steam achievements.
Increasing the Mod's Efficiency
Before you launch, be sure to:
  1. Check if you are running the latest version of the mod.
    The algorithm is constantly being improved, so using the most recent version will guarantee that all discovered bugs and suboptimal expressions are fixed and optimized.

  2. Max out your brokers.
    Obviously, they will increase the efficiency of your trading. For the best results with this mod, it is recommended to have at least 100 brokers. Playing with fewer than 80 brokers can seriously cut into your profits. Keeping your brokers at the maximum limit you can afford is the easiest way for the advanced player to maximize stock market profits using this mod.

  3. Leave enough spare cookies in the bank.
    The bot will try to buy as much stock as it can when it detects an opportunity, so make sure you have the cookies to fill up your warehouse. A good rule of thumb is that your bank should have at least a million seconds of CPU production before you enable CookiStocker. For those who are good at generating combos, a good time to enable CookiStocker is after your first major combo. Alternatively, if you can buy 100 brokers at once without diminishing your bank by more than a few percent, you should have plenty of cookies for stock market play.

  4. Level up your offices.
    Warehouse space is very important if you do not want to wait hours to sell 100 shares of stock. If you want to get the best results, you should focus your lumps on getting cursors to level 12. Upgrading your cursors to level 20 also improves the productivity of clicking once the heavenly upgrades Aura Gloves and Luminous Gloves are acquired, but this does not directly impact the stock market.

  5. Level up your bank.
    Increasing the bank level by one increases the resting value of all stocks by one and the bank ceiling of all stocks by three. (See the Steam Guide Ultimate Stock Market Guide for more details of the function and importance of these values.) Getting the bank level to level 10 should be high on your priority list, but not as high as raising your cursors to level 12 (or to level 20, as described in the previous section). Raising the bank level is the most powerful way of raising the earnings potential of the stock market, and the effects described above apply even when raising the bank level past level 10. Before going past level 10, however, it's best to level up the rest of your buildings, as described in the next section.

  6. Level up the rest of your buildings
    Finally, level the rest of your buildings as much as you are able to, up to level 10. For the stock market, the best strategy is to level up your buildings evenly rather than get each of them to level 10 before moving on to the next. This former strategy will give you the most building levels for your sugar lumps early on, and it will also ensure that your resources are spread out evenly among your stocks, thus reducing large fluctuations due to overconcentrating in just a few stocks.

  7. Run your game at full speed.
    Although many people know that the game "runs" more slowly when it is closed, and that many features simply aren't updated then, few people know that the game runs slower any time it's not in focus. In other words, if you want to use your computer interactively for anything else other than playing Cookie Clicker, the game will slow down, even if it's running. This can severely affect stock market returns, cutting them by up to 90% or more. To eliminate this behavior (the only downside is that your computer will be slightly more loaded), follow the directions in the Steam Guide How to fix the game pauses when minimized, which fixes this problem completely. Note that this problem affects the game at all times when it doesn't have focus - not just when it's minimized.
All of the previous steps can be done before you start running the mod. In contrast, the following, final step needs to be done only at the end of an ascension.
  1. Turn off the mod and sell all your stocks before ascending.
    For now, "turning off the mod" means disabling it. An option to simply turn it off without disabling it will be added in CookiStocker 3.0.

    In order for this strategy to be useful, you must have unlocked but not purchased the Chocolate Easter Egg. Typically, experienced players store this egg in their vault until the end of an ascension. By selling all your stocks, you increase the base value upon which the total number of cookies resulting from the purchase of the Chocolate Egg is based. This in turn increases your prestige level when you next ascend. The result is that taking the step of selling all your stocks gives you a permanent boost in your prestige level that persists across ascensions.
Troubleshooting & FAQ
Q: The mod is not doing anything; have I installed it correctly?
A: That can be easily checked by checking the Mod Manager menu. If it does not show up there, then you did not install it properly.
Check that you have unarchived the folder properly, the directory should look like Steam\steamapps\common\Cookie Clicker\resources\app\mods\workshop\CookiStocker with main.js and info.txt in it. The version of the mod installed by Steam when you subscribe to the mod can be found in Steam\steamapps\common\Cookie Clicker\resources\app\mods\workshop\CookiStocker.

Q: The mod is installed correctly, but it is still not doing anything.
A: If it shows you this notification when launched - that means it has initialized and is working.



Q: Why does this mod keep losing money for me?
A: Actually, it doesn't. The "Profits" number in the upper left of the stock market display is unfortunately misnamed, but as this is implemented in the main Stock Market minigame by Orteil, I cannot change it without causing a lot of confusion. What is called "Profits" is actually "Revenue". Whenever you spend money to buy stocks, that investment is subtracted from this "Profits" number. So everyone starts out negative until they start selling stocks at a profit. That's why when you get the notice "CookiStocker is ready," the subtext says, "click clack you are now in debt."

You can see a more detailed explanation of all of this in this post from this discussion that is linked to from the main CookiStocker 2 mod page. This includes pictures of the coming statistics. A brief summary of the true profits is also displayed once an hour via a notification. You can currently get full statistics by turning on the "Console Announcements" option in the mod; see this section above for how to do this.

Notice also that while stock market profits add to your current prestige just like any other income, stock market losses do not subtract from your prestige. (Nothing in the game subtracts from your prestige.) Since your cookies don't persist across ascensions but your prestige does, this makes your stock market proceeds more valuable than they may seem at first.

Q: I closed the game. Will it remember the purchases it made?
A: Not yet; this capability will be coming in CookiStocker 3.0. For now, the results of the first few minutes of trading may be less optimal than once the mod gets fully underway.

Q: Does this mod conflict with any other mods?
A: No conflicts have been detected with any popular mods, and there is no reason to expect that this will happen in the future.

Q: What effect do the Supreme Intellect and Reality Bending dragon auras have on this mod's performance?
A: Although Supreme Intellect (and to a much lesser extent, Reality Bending) makes the stock market more chaotic (in Orteil's words), extended tests have shown that this additional chaos does not affect the performance of this mod in any detectable way. For detailed information on how these two dragon auras affect the stock market's performance in general, please see the section "Supreme Intellect & The New Meta (WIP)" in the Steam Guide Ultimate Stock Market Guide (WIP for v2.048), and/or the section "With Supreme Intellect" in the Stock Market[cookieclicker.fandom.com] page of the Cookie Clicker Wiki.

Q: Does the stock market work any differently in Cookie Clicker version 2.052 versus version 2.048?
A: No.

Q: Does this mod disable Steam achievements?
A: No.



If you are still having issues - write a comment below.
If the mod is working correctly - write a comment as well and show off your success.
Changelog
Please see the thread Changelog in the Discussion section of the Workshop page.
Feedback
Feel free to ask any questions you have about the mod in the comments, I will try my best to answer all of them.
Do not hesitate to show off your achievements and milestones as well.

Help me gather statistics!
Take a quick survey[forms.gle]

Keep up with CookiStocker's development
There is once again new development happening with CookiStocker! You can keep up with all new development and contribute to ongoing discussions in the Discussions tab on the CookiStocker mod page. Development of CookiStocker is currently being handled by z.

Make sure to check out Gingerguy's other scripts:


- CookiWizord | Automatic spellcasting mod





- CookiAscender | Automatic ascention script
386 comentários
sadsugarshio 17 dez. 2024 às 13:25 
i was messing around with the settings because i was curious on how you created the gif and forgot to back up my save. is there a way i can reenable achievements or did i just screw myself over?
z  [autor] 20 out. 2024 às 19:03 
jag - At the beginning of the Options section from which you quoted, there is the following text:

"To access options, open the main.js file inside the mod folder. You will see all of the avaliable options at the start of the file.
Some options can either be turned on or off by writing "true" or "false" respectively, and some require a number."

This is the options mechanism I inherited from Gingerguy. I plan to turn these into standard Cookie Clicker options at some point, but it may take me a while to get around to it.
jag 20 out. 2024 às 7:03 
Where do I find this?

"With CookiStocker 2.0, for the first time there is a way of seeing what your actual profits and losses from individual stock trades are. Profits are defined in the usual way as the stock sell price minus the stock buy price, all times the number of units (or shares) sold. If this number is negative, it is called a loss. Revenue is the total amount of money received for selling a stock, and it is always positive. It is this revenue figure that is added to the "Profits" number shown in the upper left of the main stock market display. Over time, as your true profits grow, total revenue and total profits tend to converge."

I can't find this menu ingame???
z  [autor] 25 ago. 2024 às 9:43 
Sorry about that - and thanks for letting me know! I just fixed it; so it should work fine now.
goofierknot 24 ago. 2024 às 8:59 
Hey, just so you know, in your pastebin script [pastebin.com], the script itself is doubled, so every variable at the top is immediately reset to what the second part has set. This can be found on line 462.
z  [autor] 27 jul. 2024 às 15:53 
Yes, all the options, include one for turning the mod on and off, are planned to be implemented as standard Options buttons. Unfortunately, my available free time is quite limited right now, so it may take a little while.
Thing 1 5 jun. 2024 às 10:39 
Seems to run well after some setup! I'm sure this suggestion has been made before, but a mod menu would be a big QOL boost. It's not a huge deal turning it off through the "Manage Mods" button, but a simple switch to toggle trading would be even better!
z  [autor] 4 mai. 2024 às 11:31 
albeontop - You haven't actually lost any money. The "Profits" number in the upper left of the stock market display is unfortunately misnamed, but as this is implemented in the main Stock Market minigame by Orteil, I cannot change it without causing great confusion. What is called "Profits" is actually "Revenue". Whenever you spend money to buy stocks, that investment is subtracted from this "Profits" number. So everyone starts out negative until they start selling stocks at a profit. That's why when you get the notice "CookiStocker is ready," the subtext says, "click clack you are now in debt."

I will shortly be fixing the documentation to clarify this point, adding it to the FAQs. I will also be adding some addition output to the stock market display itself showing what the true profits and losses actually are.
z  [autor] 4 mai. 2024 às 11:31 
[continued]
You can see a more detailed explanation of all of this in this post from this discussion that is linked to from the main CookiStocker 2 mod page. This includes pictures of the coming statistics. A brief summary of the true profits is also displayed once an hour via a notification. You can currently get full statistics by turning on the "Console Announcements" option in the mod; see the main article above for how to do this.
albeeontop 3 mai. 2024 às 22:05 
ive gone from 0 profit to -40k?