Bug Maximizer Unequips Main Hand Then Complains Nothing in Main Hand

Alium

Member
Getting the follow error:
1719774281074.png

Tried having no main or offhand equipped, just main, and just off before running the above command. Same behavior for all.

Noticed I have a single yule hatchet and it seems to want 2. I bought a second and the error no longer happens. Put second hatchet in closet and error came back. So I believe all that is needed to repro issue is have a single yule hatchet in inventory
 
It could be my search fu but I cannot find the string "why bother" (case insensitive) in the source code. Maybe I missed something but maybe there is a script involved?

There is an unresolved issue https://kolmafia.us/threads/maximizer-didnt-equip-a-weapon.29577/ involving the maximizer and weapons. Simplistically a weapon is not equipped when the user expects one to be equipped. I am reasonably certain this is not a maximizer bug in the sense that the maximizer chooses a weapon and fails to equip it but we don't really understand whether the failure to select a weapon is correct behavior or not.

If you can reproduce this it might be helpful to what things were considered (in the 20 combinations) and what the character was wearing when the command was run. There is a lot more that would be helpful but let's reproduce it first.
 
Interesting and agree I can't find "why bother" either. I can find the next line of "Unable to meet". Searched my entire mafia folder for "Why bother" and no hits so I don't think its a script. Another mystery of the maximizer!

Closeted a yule hatchet and issue is not currently reproducing. I'll keep it closeted and if issue returns will get your input before restarting mafia next time so we can do some debugging.
 

says

You cannot equip a weapon in your off-hand until you have one in your weapon slot. Attempting to do so gives this message:

Why bother putting a weapon into your offhand if you don't have anything in your on-hand? "On-hand?" Whatever.

so the referenced message comes from KoL

I can construct a scenario where the Maximizer chooses not to equip a weapon and then tries to equip the Yule hatchet as off hand and KoL objects. It is not repeatable, perhaps because something got equipped as a weapon?

With more motivation I might be able to construct a repeatable scenario but it won't happen immediately.

Thanks.
 
Good find that it is in kol itself.

In the original failure I tried these starting conditions:
Nothing in main or off hand
Only main hand

Both resulted in the same error. Should have taken pics as evidence. After RO when I'm in aftercare again, I'll try manually unequipping both main and off hand to see if this repros
 
It is probably worth defining exactly what the error is.

For example it is asserted that the Maximizer failing to select a weapon is an error but there is much evidence that the Maximizer is doing exactly what is expected and for the conditions selected no weapon is as "good" or "better" than any selection that includes a weapon.

So is the problem here:

  • The maximizer selects an off-hand weapon but not a main hand weapon?
  • The maximizer tries to equip an off-hand weapon when there is no main hand weapon equipped?
  • Mafia does something that KoL doesn't like and so KoL complains about it?

The first two could also be a case where the Maximizer is doing exactly what it was asked to do but the user's expectations were different.

Still interesting but the difference between a bug and a feature request :-)
 
Wasn't able to repro after my run this time around. Looked closer at original failure and maybe I hadn't pulled my storage yet


Code:
maximize Familiar Experience
Maximizer: Familiar Experience

equip weapon yule hatchet

pull: 1 yule hatchet
unequip weapon

equip off-hand yule hatchet
[FAILURE HERE]


After next run I'll try to repro without pulling everything out of storage.
 
It is possible that we're seeing:

- Maximizer wants to equip a yule hatchet in the main hand. In doing so, it invokes retrieveItem() to pull the hatchet.

- Maximizer then wants to equip a yule hatchet in the offhand. It theoretically could pull a second, but it's easier (and uses fewer resources) to unequip the one in the mainhand.

- Maximizer then takes the same yule hatchet and tries to equip it in the offhand.

In that scenario, we'd actually want to acquire all the items with the correct multiplicity before trying to equip any of them.
 
Okay. I've sort of managed to reproduce:

- Have two of a weapon in inventory.
- Run a maximization query in the Modifier Maximizer tab that would select both weapons.
- Put both items in the closet.
- Click execute to run that query on both of the weapons.
- Observe "Why bother putting a weapon into your offhand..."

This isn't quite the situation that was reported, although I have largely been unable to reproduce using the reported sequence of events.

I'm also wondering if there's some desynchronization that's going on between Mafia's view of the inventory, and KoL's. Exiting + reopening Mafia as a viable fix would make sense in that scenario.

If you run into this again, can you check how many yule hatchets Mafia thinks you have available? Commands like `inv yule hatchet`, `closet list yule hatchet`, etc should do the trick.
 
I have literally never seen a “desynch” between KoL’s and KoLmafia’s view of inventory.

Every time I see that proposed as the cause of something, my immediate reaction is “fix the root cause of the desynch”.
 
I have literally never seen a “desynch” between KoL’s and KoLmafia’s view of inventory.

Every time I see that proposed as the cause of something, my immediate reaction is “fix the root cause of the desynch”.
I've seen lots of them and I agree with fixing the root cause. I finally got a proper log of one which I'll post in a sec.
 
Back
Top