Bug Failed to equip familiar equipment

Alium

Member
While running loopgyou script, I got error "You don't have the item you're trying to equip." when the script tried to equip the Miniature Crystal Ball on my grey goose. The crystal ball was equipped on a different fam. Goose had the grey vest on.

"refresh inv" was able to clear the issue. Here is a few parts of the experimenting I did in the CLI. Note that "refresh outfit" gave a warning about unknown item, but it does that when crystal ball is equipped as well... might be a false warning?

Code:
> equip miniature crystal ball

Putting on miniature crystal ball...
You don't have the item you're trying to equip.

> inv crystal

miniature crystal ball

> refresh outfit

Retrieving equipment...
Found unknown equipped item: "grey down vest" descid = 994210569

Hat: ice crown
Weapon: June cleaver
Off-hand: familiar scrapbook
Shirt: astral shirt
Pants: designer sweatpants
Back: unwrapped knock-off retro superhero cape

Acc. 1: backup camera
Acc. 2: combat lover's locket
Acc. 3: hewn moon-rune spoon

Pet: Grey Goose (21 lbs)
Item: grey down vest
Requests complete.

> equip miniature crystal ball

Putting on miniature crystal ball...
You don't have the item you're trying to equip.

> refresh inv

Updating inventory...
Requests complete.

> equip miniature crystal ball

Stealing miniature crystal ball from Squuulp the Gelatinous Cubeling...
Unequipping Squuulp the Gelatinous Cubeling...
Familiar unequipped.
Putting on miniature crystal ball...
Equipment changed.

This is the second time this has happened to me. I do have DEBUG logs from the run but not sure how helpful it would be. Let me know if there is anything I can check if this fails again in the future.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
If your crystal ball was equipped on another familiar, why did "inv crystal" show miniature crystal ball? I thought it just checks your inventory
 

Alium

Member
It's a good question, don't know. You can see when equip worked, it did steal the crystal ball from another fam. It's interesting that mafia knows the ball is in inv but an "inv refresh" clears the issue
 

Zdrvst

New member
I've been getting this consistently lately, and it only started within the last couple weeks at most.

My own script where this comes up once a day in the exact same spot every time. It uses the maximizer to equip everything.

Attached is just one log of it happening, though every log I have of it will basically be the same. The only thing that happens before the start of this part of the log is ascending into community service. The end is the stack trace where it says I don't have a miniature crystal ball to equip.

If I need to run this at some other level of logging or whatever to help diagnose this better, let me know what I need to do.


Edit: digging more, I found this has only been happening the last 3 days for me:
Code:
> grep -rl "at c2t_hccs_fights (c2t_hccs.ash:1751)" .
./Zdrvst_20220713.txt
./Zdrvst_20220714.txt
./Zdrvst_20220715.txt
The 13th is when I was using r26558. The latest version I was using before for several days before (and was working fine) was r26543, so this started sometime after r26543.
 

Attachments

  • Zdrvst_20220713_losing_the_crystal_ball.txt
    54 KB · Views: 6
Last edited:

Zdrvst

New member
Still happening in r26564, r26572, r26576, and r26587:
Code:
> grep -rl "at c2t_hccs_fights (c2t_hccs.ash:1751)" [Zz]drvst_2022*.txt
Zdrvst_20220713.txt
Zdrvst_20220714.txt
Zdrvst_20220715.txt
Zdrvst_20220716.txt
Zdrvst_20220717.txt
Zdrvst_20220718.txt
Zdrvst_20220720.txt
The only reason it didn't happen on the 19th is because I ran r26543 that day.

c2t_hccs.ash is here for your perusal, since apparently better logging isn't a thing, or won't help, or whatever? The only difference between what I run and what is public is 5 lines that don't change the outcome (already tested), so those running the public version would be getting the error at "line 1746" when mafia tries to equip, with the maximizer, the miniature crystal ball that it lost.

Granted, someone running my script would probably also need to be running the same settings and have the same stuff as I do to get that same outcome. So I wouldn't expect someone else to get the same outcome just by running it. The miniature crystal ball just isn't really ever equipped unless the camel is set to not be used (camel has its own equipment it never takes off, and camel is used for the majority of the run if it's being used), so familiar equipment be less likely to get lost in the default out-of-the-box case.

Mafia is also losing familiar equipment seemingly at random in other situations outside the specific scenario I've tried to explain at least once a day for me, so it's not really just the one sequence of events that one person is getting in one script that this is happening. Though it is likely the most consistent.
 

Veracity

Developer
Staff member
I think I’ll poke around with this.

Session logs showing the failure to equip the item because it is supposedly in inventory rather than on another familiar and hence stealable are not helpful.

What is needed - as lost alluded - is which action supposedly left the item in inventory when it really was on another familiar.

I have to ask: was the familiar item locked? I.e. auto-moved by Kol itself?
 

Veracity

Developer
Staff member
Code:
familiar Hovering Sombrero (6 lbs)
equip familiar miniature crystal ball
equip familiar astral pet sweater
equip familiar miniature crystal ball
equip familiar astral pet sweater
equip familiar miniature crystal ball
equip familiar astral pet sweater
equip familiar miniature crystal ball
familiar God Lobster (11 lbs)
equip familiar astral pet sweater
equip familiar miniature crystal ball
Stack trace:
 

Veracity

Developer
Staff member
I set up two familiars.

Code:
> familiar hovering sombrero

Putting Hasemary the Trick-or-Treating Tot back into terrarium...
Taking Mariachi Grrl the Hovering Sombrero out of terrarium...
Requests complete.

> unequip familiar

Taking off tiny maracas...
Equipment changed.

> closet put tiny maracas

Placing items into closet...
Requests complete.

> familiar hobo monkey

Putting Mariachi Grrl the Hovering Sombrero back into terrarium...
Taking Hobo Grrl the Hobo Monkey out of terrarium...
Requests complete.

> unequip familiar

Taking off tiny bindle...
Equipment changed.

> closet put tiny bindle

Placing items into closet...
Requests complete.

> inv astral pet sweater

astral pet sweater

> inv miniature crystal ball

miniature crystal ball
They are each unequipped.
The familiar-specific equipment is closeted.
I have both an astral pet sweater and a miniature crystal ball in inventory.

Code:
> familiar hovering sombrero

Putting Hobo Grrl the Hobo Monkey back into terrarium...
Taking Mariachi Grrl the Hovering Sombrero out of terrarium...
Requests complete.

> equip miniature crystal ball

Putting on miniature crystal ball...
Equipment changed.

> equip astral pet sweater

Putting on astral pet sweater...
Equipment changed.

> inv miniature crystal ball

miniature crystal ball

> inv astral pet sweater
Put on miniature crystal ball
Put on astral pet sweater
miniature crystal ball is back in inventory

Code:
> equip miniature crystal ball

Putting on miniature crystal ball...
Equipment changed.

> equip miniature crystal ball

> equip miniature crystal ball

> inv miniature crystal ball
Put on miniature crystal ball.
Tried again. It did nothing, since was already equipped.
It is not in inventory.

Code:
> equip astral pet sweater

Putting on astral pet sweater...
Equipment changed.

> inv miniature crystal ball

miniature crystal ball

> inv astral pet sweater
Switched with astral pet sweater.
Inventory is as expected.

Code:
> equip miniature crystal ball

Putting on miniature crystal ball...
Equipment changed.

> equip astral pet sweater

Putting on astral pet sweater...
Equipment changed.

> equip miniature crystal ball

Putting on miniature crystal ball...
Equipment changed.

> inv miniature crystal ball

> inv astral pet sweater

astral pet sweater
Switched a few more times.
Inventory is as expected.

Code:
> familiar hobo monkey

Putting Mariachi Grrl the Hovering Sombrero back into terrarium...
Taking Hobo Grrl the Hobo Monkey out of terrarium...
astral pet sweater is better than (none). Switching items...
Putting on astral pet sweater...
Equipment changed.

> inv miniature crystal ball

> inv astral pet sweater
Notice that this time when it took an unequipped familiar out of the terrarium, it noticed that an astral pet sweater was in inventory and auto-equipped it. I wonder why it didn't do that the first time?

Code:
> equip miniature crystal ball

Stealing miniature crystal ball from Mariachi Grrl the Hovering Sombrero...
Unequipping Mariachi Grrl the Hovering Sombrero...
Familiar unequipped.
Putting on miniature crystal ball...
Equipment changed.

> inv astral pet sweater

astral pet sweater

> inv miniature crystal ball
It stole the miniature crystal ball, and equipped it.
Inventory is as expected.

Code:
> familiar hovering sombrero

Putting Hobo Grrl the Hobo Monkey back into terrarium...
Taking Mariachi Grrl the Hovering Sombrero out of terrarium...
astral pet sweater is better than (none). Switching items...
Putting on astral pet sweater...
Equipment changed.

> inv miniature crystal ball

> inv astral pet sweater
Again, it auto-equipped the pet sweater.

So far, I see no inventory bugs.

I am curious why it sometimes auto-equipped a naked familiar with an in-inventory astral pet sweater and sometimes it did not.
 

Veracity

Developer
Staff member
I see why switching from one unequipped familiar to another does not look to find a suitable piece of equipment (either by stealing or from inventory).

Code:
    AdventureResult item = familiar.getItem();

    // If the old familiar wasn't wearing equipment, nothing to steal.

    if (item == EquipmentRequest.UNEQUIP) {
      return;
    }
That is probably wrong.

I also see that FamiliarData has a hardcoded ordered list of items to consider stealing or equipping from inventory (with familiar-specific items in the middle). It does not include the miniature crystal ball, although it does include other Generic familiar items.

Code:
Item    miniature life preserver    Generic
Item    amulet coin    Familiar Weight: +10, Meat Drop: +50, Lasts Until Rollover, Generic
Item    luck incense    Familiar Weight: +10, Item Drop: +25, Lasts Until Rollover, Generic
Item    razor fang    Familiar Weight: +10, Lasts Until Rollover, Generic
Item    shell bell    Familiar Weight: +10, Lasts Until Rollover, Generic
Item    smoke ball    Familiar Weight: +10, Lasts Until Rollover, Generic
Item    muscle band    Familiar Weight: +10, Lasts Until Rollover, Generic
Item    astral pet sweater    Familiar Weight: +10, Generic
Item    plastic pumpkin bucket    Familiar Weight: +5, Item Drop: +13, Softcore Only, Generic
Item    little box of fireworks    Familiar Weight: +5, Softcore Only, Generic, Experience: +1.5, Item Drop (sporadic): +12.5
Item    Mayflower bouquet    Familiar Weight: +5, Softcore Only, Generic, Experience: +0.625, Meat Drop (sporadic): +5, Item Drop (sporadic): +2.5, Experience (familiar): +0.375, Drops Items
(familiar-specific items)
Item    ittah bittah hookah    Familiar Weight: +5, Generic
Item    Loathing Legion helicopter    Familiar Weight: +5, Softcore Only, Generic, Familiar Action Bonus: +25
Item    filthy child leash    Familiar Weight: +5, Generic
Item    lead necklace    Familiar Weight: +3, Generic
Only items that give Familiar Weight.

Seems like it could have:

Code:
Item    fuzzy polar bear ears    Familiar Weight: +5, Experience (Muscle): +3, Generic
Item    miniature goose mask    Familiar Weight: +5, Experience (Moxie): +3, Generic
Item    tiny glowing red nose    Familiar Weight: +5, Experience (Mysticality): +3, Generic

Also seems like a Inflatable Dodecapeded shouldn't equip any + Familiar Weight equipment. :)
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Seems like that could be refactored to be a list, or even a query on the item database sorted by +weight
 

lostcalpolydude

Developer
Staff member
I added familiarScript a long while back, for people that disagree with the ordering of generic familiar equipment, particularly equipment that all gives the same weight bonus.
 

Alium

Member
I've had a similar issue today with being unable to equip a second ghost of a necklace. Different in that it isn't a fam equip, similar in that inv tracking went wrong somewhere. I can create this as a new bug report - let me know what you all prefer.

Mafia thinks I have 1 equipped and 1 in inv. Inv is wrong, this is a quest item and you only get 1 in run. Refresh inv clears the error.
1659542390175.png

Error happened because a maximize statement for sleaze res attempted to equip 2 ghost of a necklaces.

Line 8201 we know tracking is correct because a maximize statement for sleaze res only attempted to equip 1 ghost in a necklace
Line 11642 is when the tracking inconsistency happens
Line 13162 is when a maximize statement for sleaze res fails for trying to equip 2 ghost in a necklace

Here is some detail for the tracking inconsistency:
Code:
*** slot acc1: KoL has ghost of a necklace but KoLmafia has teacher's pen (49,153)
*** slot acc3: KoL has teacher's pen but KoLmafia has ghost of a necklace

Mafia tracking for teacher's pen is correct, so not clear if this inconsistency is related to the error or not. Obviously, there are many things that happen between lines 8201 and 13162 but the tracking inconsistency is at minimum suspicious imo. You will see another instance of tracking inconsistency in the attached log that didn't cause the error so maybe not related at all. What does (49,153) mean?

Attached is snippet of session log start with when I acquired ghost of a necklace and ending with the failure.

Don't have any solid conclusions, just putting down what I've seen.
 

Attachments

  • Failure to Equip 2 Ghost of a Necklace.txt
    822.3 KB · Views: 0
Top