Bug - Cannot Reproduce Using Platinum Yendorian Express Card removes my offhand

devjoe

New member
I've equipped my maximum MP outfit (which, as a pastamancer with merry smithsness, includes three Hand that Rocks a Ladles), burned down MP, and now click Express Card under Daily Deeds:

> use Platinum Yendorian Express Card

Using 1 Platinum Yendorian Express Card...
You gain 6,835 Mana Points
You acquire an effect: Leash of Linguini (duration: 5 Adventures)
[a bunch of other extended effects deleted]
You acquire an effect: Winklered (duration: 5 Adventures)
Finished using 1 Platinum Yendorian Express Card.
Taking off Hand that Rocks the Ladle... <---- Mafia shouldn't be messing with this...
Equipment changed.

This has happened more than once; I updated mafia hoping it was fixed, but happened again today with v16.2 r13623

Remaining equipment:
Hat: Mayor Ghost's toupee (Power: 300) [unequip]
Back: sea shawl [unequip]
Shirt: sea salt scrubs (Power: 200) [unequip]
Weapon: Hand that Rocks the Ladle (Damage: 10 - 20, 1h) [unequip]
Pants: hobo dungarees (Power: 200) [unequip]
Accessory 1: moon-amber necklace [unequip]
Accessory 2: Brimstone Bracelet [unequip]
Accessory 3: Brimstone Brooch [unequip]
Familiar: Hand that Rocks the Ladle [unequip]

The off-hand Hand that Rocks the Ladle was removed, costing me ~800 MP.
 

Veracity

Developer
Staff member
I can't reproduce this.

The "use" command sets up an outfit checkpoint around actually using the item; it saves a list of your current equipment, slot by slot, "uses" the item, and then makes sure your equipment agrees with what it had saved.

So, presumably for you, when it saved the equipment, it said "none" for the offhand, and when it restored it, it saw the ladle and removed it in order to agree with the saved equipment list.

I can't imagine how that could have happened - and when I tried it in a debugger, it worked fine for me; it saw ladles in both main hand and offhand before the "use", and afterwards, correctly realized that nothing had changed.
 

PeKaJe

Member
Does mafia use the game's saved outfit system? I see a "Backup" outfit that I'm guessing mafia made at some point, because it's not something I've made, and has things in it I would never consider saving as an outfit for any particular use.

The reason I ask is that I recall there being hard-to-reproduce in-game bugs with outfits that include off-hand weapons, because the outfit database seems to only save what's equipped and not where it was held. This is most noticeable with outfits that have a chefstaff and a weapon, but I've seen it in other situations. If the game's equipping function does an unordered select, it might work sometimes and not work other times.
 

Veracity

Developer
Staff member
It does use that, sometimes, but not in this case.

Code:
		SpecialOutfit.createImplicitCheckpoint();
		UseItemCommand.use( command, parameters );
		SpecialOutfit.restoreImplicitCheckpoint();
The SpecialOutfit.createImplicitCheckpoint saves an array of items (indexed by slot) and SpecialOutfit.restoreImplicitCheckpoint goes through that array and equips (or unequips) an item into a specific slot for anything that doesn't match.

So, if you say "use xxx" and it equips Travoltan trousers to buy xxx from an NPC, it will restore your previous pants when it is done using it.
 

Veracity

Developer
Staff member
Well, I have a theory. I assume you have a saved outfit with the 2 ladles. When you put on an outfit, we attempt to parse the results and figure out what went where. Perhaps we saw the two ladles and decided, for some reason, that they both went in to the weapon slot ? Now, if you'd put on the outfit via the Gear Changer, we'd correct that right away when we fetch api.php, but if you did it in the Relay Browser on the equipment page, that would force a charpane refresh, which does not include your equipment.

It'll be a while before I can try this again, since my only dual wielding character just ascended, but I'll see what I can come up with. Come to think of it, dual wielding ANY two identical weapons might cause this. Stay tuned.
 

Veracity

Developer
Staff member
On the other hand, since I am in Fistcore, testing my theory will have to wait until I free the king.
 

Veracity

Developer
Staff member
I've done quite a bit of testing and I still cannot reproduce it. It obviously has nothing to do with the PYEC; it is outfit checkpointing within the "use" command. A good thing, since otherwise I'd get about one test a day. I used MMJ.

I did this:

- I created an outfit with two Hand that Rocks the Ladle

- wear Birthday Suit
- equip outfit via Gear Changer
- notice that I had both the weapon and the offhand
- use 1 mmj
- the offhand was not removed

- wear Birthday Suit
- equip outfit using CLI
- notice that I had both weapon and the offhand
- use 1 mmj
- the offhand was not removed

- Wear Birthday Suit
- equip outfit in the Relay Browser
- notice that I had both weapon and the offhand
- use 1 mmj
- the offhand was not removed

I'm at a loss, here. Unless you can give me a reproducible sequence of actions that results in your offhand being equipped, I have no more ideas about what I can do to help you.
 

fronobulax

Developer
Staff member
I'm at a loss, here. Unless you can give me a reproducible sequence of actions that results in your offhand being equipped, I have no more ideas about what I can do to help you.

I didn't mention this because I am not sure of the extent to which this is related, if any. I was running autoBasement after a long hiatus and there were several instances where it stopped. I received a message which I assumed came from mafia to the effect that it was nonsensical to equip something offhand when my main hand was empty. I didn't bother to track this down at the time since the Basement was annoying enough as it is, and just restarting the script resolved the issue. I will check session logs when I am on the computer that has them and see whether I have anything to add.
 

Veracity

Developer
Staff member
Let's be completely clear about this.

I am not interested in anecdotes.
I am interested in specific instructions that give me a step-by-step way to reproduce a bug.
In the absence of such - as in the original report in this thread - we can make deductions and try things, but if we fail to reproduce the bug, we have no choice but to throw up our hands and mark it "Cannot Reproduce".

I don't know if your anecdote is related to this bug. It seems unlikely, but, you know, it remains an anecdote - and thus ignorable - until and unless you can produce what I said is required: specific instructions that give me a step-by-step way to reproduce a bug.
If you can produce those, thanks. Post them and we will fix it.
Until then, no more anecdotes, please.
Thanks.
 
Top