genbtc / AutoTrimps

Automation for the idle incremental game 'Trimps'
37 stars 51 forks source link

Endless farming bug. #51

Open Day-Elven opened 7 years ago

Day-Elven commented 7 years ago

Stuck on one zone for almost 5 hours (!). There are no more weapons to prestige and the fuel in generator has run out which means that I can't progress further at all. P.S. The run have took so much time because there was a long pause at it's start (night sleep). P.S.S. It was corrupted challenge, not daily. http://screenshotlink.ru/aad7a578e8fd04c52864a9b6cad501dd.png

genbtc commented 7 years ago

That means you cant go any farther. If you had the autoportal on Helium/Hr, it would have portaled before then. You are trying to push too far and the script doesnt know why

Day-Elven commented 7 years ago

"That means you cant go any farther." That's what I was talking about.

"If you had the autoportal on Helium/Hr" I don't use anything except He/Hr. Normally portal always activated when He/Hr dropped to 99% of best He/Hr of the current run. The problem is that it did not worked that time as I described in my first message. It should have portaled but it did not. Though this bug happened only once by this moment. In the following two runs portal activated properly.

genbtc commented 7 years ago

so you're saying you had He/hr, 1% Buffer and you went from totally fine to totally stuck in less than 1 zone ?

genbtc commented 7 years ago

I want to see your graphs for Helium per Hour and Clear Time.

Day-Elven commented 7 years ago

Exactly. And I suppose that it may happen with 100% chance if the pause at the start of the run is long enough. I guess it happens because He/Hr does not drop (even by 1%) for a long time in such runs, then you reach zone where you can't progress further and He/Hr starts dropping, but it does not help, because it's too late: portal activates after you complete a zone, but zone can't be completed.

genbtc commented 7 years ago

OK so it was caused by the long pause affecting HE/hr, making the buffer setting incorrect.

Day-Elven commented 7 years ago

Yes, I think so. Buffer setting seems to be very vulnerable to long pauses at the start of the run. http://pp.screenshotlink.ru/v3696/15/q8TkoJcuS1o.png http://pp.screenshotlink.ru/v3696/16/jIKsmrJkeDw.png

genbtc commented 7 years ago

What do you mean by pauses, do you mean you closed the browser and left the game timer running? Or do you mean the game was actually paused ?

Day-Elven commented 7 years ago

Computer was turned off for several hours, i.e. game did not run.

genbtc commented 7 years ago

Sorry, I meant Clear Time #1, not Clear Time #2 (that has a bug as you can see where one spike to 1500 invalidated the graph - So disable the run where that spike came from)

Day-Elven commented 7 years ago

It is not a bug, it's the run where stuck happened =)

genbtc commented 7 years ago

You need to pause your game before shutting the computer or browser down, or else its actually like you're still playing but doing nearly nothing (the game has offline gathering and stuff), and such it has to count towards your HE/hr. If you pause the game it should subtract the time paused.

genbtc commented 7 years ago

No, that is a bug. Show Clear Time #1 graph.

Day-Elven commented 7 years ago

http://screenshotlink.ru/4b6053cfa8fa5ede70fa7058b30c0c5a.png

genbtc commented 7 years ago

Ok. As you can see I am working on "Clear time #2" to support pauses better, but the system is not fully functional. For now, you should pause trimps next time before you shut down, and this will fix the ingame He/Hr from being affected. If you dont, there is no way for the script to know your He/hr got affected by a pause.

The Trimps pause feature (clicking on the timer to make it red) is the solution. It subtracts the time you were paused from all He/hr calculations when you unpause. Therefore the bug would not occur.

Day-Elven commented 7 years ago

Ok, I see, thanks for info. Can script take into account such shut downs in buffer formula and autocorrect it for the current run? And force portal when you can't progress further? Or at least auto-enable pause when you shut down on early zone (offline bonus is almost useless even on high zones, and on low zones it does not help at all).

genbtc commented 7 years ago

Detecting the browser being closed is something for the Trimps game coder to handle. Autotrimps cannot tap into the timer early enough to handle this. Heres why: Trimps records the last time your browser was open. When you shut down, this variable stops updating, and when you re-open Trimps, Trimps loads first and the time gap is calculated for "offline resources" and auto-storage and stuff. Then (a few milliseconds later) the "last time online" is immediately updated to be the current time. By the time Autotrimps loads, (since it loads 2nd) all records of a gap have already been lost.

You have to get into the habit of pausing the game BEFORE you close it. Autotrimps cant solve it. If you want to ask the Trimps games coder on reddit to invent an option where you would rather have it "stop game and Pause timer" when you close the browser instead of have it run in "Offline" mode, that would be up to him.

Day-Elven commented 7 years ago

Ok, I understand how it works a bit better now. I'll try to be more careful with shutdowns, and I hope will be possible to fix stucking in one zone (if it is not possible to fix the reason of this). Thank you for explanations.

genbtc commented 7 years ago

Yes, I will look into "stuck". It will take a lot of work.

LucidCrux commented 7 years ago

Could it just a be a more generic time out? Like each cell resets a clock, if the clock reaches X force a portal. It could also maybe be used to force abandon unique/void maps also if for some rare reason a calculation went wrong and it gets stuck (or is just taking way too long), then have it auto farm for X more runs or something before trying again. I don't know, just some ideas.

genbtc commented 7 years ago

That wouldnt have helped for him because he wasnt stuck on 1 cell. Stuck is a relative term thats not easy to define.

genbtc commented 7 years ago

UPDATED: He/hr AutoPortal Fix - Stuck protection - Allows portaling midzone if we exceed set buffer amount by 5x. (ie a normal 2% buffer setting would now portal mid-zone you fall below 10% buffer).