Bug - Waiting for Info Inconsistent inventory status after Spooky Putty Sheet use

Magus_Prime

Well-known member
Hello,

I've been using my Spooky Putty sheet a lot this month to fill in gaps in my Monster Manuel factoids. Sometimes, maybe one day in five, when I use a Spooky Putty monster from inventory Mafia "thinks" I still have it in inventory and, during subsequent adventures, I get the following in the gCLI:

Code:
You have a Spooky Putty monster, but mafia doesn't know what it is.

If I go to the inventory page I can see the Spooky Putty sheet.

All adventuring is occurring via the relay browser and uses of the Spooky Putty monster are via the "use" link at the end of the combat where the Spooky Putty sheet was used. Logging out of KoLmafia and logging back in seems to fix the problem.

Current KoLmafia version is r15065 but it's been something I've noticed for the last few weeks.

Any thoughts?
 
Last edited:

Theraze

Active member
Any chance you're double-clicking on the something in the relay browser and using it twice? Since mafia works based on accurate information, and if you 'use' the item twice, inventory can get out of sync, at least until the next time you look at your inventory and let mafia parse it...
 

Veracity

Developer
Staff member
I've been using my Spooky Putty sheet a lot this month to fill in gaps in my Monster Manuel factoids. Sometimes, maybe one day in five, when I use a Spooky Putty monster from inventory Mafia "thinks" I still have it in inventory and, during subsequent adventures, I get the following in the gCLI:

Code:
You have a Spooky Putty monster, but mafia doesn't know what it is.
The text does not appear anywhere in KoLmafia (which should be obvious; KoLmafia never, ever refers to itself as "mafia").
What script you are running that prints it?

I have used many Spooky Putty monsters from inventory in the Relay Browser or via the "use" link after I use a Spooky Putty sheet in combat. I have never had KoLmafia not recognize that the monster went away and the sheet appeared.

My session logs, without exception, looks like this when I use a monster.

Code:
use 1 Spooky Putty monster

[848] Spooky Putty Monster
Encounter: rampaging adding machine
What does your session log say?
 

Magus_Prime

Well-known member
My session log look exactly as yours does. I ran grep against the KoLmafia directory tree and found the complaining string in zarqon's BestBetweenBattle script. Here's the section in question.

Code:
// 2-4. putty monsters, rain-doh boxes, 4-d cameras
   boolean fight_this(item i, string mprop) {
      if (item_amount(i) == 0 || (i == $item[shaking 4-d camera] && get_property("_cameraUsed") == "true")) return true;
      if (get_property(mprop+"Monster") == "") vprint("You have a "+i+", but mafia doesn't know what it is.",-2);
      if (has_goal(to_monster(get_property(mprop+"Monster"))) == 0 && (to_item(to_int(get_property("currentBountyItem"))) == $item[none] || 
       !(item_drops(to_monster(get_property(mprop+"Monster"))) contains to_item(to_int(get_property("currentBountyItem")))))) return true;
      restore_hp(0);     // recover here since recovery is not triggered normally
      restore_mp(0);
      use(1,i);
      return fight_items();

In my session log on the day in question, between fighting the Spooky Putty monster and the error message, the character did three things:

1. Visited the Conspiracy Island radio
2. Equipped the micro-cassette recorder
3. Used the maximizer to boost Mys

Here's the section of the session log:

Code:
use 1 Spooky Putty monster

[6666] Spooky Putty Monster
Encounter: antique database server
Round 0: Arbos wins initiative!
> WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos casts POCKET CRUMBS!
Round 2: antique database server drops 1 attack power.
Round 2: antique database server drops 1 defense.
You acquire an item: old candy wrapper
Round 2: Trobert yaps loudly and repeatedly at your opponent until it throws some meat at him to shut him up.
You gain 11 Meat.
Round 2: antique database server takes 76 damage.
Round 2: Tingteng shakes loose a considerable quantity of spice. You conjure up a canister and collect it.
You acquire an item: spices
> WHAM: Starting evaluation and performing of attack
> WHAM: We are going to 1-shot with attack with your weapon.
Round 2: Arbos executes a macro!
Round 2: Arbos attacks!
Round 3: antique database server takes 584 damage.
Round 3: Trobert yaps loudly and repeatedly at your opponent until it throws some meat at him to shut him up.
You gain 8 Meat.
Round 3: Arbos wins the fight!
After Battle: Gutchell sees some extra stuff through the snow suit's coal eyes and points it out to you.
After Battle: Trobert surveys the scene from your back and sighs.
After Battle: Tingteng performs an interpretive dance on the topic of loot discovery.
After Battle: Gutchell grins wildly and sings "It's the mooost mystical tiiiiiiime of the yeeeeaaaaarrr!" (+12 Stats)
You gain 6 Muscleboundness
You gain 49 Magicalness
You gain 7 Cheek

place.php?whichplace=airport_spooky&action=airport2_radio
Took choice 984/1: unknown
choice.php?pwd&whichchoice=984&option=1
You acquire an item: encrypted micro-cassette recorder

equip off-hand encrypted micro-cassette recorder

mall.php?category=allitems&consumable_byme=0&weaponattribute=3&wearable_byme=0&nolimits=0&max_price=0&sortresultsby=price&justitems=0&x_cheapest=0&pudnuggler=%22pressurized+potion+of+perspicacity%22
mall.php?category=allitems&consumable_byme=0&weaponattribute=3&wearable_byme=0&nolimits=0&max_price=0&sortresultsby=price&justitems=0&x_cheapest=0&pudnuggler=%22globe+of+Deep+Sauce%22
mall.php?category=allitems&consumable_byme=0&weaponattribute=3&wearable_byme=0&nolimits=0&max_price=0&sortresultsby=price&justitems=0&x_cheapest=0&pudnuggler=%22sea+honeydew%22

buy 1 pressurized potion of perspicacity for 15500 each from 2097702 on 20141220

use 1 pressurized potion of perspicacity
You acquire an effect: Perspicacious Pressure (duration: 10 Adventures)

use 1 Hawking's Elixir of Brilliance
You acquire an effect: On the Shoulders of Giants (duration: 10 Adventures)

use 1 cold-filtered water
You acquire an effect: Purity of Spirit (duration: 10 Adventures)

mall.php?category=allitems&consumable_byme=0&weaponattribute=3&wearable_byme=0&nolimits=0&max_price=0&sortresultsby=price&justitems=0&x_cheapest=0&pudnuggler=%22pressurized+potion+of+perspicacity%22

buy 1 pressurized potion of perspicacity for 15500 each from 2097702 on 20141220

use 1 pressurized potion of perspicacity
You acquire an effect: Perspicacious Pressure (duration: 10 Adventures)

use 1 Hawking's Elixir of Brilliance
You acquire an effect: On the Shoulders of Giants (duration: 10 Adventures)

use 1 cold-filtered water
You acquire an effect: Purity of Spirit (duration: 10 Adventures)

telescope look high
You acquire an effect: Starry-Eyed (duration: 10 Adventures)
> You have a Spooky Putty monster, but mafia doesn't know what it is.

Thank you for pointing me to BestBetweenBattle. I'll mention it in the appropriate thread.
 

Veracity

Developer
Staff member
Code:
if (get_property(mprop+"Monster") == "") vprint("You have a "+i+", but mafia doesn't know what it is.",-2)
Yeah, if you fight a Spooky Putty Monster, we do the following:

Code:
		case ItemPool.SPOOKY_PUTTY_MONSTER:
			itemName = "Spooky Putty Monster";
			Preferences.setString( "spookyPuttyMonster", "" );
			ResultProcessor.processItem( ItemPool.SPOOKY_PUTTY_SHEET, 1 );
			consumed = true;
			EncounterManager.ignoreSpecialMonsters();
			break;
...
		if ( consumed )
		{
			ResultProcessor.processResult( item.getInstance( -1 ) );
		}
We clear out the preference, remove the monster from inventory, and add the sheet to inventory.

Looking at your fight, I do not see you using a Spooky Putty sheet on the monster, so, although you consumed the Spooky Putty monster, you did not generate a new one.

Apparently, BBB believes you had a monster in inventory, though. That's never happened to me.
 

Magus_Prime

Well-known member
although you consumed the Spooky Putty monster, you did not generate a new one.

That is correct. When I check my inventory after the problem surfaces the inventory, correctly, displays a Spooky Putty sheet. Using the Spooky Putty sheet on another monster "fixes" things.

For what it's worth, when this happens, Ezandora's Guide script makes the same complaint in the relay browser pane.

It seems that, for whatever reason, sometimes the preference isn't being cleared.

If it happens again is there any additional information that I can supply that would help in pinning down the problem?
 
Last edited:

Veracity

Developer
Staff member
That is correct. When I check my inventory after the problem surfaces the inventory, correctly, displays a Spooky Putty sheet. Using the Spooky Putty sheet on another monster "fixes" things.

For what it's worth, when this happens, Ezandora's Guide script makes the same complaint in the relay browser pane.

It seems that, for whatever reason, sometimes the preference isn't being cleared.
The preference SHOULD be cleared - and the code from BBB shows that the preference IS being cleared - spookyPuttyMonster was set to "". But, for some reason, BBB thought that you still had a Spooky Putty monster. That's not a preference issue. That would be an inventory issue.

If it happens again is there any additional information that I can supply that would help in pinning down the problem?
Do the following in the gCLI:

> inv spooky putty
> get spookyPuttyMonster
> refresh inv
> inv spooky putty

If the first one shows a monster - and the preference is blank - and the last one shows no monster, there is an inventory issue.
If the first (and last) do NOT show a monster, but the preference is blank, that is correct behavior.

I'm marking this Waiting For Info until and unless something more comes up; the issue has never happened to me (that I've noticed) and I see no problem in the KoLmafia code...
 

zarqon

Well-known member
This just happened to me the other day as well. When I did an "inv spooky putty" it showed I had a Spooky Putty monster. After a "refresh inv" it then correctly showed I did not have the monster but rather had the sheet. I'll see if I can duplicate it.


EDIT: Not sure if this provides a clue, but on a fresh login, my spookyPuttyMonster property contains "something <i>totally</i> unrecognizable" despite not having a Spooky Putty monster in inventory.

I cleared the property and fought a bunch of copies of a faxed monster, but afterwards all was as it should be in inventory and properties.

EDIT EDIT: Not sure if this is related, but today when I logged in, mafia also had "something <i>totally</i> unrecognizable" in my crudeMonster property, despite me not having a crude monster sculpture.
 
Last edited:
Top