Bug - Waiting for Info Tracking issue with Dance Counter and Leaflet Quest ?

Darzil

Developer
Got an odd one. Been powerlevelling from level 8 to 10 in the Ballroom using Dance Cards as I got them. When I hit level 9 and used the Strange Leaflet (using the Quest link in Mafia to automate it wit Stats), the Dance Card counter counted down twice, so was then incorrect.

After [395], used Dance Card. Counter reads [3]
After [396], hit level 9, Counter reads [2]
Read Strange Leaflet, with Stats, Counter reads [0]
After [397], Counter vanishes.
[398] Rotting Matilda!

Other than that, the Dance Card counter, which I saw many times, was steady as a rock.

Running version 9581.
 
Last edited:
Is it possible your charpane didn't refresh properly for a few adventures? For the last several months I've had anywhere from minor to severe issues with not getting charpane updates. I've seen this happen without mafia and using only the normal interface (and in IE and Opera), so my issue at least I think is an issue with KoL or my connection. In my case it can mean things like mafia thinks only 393 turns have passed, when really 395 have passed, and so it doesn't decrement any counters. And my buff durations aren't changed, either, sometimes leading me to mistakenly think certain ones are still running. Using a dance card and then getting a charpane refresh in that situation will cause mafia to decrement those 2 extra adventures, since as far as it is concerned two more adventures must have occurred somewhere.
 
EDIT: Disregard this post.

In addition to possible Matilda-counter issues, there has also been some weirdness with Matilda lately. In the past 2 runs, I have had Matilda over-ridden by something other than Bees. I never left the Ballroom in either run. This run, Matilda was overridden by the organ choice adventure (not B flat). Last run, it happened twice, but I can't remember if both were replaced by the organ choice or with 1 noncom/1 combat. Someone in chat also mentioned having 3 missing Matilda's.

I guess it's not the same as the OP since OP mentioned the counter correct for the other times.
 
Last edited:

Veracity

Developer
Staff member
It's also hard to understand how the Leaflet could lose turn counters, since KoLmafia never "counts down" counters based on such-and-such an action. It changes them after getting a CharPane refresh that indicates that turns have passed since the last refresh.

After [396], hit level 9, Counter reads [2]
Read Strange Leaflet, with Stats, Counter reads [0]
After [397], Counter vanishes.

In other words, after you do [396], Mafia knows your next adventure will be [397] with counter = 2.
After you run the Strange Leaflet and you got stats, I expect a CharPane refresh happened. Since KoL's turn counter on that page is the same as the previous one - which we know, since the next adventure is still labeled [397] - we shouldn't have touched the counters at all.

Puzzling.
 
In addition to possible Matilda-counter issues, there has also been some weirdness with Matilda lately. In the past 2 runs, I have had Matilda over-ridden by something other than Bees. I never left the Ballroom in either run. This run, Matilda was overridden by the organ choice adventure (not B flat). Last run, it happened twice, but I can't remember if both were replaced by the organ choice or with 1 noncom/1 combat. Someone in chat also mentioned having 3 missing Matilda's.

I guess it's not the same as the OP since OP mentioned the counter correct for the other times.

I'd wager you're having charpane refresh issues, as well. We'd probably need to see all the stuff in the mafia log for those turns and the ones immediately before to see if that's the case.
 

Darzil

Developer
I'd wager you're having charpane refresh issues, as well. We'd probably need to see all the stuff in the mafia log for those turns and the ones immediately before to see if that's the case.

Well, not sure it helps much, as it doesn't show what mafia thought the counter was. This could well be a one off oddity.
Code:
[394] Haunted Ballroom
Encounter: zombie waltzers
Round 0: darzil wins initiative!
Round 1: Gron is just skin and bones.  Well, slime and slime, technically, but still -- you should feed him!
Round 1: darzil tries to steal an item!
You acquire an item: ballroom blintz
Round 2: zombie waltzers takes 6 damage.
You lose 15 hit points
Round 2: darzil casts ENTANGLING NOODLES!
Round 3: darzil attacks!
Round 4: darzil casts CANNELLONI CANNON!
Round 5: zombie waltzers takes 112 damage.
Round 5: zombie waltzers takes 8 damage.
You lose 15 hit points
Round 5: darzil casts CANNELLONI CANNON!
Round 6: zombie waltzers takes 176 damage.
Round 6: darzil wins the fight!
You gain 127 Meat
After Battle: Gron hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: dance card
You gain 3 Strongness
You gain 13 Mysteriousness
You gain a Mysticality point!
You gain 15 Sarcasm

use 1 dance card

cast 1 Cannelloni Cocoon
You gain 48 hit points

[395] Haunted Ballroom
Encounter: zombie waltzers
Round 0: darzil wins initiative!
Round 1: Gron is just skin and bones.  Well, slime and slime, technically, but still -- you should feed him!
Round 1: darzil tries to steal an item!
You acquire an item: dance card
Round 2: darzil casts ENTANGLING NOODLES!
Round 3: darzil casts CANNELLONI CANNON!
Round 4: zombie waltzers takes 144 damage.
Round 4: darzil attacks!
Round 5: zombie waltzers takes 13 damage.
Round 5: zombie waltzers drops 2 attack power.
Round 5: zombie waltzers drops 1 defense.
Round 5: darzil wins the fight!
You gain 151 Meat
After Battle: Gron hops around, dancing a jig accompanied by wet squelching noises.
You gain 7 Fortitude
You gain 6 Enchantedness
You gain 20 Chutzpah

[396] Haunted Ballroom
Encounter: Curtains
choice.php?pwd&whichchoice=90&option=2
You gain 76 Roguishness
You gain a Moxie point!
You gain a Level!
You acquire an item: strange leaflet

Leaflet inv

Leaflet open mailbox

Leaflet take leaflet

Leaflet open door

Leaflet east

Leaflet take sword

Leaflet west

Leaflet north

Leaflet cut hedge

Leaflet take stick

Leaflet west

Leaflet light stick

Leaflet east

Leaflet north

Leaflet kill serpent

Leaflet open chest
You acquire an item: Frobozz Real-Estate Company Instant House (TM)

Leaflet look behind chest

Leaflet look in hole
You acquire an item: grue egg

Leaflet south

Leaflet south

Leaflet east

Leaflet examine fireplace
(You see a model ship inside a bottle)

Leaflet yoho
You gain 200 Strongness
You gain some Muscle points!
You gain 200 Mysteriousness
You gain some Mysticality points!
You gain 229 Cheek
You gain a Moxie point!

Leaflet examine fireplace
(You see a model ship inside a bottle)

Leaflet examine tinder

Leaflet light fireplace

Leaflet take boots

Leaflet wear boots

Leaflet west

Leaflet south

Leaflet south

Leaflet south

Leaflet south

Leaflet east

Leaflet north

Leaflet south

Leaflet west

Leaflet north

Leaflet up

Leaflet take egg

Leaflet throw egg at roadrunner

Leaflet down

Leaflet move leaves

Leaflet up

Leaflet throw ruby at petunias

Leaflet read scroll

Leaflet GNUSTO CLEESH
You learned a new skill: CLEESH

Leaflet up

Leaflet CLEESH giant

Leaflet take ring
You acquire an item: giant pinky ring

feed 1 ring of aggravate monster to Slimeling (estimated 8.0 charges)

[397] Haunted Ballroom
Encounter: zombie waltzers
Round 0: darzil wins initiative!
Round 1: Gron is just skin and bones.  Well, slime and slime, technically, but still -- you should feed him!
Round 1: darzil tries to steal an item!
Round 2: Gron sniffs around, looking for something to absorb.
Round 2: zombie waltzers takes 6 damage.
You lose 16 hit points
Round 2: darzil casts ENTANGLING NOODLES!
Round 3: Gron leaps on your opponents, sliming them for 18 damage.  It's inspiring!
Round 3: zombie waltzers takes 18 damage.
You gain 18 Mojo Points
Round 3: Gron's starting to look a little thin. 
Round 3: darzil casts CANNELLONI CANNON!
Round 4: zombie waltzers takes 92 damage.
Round 4: Gron leaps on your opponents, sliming them for 29 damage.  It's inspiring!
Round 4: zombie waltzers takes 29 damage.
You gain 29 Mojo Points
Round 4: Gron's starting to look a little thin. 
Round 4: darzil casts CANNELLONI CANNON!
Round 5: zombie waltzers takes 120 damage.
Round 5: Gron sniffs around, looking for something to absorb.
Round 5: darzil wins the fight!
You gain 162 Meat
After Battle: Gron hops around, dancing a jig accompanied by wet squelching noises.
You gain 5 Beefiness
You gain 6 Wizardliness
You gain 22 Smarm

[398] Haunted Ballroom
Encounter: Rotting Matilda
You gain 165 Chutzpah
You gain some Moxie points!
 
Doesn't look like a charpane refresh issue, then. The log would list several adventures with the same turn number if that was the case.

Well, it could be a really complicated charpane issue, I guess. Like if you got a series of out-of-order charpanes and mafia trusted each one, making it think a few adventures have passed. Or even weirder, the game sent you charpanes that were actually out of order, but the timestamps are such that they would appear to be in a valid order. I think that can happen "normally" if you get multiple charpane refreshes in rapid fire. Your Matilda occurred when it should have, at least.
 
D'oh... My issue was an "eaten" Matilda page. The log showed a Matilda adventure, but I didn't see it. Probably had a buffered "next adventure" that fired.
 

Darzil

Developer
Ascended Moxie again, will make sure I use dance card before leaflet and watch more closely / switch on debug.
 

Darzil

Developer
Tried again, trying for a debug log, but didn't get the same issue this time. Probably a screwy one off.

Edit - Something strange was going on. Was getting extra dance counters appearing, at one stage I met Waltzing Matilda when a counter was on (2), and Mafia thought I'd used all my Dance Cards, but I still had one left. Sometimes it worked fine, sometimes it was all over the place. Didn't see any clear pattern to what was going on, though.
 
Last edited:

Darzil

Developer
Ok, after a lot of time in the ballroom, I noticed it seemed to happen when I wasn't watching it closely, and started looking at other stuff. Eventually I caught what seemed to be happened, and can now replicate it consistently.

Whenever I visit my equipment page in the relay browser with a Dance Counter running, it resets my Dance Counter to 3 turns.

I've attached a debug log, where it is showing Dance Card (2) prior to visiting the equipment page, and Dance Card (3) afterwards.

View attachment DEBUG_20110712.txt
 

slyz

Developer
It looks like visiting inventory.php calls UseItemRequest.parseConsumption( responseText, false ) from StaticEntity.java, in order to track for usage of El Vibrato punchcards. The problem is that UseItemRequest.parseConsumption() will base its decision-making on UseItemRequest.lastItemUsed, which, in your case, happens to be a Dance Card. Mafia then stops your current Dance Card counter and set is to 3 turns.

I wonder if simply changing the beginning of UseItemRequest.parseConsumption() from
PHP:
AdventureResult item = UseItemRequest.lastItemUsed;
AdventureResult helper = UseItemRequest.lastHelperUsed;
to
PHP:
AdventureResult item = UseItemRequest.lastItemUsed;
AdventureResult helper = UseItemRequest.lastHelperUsed;

UseItemRequest.lastItemUsed = null;

will do the trick, or if it will cause other problems.
 
Last edited:

Veracity

Developer
Staff member
It looks sensible: when we are about to do the processing for item usage, pull out the item info we saved and clear it so that if we get called again, we don't reprocess the item. If there is a reason we didn't do that before, I can't remember it. Perhaps we will be reminded, if there is a downside, and we can consider what the right way to solve the other issue is...

I suggest that you submit it - and if it causes problems, people will demand that you revert it, and all will be well.

>:)
 

slyz

Developer
I suggest that you submit it - and if it causes problems, people will demand that you revert it, and all will be well.
I added the line in my local copy and haven't had any problem with the few automated adventures I played yesterday. I'm waiting until I have time to use different sorts of items to commit. I can't think of anything that would cause UseItemRequest.parseConsumption() to be called twice though (El Vibrato punchcards might be among them).
 
Top