Bug - Fixed Choice Handling and Goal not quite working as expected.

I can see that this is marked as fixed, but I am still experiencing some kind of infinite loops in r12720 when it comes to goals in non-combats.

Playing turns in the relay browser and clicking the AUTO action button to proceed to goals in several non-combats results in infinite loops. Extract from the gCLI below, the loop only ended when I clicked the AUTO button a few more times.

[3153] The Spooky Forest
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Arboreal Respite
Encounter: Consciousness of a Stream
Encounter: Consciousness of a Stream
Encounter: Consciousness of a Stream
 

Attachments

Last edited:
What relay script are you running? I need to see it in order to understand how it is being invoked when you click the AUTO button.

Code:
Executing top-level commands
Executing main function
   [NORMAL] <- ""
      Param #1: responseText
      [NORMAL] <- ""
      Param #2: visit_url()
         Entering function visit_url
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to choice.php...

Requesting: http://www.kingdomofloathing.com/choice.php?action=auto%3Fwhichchoice%3D502&option=2&pwd
 
And while we're at it, what are your Arboreal Respite choice settings:

get choiceAdventure502
get choiceAdventure503
get choiceAdventure504
get choiceAdventure505
get choiceAdventure506
get choiceAdventure507

And what "goals", if any, did you have set in the AdventureFrame of the GUI?
 
choiceAdventure502=2
choiceAdventure503=0
choiceAdventure504=0
choiceAdventure505=2
choiceAdventure506=3
choiceAdventure507=1

No goal set in the adventure tab. As for a relay script, I am not using anything as far as I am aware.

The 'runscript' dropdown contains Bumcheekascend, AdventureAdvisor, Planner and WHAM, but all those have to be started manualy I thought?
 
You are definitely running a relay script; the part I extracted from your DEBUG log was the execution of an ASH script invoking visit_url() on choice.php.

The dropdown is, in fact, relay scripts - but "relay scripts" also include "relay override" scripts for specific KoL pages.

What ASH files do you have in your relay folder?

What do you get for this:

get masterRelayOverride

(If there is a file listed for the last one, let's see it.)
 
No result for masterRelayOverride.

Edit:
And having separate mafia folders is the easiest way to get confused which one you ran.
I'm terribly sorry, the relay scripts on the instance that made the debug log are different:

clan_raidlogs
topmenu (altered version of Bale's)
choice
fight


Could the reason be choice.ash (fight.ash does the same after battles)?

Code:
void main() {

	buffer responseText;
	append(responseText, visit_url());

	matcher findEnd = create_matcher("(Adventure Again:.+?)<td height=4></td>", responseText);

	if (findEnd.find()) {
		string replaced = replace_first(findEnd, findEnd.group(1) + "<td height=4 style=\"text-align: center; padding-top: 5px\">[<a href=\"/forestvillage.php?action=floristfriar\">manage plants</a>]</td>");
		write(replaced);
	}
	else {
		write(responseText);
	}
}
 
Last edited by a moderator:
It's definitely the choice.ash causing this and I suppose it started with the place.php change.

I'm truly sorry for bumping the topic and wasting your time.
 
I still want to investigate and understand why it loops - and if there is anything KoLmafia should be doing differently.

I'll check it out tomorrow. Thanks.
 
r12726

Contrary to advice above, I set the eXtreme Slope Duffle adventure choice to show in browser, and autoadventured, expecting it would stop when the Duffle came up and I could get a jar if it was there and stop regardless. KoLmafia just breezed right through the adventure and did not stop. Is this the expected bahavior or should I plan on trying again tomorrow and getting a debug log?

Thank you.
 
Did you have the goal set to get jar? If so, then it will ignore your setting, choose to get the jar, see that choice wasn't there and leave instead.
 
Exactly. As I have said repeatedly in this thread, setting the jar of frostigkraut as a goal is pretty much guaranteed to be exactly what you do NOT want to do.
 
Did you have the goal set to get jar? If so, then it will ignore your setting, choose to get the jar, see that choice wasn't there and leave instead.

Absolutely not. Sorry I forgot that in my post.

What I want to do is adventure until I either get the jar or I know it won't drop today. The easiest way to do that is just to stop at the adventure, under the assumption that the choice will be there if it is available. That also seems what a naive user might try to do.
 
I got into a loop at the eXtreme slopes yesterday after updating mafia from r12712 to r12722. I had the first 3 choice adventures set to "complete outfit" and the fourth set to "jar of frostigkraut". I didn't have any goal set.

Code:
[57467] The eXtreme Slope
Encounter: Yeti Nother Hippy
Took choice 15/4: complete the outfit
choice.php?whichchoice=15&option=4&pwd
Encounter: Yeti Nother Hippy
Took choice 15/4: complete the outfit
choice.php?whichchoice=15&option=4&pwd
Encounter: Yeti Nother Hippy
Took choice 15/4: complete the outfit
choice.php?whichchoice=15&option=4&pwd
Encounter: Yeti Nother Hippy
Took choice 15/4: complete the outfit
choice.php?whichchoice=15&option=4&pwd
Encounter: Yeti Nother Hippy
Took choice 15/4: complete the outfit
choice.php?whichchoice=15&option=4&pwd
Encounter: Yeti Nother Hippy
Took choice 15/4: complete the outfit
choice.php?whichchoice=15&option=4&pwd

That continued until I quit mafia. Neither the esacape key or clicking on Stop Now in the main i/f window had any effect. This script had worked fine until yesterday's upgrade and I didn't make any changes to the script. So I think something in one of those changes caused this change in behaviour in my script.
 
Last edited:
Revision 12733 should fix both issues.

(Was it really necessary to point to this bug over in an unrelated Feature Request?)
 
Absolutely not. Sorry I forgot that in my post.

What I want to do is adventure until I either get the jar or I know it won't drop today. The easiest way to do that is just to stop at the adventure, under the assumption that the choice will be there if it is available. That also seems what a naive user might try to do.

Or just setting your goal to 1 choiceadv. So that after it happens, whatever the results, it lets you decide if you want to continue. :)
 
Or just setting your goal to 1 choiceadv. So that after it happens, whatever the results, it lets you decide if you want to continue. :)

Interesting. Subtle difference, perhaps?

Setting the choice to show in browser will stop before the choice is made and make you do it manually. Setting a goal of one choice adventure will perform whatever action was set for the choice adventure and then stop. Correct? I save one click, at the cost of having to be looking somewhere else to find out if I got a jar, or not.
 
Revision 12733 should fix both issues.

(Was it really necessary to point to this bug over in an unrelated Feature Request?)

I'll apologize for that last point. I used the current thread as an example in a philosophy discussion of labels.
 
I believe that Veracity was commenting on Ethelred crossposting and pointing out the bug report of 33 rather than just making a it into a new thread (and not making post 33) or leaving the new post to stand on its own.

And yes... though if you do happen to get a different choiceadv first, you may need to run it again. Of course, with the noncombat queue, it's easy to script now... just run it for 1 choiceadv and check if the desired choiceadv was the most recent in the queue. If it was, then that means that you're done. If it wasn't, just loop and adventure again. You don't even need to actually check to see if it happened. Unless you're not wanting to try for more. :)
 
I believe that Veracity was commenting on Ethelred crossposting and pointing out the bug report of 33 rather than just making a it into a new thread (and not making post 33) or leaving the new post to stand on its own.
This is exactly right. I had already read Ethelred's note here - and was starting to look into it - and when I went over there, I read an unnecessary "go look at the bug report I made over there, in case you didn't see it" - which was quite different than frono's "philosophical point", which I had no problem with.

Regarding setting a goal of 1 choiceadv - there are 4 possible choices on the eXtreme slope. If you want to stop for the first one, whatever it is, sure - 1 choiceadv would do. But if you want to stop for Duffel on the Double and not the others, either set that one to Manual Control or use an after-battle script of the sort I posted.
 
Back
Top