Feature - Implemented Adventure GUI should show number of fights, rather than adventures

Magus_Prime

Well-known member
I'm not sure when this started but it worked flawlessly before mid-January. I made two standard HC ascensions and am now adventuring in the Gingerbread city for the first time in since Crimbo Town vanished. I adventured once in the Gingerbread sewers, via the relay browser, and then, via the Adventure tab, I set KoLMafia to automate the next eight adventures in the zone. What happened next is three "Request 1" followed by a "Request 2".

This causes the Noon choice to be missed. The same thing happened yesterday with r17715. Both yesterday and today I performed multiple, different, actions in the relay browser before starting automation.

If I stop automation and then restart automation the turns are properly counted.

The common element between yesterday and today is that the problem occurred with the first adventures automated via the Adventure tab.

Any thoughts?

Code:
Request 1 of 8 (Gingerbread City: Gingerbread Sewers) in progress...

[1546] Gingerbread Sewers
Encounter: gingerbread rat
Strategy: F:\software\Kol\ccs\NuclearAutumn.ccs [default]
Round 0: Arbos wins initiative!
Round 1: Arbos executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos uses the Rain-Doh blue balls!
Round 2: gingerbread rat takes 23 damage.
Round 2: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 2: You gain 10 hit points
Round 2: Arbos casts EXTRACT!
You acquire an item: Source essence
Round 3: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 3: You gain 10 hit points
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with Shattering Punch.
Round 3: Arbos executes a macro!
Round 3: Arbos casts SHATTERING PUNCH!
Round 4: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 4: You gain 9 hit points
Round 4: Arbos wins the fight!
You acquire an item: sprinkles (7)
After Battle: You pull out your smartphone to see what time it is. It's really early!
After Battle: Trobert surveys the scene from your back, and gains 1 Experience.
After Battle: Duke Wonka frolics about chaotically, yipping and yapping.
After Battle: You gain 86 Strongness
After Battle: You gain 36 Enchantedness
After Battle: You gain 45 Cheek

Request 1 of 8 (Gingerbread City: Gingerbread Sewers) in progress...

[1546] Gingerbread Sewers
Encounter: gingerbread pigeon
Strategy: F:\software\Kol\ccs\NuclearAutumn.ccs [default]
Round 0: Arbos wins initiative!
Round 1: Arbos executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos uses the Rain-Doh blue balls!
Round 2: gingerbread pigeon takes 15 damage.
Round 2: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 2: You gain 10 hit points
Round 2: Arbos casts EXTRACT!
You acquire an item: Source essence (2)
Round 3: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 3: You gain 9 hit points
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with Shattering Punch.
Round 3: Arbos executes a macro!
Round 3: Arbos casts SHATTERING PUNCH!
Round 4: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 4: You gain 8 hit points
Round 4: Arbos wins the fight!
You acquire an item: sprinkles (11)
After Battle: You pull out your smartphone to see what time it is. It's really early!
After Battle: Trobert surveys the scene from your back, and gains 1 Experience.
After Battle: Duke Wonka frolics about chaotically, yipping and yapping.
You acquire an item: moist barrel
After Battle: You gain 81 Fortitude
After Battle: You gain 35 Magicalness
After Battle: You gain 54 Roguishness
You gain a Moxie point!

Request 1 of 8 (Gingerbread City: Gingerbread Sewers) in progress...

[1546] Gingerbread Sewers
Encounter: gingerbread rat
Strategy: F:\software\Kol\ccs\NuclearAutumn.ccs [default]
Round 0: Arbos wins initiative!
Round 1: Arbos executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos uses the Rain-Doh blue balls!
Round 2: gingerbread rat takes 18 damage.
Round 2: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 2: You gain 8 hit points
Round 2: Arbos casts EXTRACT!
You acquire an item: Source essence (2)
Round 3: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 3: You gain 8 hit points
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 2-shot with Stuffed Mortar Shell and toy deathbot.
Round 3: Arbos executes a macro!
Round 3: Arbos casts STUFFED MORTAR SHELL!
Round 4: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 4: You gain 8 hit points
Round 4: Arbos uses the toy deathbot!
Round 5: gingerbread rat takes 137 damage.
Round 5: You lose 85 hit points
Round 5: gingerbread rat takes 286 damage.
Round 5: Arbos wins the fight!
You acquire an item: sprinkles (10)
After Battle: You pull out your smartphone to see what time it is. It's mid-morning.
After Battle: Trobert surveys the scene from your back, and gains 1 Experience.
After Battle: Duke Wonka frolics about chaotically, yipping and yapping.
You acquire an item: moist barrel
After Battle: You gain 86 Beefiness
After Battle: You gain 32 Magicalness
After Battle: You gain 53 Roguishness

Request 2 of 8 (Gingerbread City: Gingerbread Sewers) in progress...

[1547] Gingerbread Sewers
Encounter: gingerbread alligator
Strategy: F:\software\Kol\ccs\NuclearAutumn.ccs [default]
Round 0: Arbos wins initiative!
Round 1: Arbos executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos casts CURSE OF WEAKSAUCE!
Round 2: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 2: You gain 10 hit points
Round 2: gingerbread alligator drops 16 attack power.
Round 2: gingerbread alligator drops 17 defense.
Round 2: Arbos casts EXTRACT!
You acquire an item: Source essence (2)
Round 3: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 3: You gain 10 hit points
Round 3: gingerbread alligator drops 15 attack power.
Round 3: gingerbread alligator drops 15 defense.
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 2-shot with Stuffed Mortar Shell and toy deathbot.
Round 3: Arbos executes a macro!
Round 3: Arbos casts STUFFED MORTAR SHELL!
Round 4: Trobert dribbles some juice into your ear, healing you somewhat. I know that doesn't make any sense but give me a freaking break, it is the ghost of a pickle.
Round 4: You gain 9 hit points
Round 4: gingerbread alligator drops 15 attack power.
Round 4: gingerbread alligator drops 17 defense.
Round 4: You lose 7 hit points
Round 4: Arbos uses the toy deathbot!
Round 5: gingerbread alligator takes 44 damage.
Round 5: You lose 45 hit points
Round 5: gingerbread alligator takes 148 damage.
Round 5: gingerbread alligator drops 17 attack power.
Round 5: gingerbread alligator drops 17 defense.
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 2-shot with Saucegeyser and toy deathbot.
Round 5: Arbos executes a macro!
Round 5: Arbos casts SAUCEGEYSER!
Round 6: gingerbread alligator takes 270 damage.
Round 6: gingerbread alligator drops 18 attack power.
Round 6: gingerbread alligator drops 16 defense.
Round 6: Arbos wins the fight!
You acquire an item: sprinkles (102)
After Battle: You pull out your smartphone to see what time it is. It's mid-morning.
After Battle: Trobert surveys the scene from your back, and gains 1 Experience.
After Battle: Duke Wonka frolics about chaotically, yipping and yapping.
You acquire an item: moist barrel
After Battle: You gain 85 Fortitude
You gain a Muscle point!
After Battle: You gain 40 Magicalness
You gain a Mysticality point!
After Battle: You gain 47 Chutzpah

Manual stop requested.
 
Last edited:

Darzil

Developer
You are using free wins, and then asking it to adventure for 8 turns. So the first two used Shattering Punch, so 0 turns used, then it continued to try to adventure for another 8 turns. It is not 8 fights.

Whether it should be, now, is probably a good question. You can't, for example, run 10 fights in Snojo, if you put in 10 it'll do 20, as the first 10 are free. (I often get lazy and put 1, so it runs 11 fights).
 

Magus_Prime

Well-known member
Ah....I should have seen that. Thank you. I think, short term, I will blacklist Shattering Punch with WHAM.

Please change this from a bug to a Feature Request. Said feature would be some way to better account for free wins, or zero turn wins, when automating adventures: SnoJo, Witchess, DMT, Shattering Punch. Are there any that I missed?

I tend to do the same thing with SnoJo automation, put in 1 turn. :)
 
Last edited:

Theraze

Active member
To adventure for a specific number of fights, use adv1 in a for-loop instead of adventure. There is no utterly reliable way to predict free fights that won't be trapped by superlikelies, ultrarare, semirare, wandering monsters, and other unexpected chaos, especially that remains future-proof. However, you can use adv1 to guarantee that you spend the number of fights you expected, especially when you verify wins with run_combat() containing WINWINWIN.
 

Darzil

Developer
Absolutely. I think the suggestion is that the GUI adventure in that way, like a scripted adv1 in a loop.
 

xKiv

Active member
Absolutely. I think the suggestion is that the GUI adventure in that way, like a scripted adv1 in a loop.

But then, IIUIC, adventuring for "*" turns would leave unused turns too often (but it already leaves unused any turns generated after the automation started).
 

Theraze

Active member
I think that changing the behaviour in that way would lead to mass confusion. The whole turnip example.
 

lostcalpolydude

Developer
Staff member
If the GUI is changed, some people will be upset that it no longer has a way to specify adventures to spend. Unless the interface is going to get more options (somehow, I don't have any ideas about it) so you can choose which you want.
 

Veracity

Developer
Staff member
The code was written back when turn-free choices were the only way to skip "turns" in a location. The assumption was that if you wanted to spend 5 adventures there we need to not count those.

So what if you want to use free runaways or a free banish to get rid of one type of monster in a location? Should that count as a "turn"? Right now, it does not: you will continue on until you have your specified number of turns.

The above is current behavior, is expected behavior, and is desirable behavior, in general.

Except when "free wins" - a new KoL concept - are involved.

10 per day in the Snojo.
5 per day in the DMT with a Machine Elf equipped.
One or more in ANY adventure.php location with time pranks.
Busting ghosts in a variety of locations.

The proposal is to recognize a free win and count it as a "turn" in the location? Well, that is what you want in the DMT (especially since a time prank will use up one of your free wins there) or the Snojo or, apparently, in the Gingerbread City (even though time pranks do not show up there and you have to force one.)

I suspect that everywhere else, if you are automating and have a free fight, you are not going to care about exactly how many fights you did. Instead, you will set an item goal and adventure until it triggers.

But, not for me to say how people SHOULD automate. As lost said, there are surely some people who really are automating for a specific number of fights in zones other than the Snojo, DMT, and Gingerbread City.
 

Bale

Minion
What about a checkbox to count fights instead of turns?

It seems that this would be an extremely useful option.
 

Veracity

Developer
Staff member
It would be useful in the Snojo, DMT, and Gingerbread City. Near as I can tell, everywhere else, you care about actual adventures used - if you are counting down to a semirare, say - since free fights are not advancing a "free fight counter" or "fights until noon counter" or such.

What about the "adventure" command in the gCLI? That is what the adventure() ASH function uses.

I assume that adv1() already behaves the way you expect. I'm actually familiar with this, since my script uses adv1 for busting ghosts and the Snojo; I use visit_url() followed by either run_combat() or run_choice() in the DMT.
 

ckb

Minion
Staff member
As a data point, I sometimes use the fact that the CLI 'adventure' command spends actual adventures, not times visited.
I have a consult script that will use a free runaway if available, except for certain whitelisted monsters.
As an example, at the laugh floor, using 3 adventures will kill Carbuncle Top, Larry of the Field of Signs, and Victor the Insult Comic Hellhound, escaping from all the other non-necessary fight.
 

Bale

Minion
It would be useful in the Snojo, DMT, and Gingerbread City. Near as I can tell, everywhere else, you care about actual adventures used - if you are counting down to a semirare, say - since free fights are not advancing a "free fight counter" or "fights until noon counter" or such.

What about the "adventure" command in the gCLI? That is what the adventure() ASH function uses.

I assume that adv1() already behaves the way you expect. I'm actually familiar with this, since my script uses adv1 for busting ghosts and the Snojo; I use visit_url() followed by either run_combat() or run_choice() in the DMT.

I have scripts to run my machine elf, witchess and snojo fights using adv1(). However, if I could tick a checkbox and run them from the adventure frame, I'd consider that a useful feature. One point though, if that feature is implemented I'd like it to default off every single time I start up mafia because it could cause me trouble if I left it on.
 

Veracity

Developer
Staff member
Simple enough - do not connect that checkbox to a setting.

Killing only the "necessary" monsters on the Laugh Floor seems reasonable - if you have pulled 5 imp airs. Otherwise, you'll fail to get the third Azazel item for your steel organ.
 

Veracity

Developer
Staff member
Actually, tying a checkbox to an internal variable - KoLmafia.redoSkippedAdventures - would essentially do exactly what you want.

KoLmafia.java:

Code:
	public static boolean redoSkippedAdventures = true;
...
			if ( isAdventure && KoLmafia.redoSkippedAdventures &&
			     runBeforeRequest == KoLCharacter.getCurrentRun() )
			{
				--currentIteration;
			}
And the ONLY place that sets that variable to false (and restores it when done) is the ASH adv1() function.

Setting that to false will count free fights and 0-adventure choice adventures as using up a "turn".

We'd have to be careful that the checkbox affects only adventuring via the GUI, not via CLI or ASH.
 

ckb

Minion
Staff member
Simple enough - do not connect that checkbox to a setting.
Killing only the "necessary" monsters on the Laugh Floor seems reasonable - if you have pulled 5 imp airs. Otherwise, you'll fail to get the third Azazel item for your steel organ.

Now that HC 2-day is a regular thing, I never both to get the Steel Organ in run. But in aftercore, its easy to setup free runs with a high weight boots and batoomerange and whatever to just kill the 3 necessary monsters. Imp airs come from the mall if necessary :)
 

ckb

Minion
Staff member
As a side request, if we are adding a checkbox to the adventure frame, can we also add an 'adv1' CLI command?
 

Theraze

Active member
You ARE aware you can simply use the ASH command as a CLI command, right?

Edit: Example follows:
> adv1 out knob

Visit to Knob: The Outskirts of Cobb's Knob in progress...

[2] The Outskirts of Cobb's Knob
Encounter: Knob Goblin Assistant Chef
 
Last edited:

Veracity

Developer
Staff member
I have a little GUI solution set up:

Screen Shot 2017-01-23 at 8.59.27 PM.png

There's a little checkbox (with a tooltip, which is showing) which links to KoLmafia.redoSkippedAdventures. Supposedly it has listeners and everything, so it will disable itself while adventuring (via GUI, CLI or ASH) and it will apply to the GUI, whereas "adventure" and "adv1" will set and restore the values they want.

I'm out of adventures until rollover, and this is the kind of thing I'like to actually test, so, patience.
 
Top