Bug - Fixed Issues with automated Use the Force choice adventure

Jimmyton

New member
The autoscend people have an issue, tracked here, where kolmafia sometimes seems to drop the ball on handling the choice adventure post Use the Force correctly. Logs at that github, here's some more log:

> [INFO] - Found option for Numberology: 51 (battlefield)
Preference choiceAdventure1387 changed from -1 to 3
> [INFO] - Adjusting to have YR available for War Frat 151st Infantryman: skill Use the Force

and then later

Encounter: War Frat 151st Infantryman
Preference _lastCombatStarted changed from 20200615083352 to 20200615083354
Round 0: Jimmyton loses initiative!
Preference nextAdventure changed from Noob Cave to The Penultimate Fantasy Airship
> [INFO] - auto_combatHandler: 0
Preference auto_combatHP changed from 385 to 623
Preference auto_combatHandler changed from to (pickpocket)
Round 1: Jimmyton tries to steal an item!
Preference auto_diag_round changed from 0 to 2
Preference auto_combatHandler changed from (pickpocket) to (pickpocket)(sk7303)
Round 2: Jimmyton casts GULP LATTE!
Round 3: You gain 14 hit points
Round 3: You gain 279 Mojo Points
Preference _latteDrinkUsed changed from false to true
Preference auto_combatHP changed from 623 to 637
Preference auto_diag_round changed from 2 to 3
Preference auto_combatHandler changed from (pickpocket)(sk7303) to (pickpocket)(sk7303)(yellowray)
Preference auto_yellowRays changed from (1:Knob Goblin Harem Girl:Use the Force:79), (1:Burly Sidekick:Use the Force:189) to (1:Knob Goblin Harem Girl:Use the Force:79), (1:Burly Sidekick:Use the Force:189), (2:War Frat 151st Infantryman:Use the Force:217)
Round 3: Jimmyton casts USE THE FORCE!
Preference lastEncounter changed from War Frat 151st Infantryman to Using the Force
Encounter: Using the Force
> [DEBUG] - Running auto_post_adv.ash
Stack trace:

at main (auto_post_adv.ash:1057)
> [ERROR] - Error running auto_post_adv.ash, setting auto_interrupt=true
Preference auto_interrupt changed from false to true
Preference auto_copies changed from to (2:War Frat 151st Infantryman:Calculate the Universe:217)
Preference choiceAdventure1387 changed from 3 to -1
> [INFO] - Turn(217): Starting with 90 left and 20 pulls left at Level: 11
> [INFO] - Encounter: -15.0 Exp Bonus: 29.150000000000002
> [INFO] - Meat Drop: 236.74964387392123 Item Drop: 245.87482193696061
> [INFO] - HP: 637/637, MP: 454/557, Meat: 11211
> [INFO] - Tummy: 0/15 Liver: 0/15 Spleen: 0/15
> [INFO] - ML: 52 control: 10

The autoscend people seem to think this is a bug of some sort; I'm not familiar with how they're making this happen to be able to go into detail why.
 

Veracity

Developer
Staff member
I can confirm this. This script:

Code:
string property = "choiceAdventure1387";
string previous = get_property( property );
location loc = $location[ The Hippy Camp (Bombed Back to the Stone Age) ];
item saber = $item[ Fourth of May Cosplay Saber ];

try {
    set_property( property, "3" );
    equip( saber );
    string page = adv1( loc, -1, "skill use the force;" );
}
finally {
    set_property( property, previous );
}

yields:

Code:
[color=green]> force.ash[/color]

Visit to Island: The Hippy Camp (Bombed Back to the Stone Age) in progress...

[11596] The Hippy Camp (Bombed Back to the Stone Age)
Encounter: cavewomyn hippy
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Encounter: Using the Force

Requests complete.

[color=green]> ash handling_choice()[/color]

Returned: true

[color=green]> choice[/color]

[b]choice 1[/b]: "I am not the adventurer you are looking for."
[b]choice 2:[/b] "You will go find two friends and meet me here."
[b]choice 3[/b]: "You will drop your things and walk away."

[color=green]> choice 3[/color]

You acquire an item: handful of nuts and berries
You acquire an item: handful of pine needles
It did not automate the choice, even though I had choiceAdventure1387 set to do a yellow ray.
 

Veracity

Developer
Staff member
Code:
[color=green]> force.ash[/color]

Visit to Island: The Hippy Camp (Bombed Back to the Stone Age) in progress...

[11597] The Hippy Camp (Bombed Back to the Stone Age)
Encounter: cavewomyn hippy
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Encounter: Using the Force
You acquire an item: handful of nuts and berries
You acquire an item: handful of pine needles

Requests complete.
Revision 20188
 

Malibu Stacey

Active member
This was also not working in the choiceAdventureScript which is how I was attempting to handle it before setting the choiceAdventure property. The log pasted by Jimmyton was my second attempt at making it work.
Originally we'd set a property named _auto_saberChoice to 1, 2 or 3 in our combat filter function before returning "skill use the force" then in the choiceAdventureScript we'd call run_choice() passing the value of that property (as an int). Neither worked.

Thanks for fixing it so quickly. I've been saying for months someone should come report it here and no one bothered until now. I don't have IotMs on the account I use to test autoscend and it worked fine for me in aftercore when I tried the choiceAdventureScript so I couldn't reproduce it myself to report it.
 
Last edited:

Veracity

Developer
Staff member
I did not test, but a choiceAdventureScript should now work too. The issue was that it was not automating the choice, and that is a style of automating.
 

Malibu Stacey

Active member
Thanks again Veracity. I shall now return to shaking my fist at all the people who kept reporting it was broken and then not reporting it here when told it wasn't something we could fix in .ash.
 
Top