Bug using the -buddy-bjorn maximizer command unequips the buddy bjorn item

Hi again!

This issue is linked to the one resolved/discussed in this thread.

Running the maximizer with a string like
Code:
Familiar Weight,  -buddy-bjorn, -crown-of-thrones, 100 bonus pantogram pants, 145.5 bonus Buddy Bjorn, 180 bonus Mr. Screege's spectacles, 250 bonus Mr. Cheeng's spectacles, 353.5 bonus bag of many confections, 400 bonus lucky gold ring
while having a bjorn equipped yields

Code:
<html><font color=gray>keep hat: crumpled felt fedora</font></html>
equip weapon Fourth of May Cosplay Saber (+10)
equip off-hand Fourth of May Cosplay Saber (+10)
unequip back (Buddy Bjorn, -146)
<html><font color=gray>keep shirt: Stephen's lab coat</font></html>
<html><font color=gray>keep pants: pantogram pants</font></html>
<html><font color=gray>keep acc1: lucky gold ring</font></html>
equip acc2 Mr. Cheeng's spectacles (+250)
equip acc3 Mr. Screege's spectacles (+180)
<html><font color=gray>keep familiar: amulet coin</font></html>

You can safely ignore the cosplay saber issue, mafia just got bamboozled by me using custom outfits a lot and rapidly.

Mafia does seem to acknowledge the fact that unequipping the bjorn loses me points, but it seems compelled to unequip the bjorn because of the -buddy-bjorn command. Which shouldn't have any bearing on equipping the bjorn itself, only on reassigning the familiar in that slot.

Please let me know if you have any questions, or if there's anything I can provide to elucidate this bug.
 

heeheehee

Developer
Staff member
Thanks for the report.

So, I can't initially reproduce this problem, either via tests or in-game. Can you add "+dump" to your maximizer string (probably with a -tie as well) and paste the CLI output? Also optional: "+2 dump" although just for slot 4 (back items) so I can see if it's trying to consider anything else.
 

heeheehee

Developer
Staff member
I assumed that DFSS was only relevant for the inventory desync caused by outfit switching, causing Mafia to think it had two cosplay sabers. As a hacky workaround, we could probably add "can only equip one of these" to modifiers.txt for this item, since you shouldn't be able to get multiple under normal circumstances.
 
Well the good news is that this appears to no longer be happening. The bad news is that I have no idea if this means it'll happen again.
 

heeheehee

Developer
Staff member
I'll close this bug for now as "can't reproduce", but if it happens again, please post more details in this thread, and we'll reopen it. I refuse to believe that we magically fixed it without touching that part of the code.
 
update: we're back


Code:
equip hat wad of used tape (+93)
equip weapon haiku katana (+0)
equip off-hand Kramco Sausage-o-Matic&trade; (+7)
unequip back (Buddy Bjorn, -2537)
equip shirt Stephen's lab coat (+80)
equip pants Great Wolf's beastly trousers (+158)
equip acc1 mafia pointer finger ring (+0)
equip acc2 lucky gold ring (+400)
equip acc3 mafia thumb ring (+300)

CLI text with +dump:

Code:
Maximizer: 0.72 Item Drop, 2.75 Meat Drop, equip Kramco Sausage-o-Matic™,     equip haiku katana, equip mafia pointer finger ring, -equip Crown of     Thrones, -equip broken champagne bottle, -buddy-bjorn, -crown-of-thrones,     180 bonus Mr. Screege's spectacles, 250 bonus Mr. Cheeng's spectacles,     2537.1 bonus Buddy Bjorn, 300 bonus mafia thumb ring, 351.65 bonus bag of     many confections, 400 bonus lucky gold ring, 99.56 bonus Pantsgiving, +dump
Maximizing...
Outfits     []
SLOT 0
[wad of used tape, Goggles of Loathing]
SLOT 1
[cyber-mattock]
SLOT     2
[(none)]
SLOT 3
[Kramco Sausage-o-Matic™]
SLOT 4
[Buddy     Bjorn]
SLOT 5
[Stephen's lab coat]
SLOT 6
[Great Wolf's     beastly trousers]
SLOT 7
[mafia pointer finger ring, lucky gold     ring, mafia thumb ring, Pocket Square of Loathing, Hodgman's bow tie, Hand     in Glove, Hodgman's lucky sock]
SLOT 8
[haiku katana]
SLOT 9
[The     Jokester's gun, Sheila Take a Crossbow]
SLOT 10
[amulet coin]
SLOT     11
[(none)]
SLOT 12
[(none)]
SLOT 13
[(none)]
SLOT 14
[haiku     katana, Fourth of May Cosplay Saber, Sheila Take a Crossbow, Hand that     Rocks the Ladle, Work is a Four Letter Sword, Staff of the Headmaster's     Victuals]
SLOT 15
[(none)]
SLOT 16
[(none)]
SLOT 17
[(none)]
SLOT     18
[(none)]
SLOT 19
[(none)]
SLOT 20
[(none)]
SLOT 21
[(none)]
SLOT     22
[]
SLOT 23
[]
2044 combinations checked, best score 6,006.55

This is while naked except for the bjorn, which is currently empty. When I bjornify a misshapen animal skeleton, it seems to work properly?


Code:
equip hat wad of used tape (+93)
equip weapon haiku katana (+0)
equip off-hand Kramco Sausage-o-Matic&trade; (+7)
<html><font color=gray>keep back: Buddy Bjorn</font></html>
equip shirt Stephen's lab coat (+79)
equip pants Great Wolf's beastly trousers (+157)
equip acc1 mafia pointer finger ring (+0)
equip acc2 lucky gold ring (+400)
equip acc3 mafia thumb ring (+300)

Which is to say it looks like the old bug is still unresolved. It is respecting the -buddy-bjorn command when the bjorn is full, but when the bjorn is empty it is refusing to fill it.

Code:
Maximizer: 0.72 Item Drop, 2.75 Meat Drop, equip Kramco Sausage-o-Matic™,     equip haiku katana, equip mafia pointer finger ring, -equip Crown of     Thrones, -equip broken champagne bottle, -buddy-bjorn, -crown-of-thrones,     180 bonus Mr. Screege's spectacles, 250 bonus Mr. Cheeng's spectacles,     2537.1 bonus Buddy Bjorn, 300 bonus mafia thumb ring, 351.65 bonus bag of     many confections, 400 bonus lucky gold ring, 99.56 bonus Pantsgiving, +dump
Maximizing...
Outfits     []
SLOT 0
[wad of used tape, Goggles of Loathing]
SLOT 1
[cyber-mattock]
SLOT     2
[(none)]
SLOT 3
[Kramco Sausage-o-Matic™]
SLOT 4
[Buddy     Bjorn]
SLOT 5
[Stephen's lab coat]
SLOT 6
[Great Wolf's     beastly trousers]
SLOT 7
[mafia pointer finger ring, lucky gold     ring, mafia thumb ring, Pocket Square of Loathing, Hodgman's bow tie, Hand     in Glove, Hodgman's lucky sock]
SLOT 8
[haiku katana]
SLOT 9
[The     Jokester's gun, Sheila Take a Crossbow]
SLOT 10
[amulet coin]
SLOT     11
[(none)]
SLOT 12
[(none)]
SLOT 13
[(none)]
SLOT 14
[haiku     katana, Fourth of May Cosplay Saber, Sheila Take a Crossbow, Hand that     Rocks the Ladle, Work is a Four Letter Sword, Staff of the Headmaster's     Victuals]
SLOT 15
[(none)]
SLOT 16
[(none)]
SLOT 17
[(none)]
SLOT     18
[(none)]
SLOT 19
[(none)]
SLOT 20
[(none)]
SLOT 21
[(none)]
SLOT     22
[]
SLOT 23
[]
2044 combinations checked, best score 8,620.88

Interestingly, if I force-equip the bjorn (that is, add +equip buddy bjorn to the end of the string), it would rather fail than equip an empty bjorn.

Code:
Maximizer: 0.72 Item Drop, 2.75 Meat Drop, equip mafia pointer finger     ring, -equip Crown of Thrones, -equip broken champagne bottle,     -buddy-bjorn, -crown-of-thrones, 180 bonus Mr. Screege's spectacles, 250     bonus Mr. Cheeng's spectacles, 2537.1 bonus Buddy Bjorn, 300 bonus mafia     thumb ring, 351.65 bonus bag of many confections, 400 bonus lucky gold     ring, 99.56 bonus Pantsgiving, +dump, +equip buddy bjorn
Maximizing...
Outfits     []
SLOT 0
[wad of used tape, Goggles of Loathing]
SLOT 1
[cyber-mattock]
SLOT     2
[(none)]
SLOT 3
[familiar scrapbook, Half a Purse, Scepter of     Loathing, A Light that Never Goes Out]
SLOT 4
[Buddy Bjorn]
SLOT 5
[Stephen's     lab coat]
SLOT 6
[Great Wolf's beastly trousers]
SLOT 7
[mafia     pointer finger ring, lucky gold ring, mafia thumb ring, Pocket Square of     Loathing, Hodgman's bow tie, Hand in Glove, Hodgman's lucky sock]
SLOT 8
[Fourth     of May Cosplay Saber, Hand that Rocks the Ladle, Work is a Four Letter     Sword]
SLOT 9
[The Jokester's gun, Sheila Take a Crossbow]
SLOT 10
[amulet     coin]
SLOT 11
[(none)]
SLOT 12
[(none)]
SLOT 13
[(none)]
SLOT     14
[Fourth of May Cosplay Saber, Sheila Take a Crossbow, Hand that     Rocks the Ladle, Work is a Four Letter Sword, Staff of the Headmaster's     Victuals]
SLOT 15
[(none)]
SLOT 16
[(none)]
SLOT 17
[(none)]
SLOT     18
[(none)]
SLOT 19
[(none)]
SLOT 20
[(none)]
SLOT 21
[(none)]
SLOT     22
[]
SLOT 23
[]
5694 combinations checked, best score     6,311.02 (FAIL)

As an addendum, it seems willing to vacate the back slot at a loss even when the bjorn isn't equipped. It'll happily unequip the snowpack and not have a back item at all.
 
Last edited:

heeheehee

Developer
Staff member
Yeah, I think that helps me narrow it down. I'll see if I can reproduce in tests. If so, I'll rename the bug.

SLOT 11
[(none)]
SLOT 21
[(none)]

in particular correspond to CoT / Bjorn pseudo-slots.

Which is to say it looks like the old bug is still unresolved. It is respecting the -buddy-bjorn command when the bjorn is full, but when the bjorn is empty it is refusing to fill it.
Sort of, it's a different bug! It's that we're unwilling to equip an empty bjorn. Probably the same for an empty crown.
 

heeheehee

Developer
Staff member
I looked at this previously, and determined that it was the "any" logic in MaximizerSpeculation that only considered CoT / Bjorn if they had a familiar. I changed that check but now I'm trying to figure out why it's still marking the maximization as failed even though it's apparently succeeding.
 
Sorry to necro this, but I wrote a failing test for the weird behavior we're encountering now. I'm not currently making a new thread because all of these feel pretty entangled as issues:
 
Top