Bug - Not A Bug Is this behavior…"expected"?

So, in pursuit of a less boring slideshow, I set of with bander in tow, and my "runaway" macro set for auto-attack (KoL macro, not mafia CSS macro), and typed "adventure pirate cove" in the gCLI. mafia subsequently adventured in the cove not once but FOUR times, using 3 free runaways (the 4th adventure was a noncom). Should I have been expecting this outcome?

Code:
> adventure pirate cove

Visit to Island: Pirate Cove in progress...

[3214] Pirate Cove
Encounter: smarmy pirate
Strategy: /Users/nathangsm/Library/Application Support/KoLmafia/ccs/default.ccs [default]
Round 0: morgan blair wins initiative!
Round 0: morgan blair casts RETURN!
Round 1: Frumious Bandersnatch hums a snatch of Ode to Booze and hiccoughs loudly.
Round 1: Frumious Bandersnatch snatches you up in his jaws, tosses you onto his back, and flooms away, weaving slightly and hiccelping fire. You shout "Yeeeeeah!" as the combat becomes a small dot, far below you.

Visit to Island: Pirate Cove in progress...

[3214] Pirate Cove
Encounter: smarmy pirate
Strategy: /Users/nathangsm/Library/Application Support/KoLmafia/ccs/default.ccs [default]
Round 0: morgan blair wins initiative!
Round 0: morgan blair casts RETURN!
Round 1: Frumious Bandersnatch hums a snatch of Ode to Booze and hiccoughs loudly.
Round 1: Frumious Bandersnatch snatches you up in his jaws, tosses you onto his back, and flooms away, weaving slightly and hiccelping fire. You shout "Yeeeeeah!" as the combat becomes a small dot, far below you.

Visit to Island: Pirate Cove in progress...

[3214] Pirate Cove
Encounter: sassy pirate
Strategy: /Users/nathangsm/Library/Application Support/KoLmafia/ccs/default.ccs [default]
Round 0: morgan blair wins initiative!
Round 0: morgan blair casts RETURN!
Round 1: Frumious Bandersnatch hums a snatch of Ode to Booze and hiccoughs loudly.
Round 1: Frumious Bandersnatch snatches you up in his jaws, tosses you onto his back, and flooms away, weaving slightly and hiccelping fire. You shout "Yeeeeeah!" as the combat becomes a small dot, far below you.

Visit to Island: Pirate Cove in progress...

[3214] Pirate Cove
Encounter: A Dreadful Curse
You gain 16 Magicalness

Requests complete.
 

Veracity

Developer
Staff member
Yes. You told KoLmafia to spend 1 turnip adventuring in the Pirate Cove. Running away from a fight does not use a turnip. It was only when you encountered the non-combat that a turnip was consumed.
 

Veracity

Developer
Staff member
That said, I'm not sure you should "expect" it.

When this behavior for auto-adventuring was defined, the following were the situations that needed to be handled.

1) When you adventure in a zone, it takes 1 turn per visit.
2) On the other hand, when you visit the shore, it takes 3 turns per visit.
3) Certain choice adventures - perhaps only the Giant Castle chore wheel, initially - did not consume a turn.

So, consider what you "expect" in the following cases:

- You tell KoLmafia to automate 5 times in the Mispelled Cemetary. There are no choice adventures there, so, KoLmafia visits it 5 times, the adventure counter would tick 5 times, KoLmafia stops automating. Happy? Yes.
- You tell KoLmafia to automate 5 Muscle vacations. KoLmafia takes 5 shore trips, the adventure counter ticks 15 times, KoLmafia stops automating. Happy? Yes.
- You tell KoLmafia to automate 5 times in the Giant's Castle. KoLmafia visits it 5 times, you do not encounter the chore wheel, the adventure counter ticks 5 times, KoLmafia stops automating. Happy? Yes.
- You tell KoLmafia to automate 5 times in the Giant's Castle. KoLmafia visits it 5 times, you encounter the chore wheel one or more times. What to do?

-- KoLmafia notices that the adventure counter did not tick at the chore wheel, so it adventures again. KoLmafia actually ends up visiting the location more than 5 times, but the adventure counter ticks 5 times. This is the current behavior. Happy? I assume so.
-- KoLmafia pays no attention to the adventure counter not ticking and stops after 5 visits, period. The adventure counter has ticked from 0 to 4 times. Are you happy? I would bet not. If, for example, you wanted to actually expend 5 adventures - because a fortune cookie or absinthe counter was due to go off then - you are not ready to respond to the counter.

Things that have been added to the game since that original model was coded.

- Certain zones have been added - The Sea, in particular - that take either one or 2 turns to visit. So, if you tell KoLmafia to visit the Briny Deeps 5 times, what, exactly, do you mean? Do you want the adventure counter to tick 5 times? (What if you are not Fishy and it ticks 6 times?) Or do you want KoLmafia to treat it like the Shore - believe you when you say "go there 5 times"?
- Free runaways. As coded, to KoLmafia, these look exactly like a choice adventure that did not consume a turn. The difference is that it is a fight that did not consume a turn. So, the existing model is that of the chore wheel - if you say "go to the Pirate Cove 4 times, KoLmafia will go there until the adventure counter ticks 4 times.

I imagine we could change the behavior such that fight.php counts as a "visit", whether or not the adventure counter ticks, which retaining the current behavior for choice adventures. However, that still leaves adventure consumption vs. counters non-deterministic: you you want to spend 4 adventures in the Pirate's Cove before going and dealing with a counter, having some of your adventures not actually take a turn because you've set up CCS, consult scripts, or autoattack to make that happen will screw you up.

I'm inclined to tell you to adjust your expectations to agree with the way KoLmafia works, rather than for us to change it to meet your expectations in this case - and screw up expectations in other cases.
 

Bale

Minion
Well, we already have two adventuring functions: adventure() and adv1(). Perhaps it would be a good idea to create a new function called advX()? That function would work like adv1, with an additional parameter to tell it to adventure for multiple adventuers. It would allow a counterscript to fire and so forth, but counts each attempt to visit any location including counterscripts and skipped choice adventures.

That way the newer behavior would exist without losing anything.
 

Winterbay

Active member
Well, we already have two adventuring functions: adventure() and adv1(). Perhaps it would be a good idea to create a new function called advX()? That function would work like adv1, with an additional parameter to tell it to adventure for multiple adventuers. It would allow a counterscript to fire and so forth, but counts each attempt to visit any location including counterscripts and skipped choice adventures.

That way the newer behavior would exist without losing anything.

That would be awesome and I would use it all the time (since that is how I thought things worked when I started using Mafia and is probably the way I'd rather have it work).
 

Ruby Eyes

Member
I recently stumbled over this as well (bye bye smoke bombs), but the "Adventuring" page on the mafia wiki says for adventure(), "Visits the desired location a specified number of times" which should probably say "it visits the desired location until specified number of turns is spent."
I guess that was written before free runaways became popular.

Um ... am I allowed to make changes to that wiki, based on what's been said here by mafia devs?
 

Bale

Minion
Um ... am I allowed to make changes to that wiki, based on what's been said here by mafia devs?

Only if you think that "allowed" means "encouraged". Please! Make any changes you like! Not enough people edit that wiki! If you do something wrong, I don't mind fixing it so that you can learn.
 

StDoodle

Minion
Indeed! I got into a real wiki kick ... er, damn, apparently over two years ago. Anyway, I was really into revamping the ash-related stuff, and shortly after I started Bale & Icon put in a great deal of effort as well (Bale surpassed me shortly after I left, and that's just regular edits, oh gods oh gods the screenshot madness)... but long story cut off to be middling, nobody ever got real excited about fixing some of the subtler issues (it was more of a documenting parameters / datatypes thing). Also, if you're interested in any mafia stuff besides ash, you could find no end of projects on the wiki to help with, if you're interested. Other than Sally's revised guide, not much was done on the non-ash-related front. *sigh*

But anyway, the upshot is edit away! The wiki keeps histories pretty well, so worst comes to worst any "bad" changes should be roll-back-able. If you really find something confusing, you can always ask about it on the talk page (or prolly here, somewhere). Don't worry if something gets changed / tweaked; I do seem to recall every person who was involved had at least one horribly-wrong edit, but it's a wiki, so it can be fixed if that happens. But yeah, any help is much appreciated. :)
 

xKiv

Active member
I recently stumbled over this as well (bye bye smoke bombs), but the "Adventuring" page on the mafia wiki says for adventure(), "Visits the desired location a specified number of times" which should probably say "it visits the desired location until specified number of turns is spent."
I guess that was written before free runaways became popular.

Um ... am I allowed to make changes to that wiki, based on what's been said here by mafia devs?

Turnips, please. Turns reads too much like 1 turn = 1 adventure.
And then make a page for turnip, explain what it is (one non-free visit to the location, in the sense that it costs at least one adventure), why it's called like that (mix of turn (Adventure) and trip (shore trip)) and link it. With an extra clarification that a free runaway doesn't count as a turnip.

(is that right?)
 

slyz

Developer
A choice adventure that ends without consuming a turn counts as a turnip though. Let's say it's because of technical difficulties?
 

slyz

Developer
Oh, I thought those counted, and that's why the current system wasn't really coherent.

Or did we change that?
 

Theraze

Active member
Giant Castle, Spooky Forest, and both of the Gallery non-turn NC adventures don't use a turnip. Validated this week.
 
Top