Bug Scratch n' sniff sword quantity in inventory incorrect.

fronobulax

Developer
Staff member
Title is not especially descriptive.

Issue discussed in the autoBasement thread.

Symptom is that maximizer will suggest a maximization involving the sword and then fail to equip what it just suggested, when asked to equip.

autoBasement is the "canary" since it does a lot of maximization.

The situation as I understand it is that:

Something, currently undiagnosed, happens that makes KoLmafia believe that there are more than one s'n's swords in inventory. Then a maximizer command is run, the maximizer believes there are two swords available and tries to equip both. There is only one sword so the equip command fails giving the observed symptoms.

In some cases unequipping the sword (if so equipped) and refreshing inventory makes the symptom go away. In some cases logging out of KoLmafia and restarting makes it go away.

There is a hypothesis that having the sword as part of an outfit is a contributing factor to the over counting.

Tangentially, the stickers themselves have a number in parens after the type that is supposed to be a count of turns remaining before the sticker fails. This number has been observed to go negative. Correctly tracking this is probably a separate FR, but the opportunity to address this may occur as part of tracking this down.
 

fronobulax

Developer
Staff member
Sorry for the running commentary. I am trying to multitask.

autoBasement stopped for reasons unrelated to this.

When I started it up it started doing its thing with outfits. It checked and saved Gauntlet, then put on MP drain, did a maximization and had problem. The last maximizer command in the MRU does not seem to generate the problem.

refreshed inventory, put on MPDrain, which does have the sword, ran, Mysticality, -familiar generates symptom. Maximizer says remove and equip sword. Why? What is different between remove and equip and keep?

(Questions for others. Need to make progress on non KoL tasks :) )
 

fronobulax

Developer
Staff member
I think "remove and equip" means "switch it from one hand to the other".

Thank you.

And quoting from another thread...

I have an idea, but I have no mafia running now.
I *think* I have noticed inventory de-synch when equipping an outfit that only ended up equipped partially. I should really get to verifying it on current release and making a bug report.
In my case, I have an outfit with the same weapon and offhand, both of which are hidden in my closet - and when I "outfit pvp", mafia only pulls one of those, then thinks it putting on the entire outfit, and after unequipping believes that it has 2 bugged old school mafia !@#$%^& in inventory instead of just one. (I managed to train myself into manually acquiring them before outfitting, instead of bugreporting)
 

lostcalpolydude

Developer
Staff member
Since the other thread is marked Fixed (and I don't recall any recent posts about this issue anywhere), I'm marking this Fixed.
 

Qualidus

New member
Occurred again during my latest basement dive. Appears to be a problem with outfit switching and dual wielding.

I was running Mafia v13750 when the error occurred and reproduced it on the latest version of Mafia, v13767 at the time.

Steps to reproduce:
1) Define an outfit with the S&S sword and offhand weapon [sstest1]
2) Define a separate outfit with a S&S sword and no offhand weapon [sstest2].
3) outfit sstest2 -> 0 Swords / 1 Equipped
4) outfit sstest1 -> 1 Sword / 1 Equipped

S&S sword count after step 4 will be 1 despite already wearing the S&S sword.

I did some additional tests and noted that the S&S sword isn't the only thing that's affected by this. We just notice since it's one of the items you can really only have one of.

I tested with an ancient ice cream scoop and was able to 'duplicate' them (There's a reported bug in KoL where if you switch to an outfit with a utensil/chefstaff/saucepan in the mainhand and the same offhand, it'll unequip the offhand. Similar quirkiness exists if the utensil/saucepan is in your offhand).

Also, for added fun, if you have 2 outfits and both are using S&S sword and offhand weapons, you can switch between them and an extra sword will be 'created' each time.

Steps to reproduce:
1) Define an outfit with the S&S sword and offhand weapon [sstest1]
2) Define a separate outfit with a S&S sword with a different offhand weapon (my outfits only had these 2 items) [sstest2].
3) outfit sstest2 -> 0 Swords / 1 Equipped
4) outfit sstest1 -> 1 Sword / 1 Equipped
5) outfit sstest2 -> 2 Swords / 1 Equipped
...
 
Last edited:

fronobulax

Developer
Staff member
Thank you. Since you went through the effort to repeatedly reproduce it outside of autobasement, i guess my excuse for postponing this until my next dive has kind of evaporated. I'll try and look at it this weekend with a debugger if no one else solves it before then.
 
Top