prinzstani / CookieBot

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

Always show What is the bot doing #96

Open SnowSquire opened 11 months ago

SnowSquire commented 11 months ago

I'm running a 24/7 cookie clicker stream and having the what is the bot doing panel open would be nice

prinzstani commented 11 months ago

For me, it works to just have the mouse hover over the version. Why is this problematic for you?

SnowSquire commented 11 months ago

I'd like an option to keep it open all the time, because if the bot goes through a prestige or some other action like that. The panel won't be showing after its done, because this is a 24/7 afk stream I can't just re-move the mouse to show it.

prinzstani commented 11 months ago

I understand. I do not think this is something we want to implement in the bot, but I can give you a hack to achieve it.

Simply type in the console (you get there by typing F12) the following command: setInterval(function(){Game.tooltip.draw(l('versionNumber'),AutoPlay.whatTheBotIsDoing,'this')}, 10000); This will activate the message of what the bot is doing every 10 seconds, so you lose it at most 10 seconds.

Hope that helps.

SnowSquire commented 11 months ago

Alright thank you very much, your work on this bot is very admirable.

prinzstani commented 11 months ago

On second thought, we might want to implement this in the standard cookie clicker. There have been some people who have asked to get an overview of the current activity. We keep this and try to implement it for everyone, maybe just with the code given above.

SnowSquire commented 11 months ago

That code probably won't be good enough for an active player because trying to read the tooltip of anything else will be replaced by the bots progress

prinzstani commented 11 months ago

Exactly. The handling of active players can be done by choosing a long interval to present the bot tooltip. Then it disappears whenever the user comes to another tooltip. I have tried it for my run and it seems to work out. However, there is also the issue that the bot tooltip currently is on top of the dragon and Christmas display - this would have to be changed.

SnowSquire commented 11 months ago

https://youtube.com/clip/UgkxGveqrXODf9kPAB1MiyNAGMXYq5LDyiqy?si=9Mhxf2YnGIHGRz_A

That's not what I mean, the progress tool tip will replace what ever tooltip is hovered over

prinzstani commented 11 months ago

The code only displays the progress tooltip once every 10 seconds. If you are playing actively, and hover over something, then this other tooltip appears until the progress comes up. Moving your mouse will again activate your tooltip. In active play, I assume you are moving the mouse frequently, thus replacing the progress tooltip frequently. In normal play, you do not read the tooltips for an extended period of time, do you? Activating the progress every 60 seconds gives you 30 seconds on average to read your tooltip - which should be plenty.