prinzstani / CookieBot

Automatic Playthrough for Cookie Clicker
GNU General Public License v3.0
51 stars 34 forks source link

Option to slow down the bot slightly #68

Open Kikithecat12345 opened 3 years ago

Kikithecat12345 commented 3 years ago

Could you add an option which, when ascending, waits either a small amount of time or for the FPS to increase to normal (I find that on my computer the ascension animation is very laggy) This would help with watching the bot as it usually is in and out of the ascension screen. Obviously this wouldn't be necessary if you wanted to just leave the bot running on it's own but I find watching the bot to be kind of fun.

prinzstani commented 3 years ago

I am not quite sure I understand what you want to achieve. The bot has some waiting period during the ascension, but what is it you want to see?

Kikithecat12345 commented 3 years ago

The bot does all of the stuff it needs to do when ascending fast enough to where it reincarnates before the FPS can recover.

prinzstani commented 3 years ago

The ascension sequence is something like this: 1) The bot determines it wants to ascend. 2) The bot waits for all activities that would be harmed by ascend (like the garden). 3) The bot does a few ascend-related closings (harvesting plants, popping wrinklers, selling goods, chocolate egg). 4) Ascend starts for the game. 5) The bot buys heavenly upgrades if possible and selects ascension mode and its new goal. 6) The game goes back to normal. 7) The bot commences normal play.

Which part do you want to change and how?

Kikithecat12345 commented 3 years ago

Here is what I mean:

  1. The bot determines it wants to ascend.
  2. The bot waits for all activities that would be harmed by ascend (like the garden).
  3. The bot does a few ascend-related closings (harvesting plants, popping wrinklers, selling goods, chocolate egg).
  4. Ascend starts for the game. New Step: Pause the bot until the FPS reaches 20 or so.
  5. The bot buys heavenly upgrades if possible and selects ascension mode and its new goal.
  6. The game goes back to normal. (I assume this means it reincarnates?) New Step: Pause the bot again until the FPS reaches 20 or so.
  7. The bot commences normal play.

Why I'd like to do this is so that when watching the bot you can actually see what it is doing in the ascension screen. Currently, the ascension screen takes a few seconds to actually load, and during that time the bot buys all of the ascension upgrades and reincarnates. By the time the loading finishes, and the FPS is at a reasonable number, the bot has already reincarnated. This also happens when you press reincarnate and the bot immediately starts clicking the cookies and buying upgrades in the few seconds that the screen is loading.

If you need further clarification let me know.

prinzstani commented 3 years ago

Thanks for the clarification. That should be a simple change to make. However, we do not want this to happen when the bot tries to get 1000 ascends - in this case, it wants to be as quick as possible. I will have a look at it when I resume working on the bot - currently, there are other pressing issues. You can use the following hack to make it work for you: 1) increase the waiting time after reincarnation by changing the number in the first line of doReincarnate into something like AutoPlay.delay = 1000; 2) increase the waiting time after ascend by adding a line at the end of AutoPlay.doAscend before the line including Game.Ascend(true); Again, something like like AutoPlay.delay = 1000; will do.

As I said, this will delay the "1000 ascends" achievement considerably, but otherwise, it should be fine.

Kikithecat12345 commented 3 years ago

Thanks for considering my suggestion- For the 1000 ascends the bot could probably ignore the user's option anyway.