erbkaiser / FrozenCookies

Messing with frozen cookies
33 stars 12 forks source link

Add a customizable order to automatic Season Switcher #67

Open Hringingy opened 2 years ago

Hringingy commented 2 years ago

I would like to request the ability to manually set a specific order to which seasons to switch to at the beginning of a run rather than just letting the autobuy algorithm decide based on cost efficiency of drops. I'm currently manually switching seasons in this order:

  1. Valentines (all heart biscuits can be obtained quickly before the first golden cookie spawns)
  2. Easter (want to farm drops as soon as I start getting golden cookies/research)
  3. Halloween (I keep the game in Grandmapocalypse during the end of my Easter farming)
  4. Christmas (I end Grandmapocalypse and switch my setup to focus on production, farming reindeer cookies passively and with low priority)
erbkaiser commented 2 years ago

This may be difficult to implement in the existing efficiency system, but I'll take a look. The mod is already setup to not pledge if Halloween or Easter are active, and it will swap to Halloween as soon as the Grandmapocalypse start, to minimize time spent in it.

Hringingy commented 2 years ago

Don't know if this is a bug that got fixed, but when I first started using the mod, sometimes when I finished Easter the mod would decide to pledge and start a different season even though auto Easter and Halloween were both enabled. Because of that, I now manually start on Valentines and disable auto Easter and Halloween. I haven't ran into that problem recently though, so I'm not sure how to recreate the problem or if it's even still an issue

Edit: I just tested by starting a new run with old settings and I was able to recreate the problem. I have "A Festive Hat" and "Omlette" as two of my permanent upgrades and enabled Auto Easter and Auto Halloween. The autobuy switched to Easter first, then pledged and started Valentines day even though auto Halloween is enabled. Maybe it was because there were no wrinklers on screen and I had Blacklist set to OFF?

erbkaiser commented 2 years ago

The efficiency code is complex, I haven't quite figured out how the game decides which season to switch to. Auto Halloween and auto Easter are basically hacks. Auto Easter will only kick in if there is a Cookie Storm and you don't have all eggs yet. Auto Halloween will only kick in if the grandmapocalypse is active, so any pledging will prevent it from working. The normal autobuy can still start both, though.

Hringingy commented 2 years ago

I'm saying the autobuy itself decided to pledge out of the Grandmapocalypse and purchase a different holiday even though the Auto Halloween switch was active. I think it had something to do with the final drop for Easter coming from a popped wrinkler, leading to no wrinklers on the screen the exact moment Easter finished and messing things up, but I don't know how the mod checks things.

erbkaiser commented 1 year ago

I have no idea how to do this. The auto buy code is incredibly complex and I can't find how it weighs the seasons.