Feature - Implemented Choice Adventures during login should let user complete manually & then finish login

Veracity

Developer
Staff member
Choice Adventures during login should let user complete manually & then finish login

Over on G_D, this thread says that when KoLmafia is redirected to palinshelves.php during login, it autofills the correct items and continues. (Actually, that's not what the note says, but based on the described behavior, it seems to be what happened.) I don't think that's a bad thing, but it is related to the general "what happens when we get an unexpected redirect during login"? problem.

For example, in that same thread, sfwarlock whined that "Mafia login does too much. I still recall when our cagebait on a hamster run logged back in with mafia and it cheerfully chewed him loose...". That reminded me of a previous bug report on that same issue which says that you should set your choice adventure setting to "manual" and KoLmafia will show it in the relay browser during login.

I don't think that's actually correct. I set my Airship choice adventure (the combat/chest/stats one) to manual, found it, logged out, and logged back in, and saw this in the CLI:

Retrieving character data...
Manual control requested for choice #182
Manual control requested for choice #182
Manual control requested for choice #182
Manual control requested for choice #182
Manual control requested for choice #182
Manual control requested for choice #182
Manual control requested for choice #182

0 prices updated from http://kolmafia.us/scripts/updateprices.php?action=getmap
09/28/11 01:22 PM - Click here to continue in the relay browser.
09/28/11 01:22 PM - Click here to continue in the relay browser.
09/28/11 01:22 PM - Click here to continue in the relay browser.
09/28/11 01:22 PM - Click here to continue in the relay browser.
09/28/11 01:22 PM - Click here to continue in the relay browser.
09/28/11 01:22 PM - Click here to continue in the relay browser.
09/28/11 01:22 PM - Click here to continue in the relay browser.
None of those "click here"s were actually active. When I manually opened the relay browser, I saw the choice and made my choice. When it completed, KoLmafia left me partially initialized: it did not visit my terrarium, and so on.

This contrasts with how we handle combats encountered during login, as of hola's revision 8965:

Give user manual control of fight sequences that occur as the user is logging in. Refresh session after the fight-on-login completes.
I suggest that we should give the user manual control of a redirect to a choice adventure during login and complete the login after the user completes whatever needs to be done - including chains of choice adventures, if needed. Perhaps we could do the same for ANY unexpected redirect, like palinshelves.php and things of that ilk (are there others?) if we can detect, somehow, when they are "complete".
 

slyz

Developer
r9853.

I tested it once, and it worked. Mafia did print a debug log while logging on though:
Code:
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.KoLmafiaGUI$FrameConstructor.run(KoLmafiaGUI.java:455)
	at net.sourceforge.foxtrot.AbstractWorkerThread$1.run(AbstractWorkerThread.java:40)
	at java.security.AccessController.doPrivileged(Native Method)
	at net.sourceforge.foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:36)
	at net.sourceforge.foxtrot.workers.MultiWorkerThread$1.run(MultiWorkerThread.java:51)
	at java.lang.Thread.run(Unknown Source)
but I guess that also happens when logging on to a fight. I'm currently in a gnomad sign, and KoLmafiaGUI.java:455 is where Mafia checks main.php to see if the beach is available so it can retrieve information from the microbrewery.

I'm not sure why the NullPointerException though.
 
Top