Code Monkey home page Code Monkey logo

Comments (9)

eya4 avatar eya4 commented on September 3, 2024

This fixes itself if you just click the cookie once, but then you can't get the True Neverclick achievement.

from cookiebot.

prinzstani avatar prinzstani commented on September 3, 2024

Yes, this is because it is difficult to find out whether the game is loaded or not. Currently, we check for the first achievement to be present, which is not when you start a new one.
Two options around:

  1. Use the stable (not the beta).
  2. click some cookies, load the bot, and wipe save to start fresh

from cookiebot.

eya4 avatar eya4 commented on September 3, 2024

Maybe check for the name achievement? Most people will get it shortly after starting a playthrough.

from cookiebot.

prinzstani avatar prinzstani commented on September 3, 2024

The trouble is that the bot should be able to start from a clean state where NOTHING is yet done.
Finding any won achievement is not possible in this situation.
The right way to do it is to wait some time and then just start the bot.

from cookiebot.

Kikithecat12345 avatar Kikithecat12345 commented on September 3, 2024

Maybe we can check if it's a new save? If it's a new save, wait 5-10 seconds, then start the bot. (to make sure it's loaded)
Another thing to consider is if there is a way to hook into the existing start routine with a callback to the main loop of the bot. If there is, we could use that instead.

from cookiebot.

prinzstani avatar prinzstani commented on September 3, 2024

I probably should mention that this is related to issue 79.
We want the bot to wait until the game is finally loaded.
One would hope that this is indicated by Game.ready, but it is not.
So I check whether Achievement 0 is won yet, which is not the case in a blank game.
Actually, there is nothing I can see that we can check to distinguish a blank game from a game that is not loaded yet.
Maybe it is possible to check whether Game.Achievements is non-empty.
Anyway, my current plan is to delay the start of the bot only 3-5 times with increasing intervals (i.e. 10-20 seconds).
If this is a clean game, 20 seconds should be no problem. If this is an existing game, it will have started now.

I have also checked the MODDING API, but it is also relying on Game.ready.

from cookiebot.

Kikithecat12345 avatar Kikithecat12345 commented on September 3, 2024

A blank save will (besides the name bytes) always show the same pattern. If you set the name to something known, then get the exported save, we can check against a blank save with the same name. We can then set the name back, and start the bot based on that.

from cookiebot.

prinzstani avatar prinzstani commented on September 3, 2024

That seems possible. I tried to avoid looking into the save because it seems like quite some work.
I consider this a minor problem, as it only happens when the bot is started from scratch.
My solution would still be to restrict the length of the waiting, which seems simple enough.
BTW, the problem only happens with the beta bot.

from cookiebot.

prinzstani avatar prinzstani commented on September 3, 2024

new fixed with stable release

from cookiebot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.