Items unequipped when i buy an item

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
Regnier
Posts: 145
Joined: Wed Oct 02, 2019 6:26 am

Items unequipped when i buy an item

Post by Regnier »

Hey im just throwing this out there to see if others are having this problem.

When i buy an item something on my character will unequip (cloak, khajiit suit)

Also when using info mode in inventory, the window doesnt go away unless you click off an item (on a neutral space).

I exited the game and reloaded and it went away but came back. I went to different stores in different cities.

I havent tried without mods but i have recently updated mods that ive had for a while.

It may have something to do with outfit manager cause it has that ability.

thanks
SAVE209.7z
(508.67 KiB) Downloaded 5 times

User avatar
pango
Posts: 2841
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Items unequipped when i buy an item

Post by pango »

Hi Regnier,
Regnier wrote: Sat Jan 30, 2021 5:02 am When i buy an item something on my character will unequip (cloak, khajiit suit)
Items taken off shelves are immediately equipped, if applicable. This is classic behavior, and also serves as a check that your character class can actually equip the item.
There has been a feature request to change that, but as far as I know it hasn't been implemented by any mod.
Regnier wrote: Sat Jan 30, 2021 5:02 am Also when using info mode in inventory, the window doesnt go away unless you click off an item (on a neutral space).
Expected behavior is that info message stays on display until you click anywhere. I'm not sure from what you describe is you experienced anything different.
Regnier wrote: Sat Jan 30, 2021 5:02 amIt may have something to do with outfit manager cause it has that ability.
Tried with both Outfit Manager and Inventory Filter, didn't notice any difference in those behaviors.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Regnier
Posts: 145
Joined: Wed Oct 02, 2019 6:26 am

Re: Items unequipped when i buy an item

Post by Regnier »

pango wrote: Sat Jan 30, 2021 11:38 am Hi Regnier,
Regnier wrote: Sat Jan 30, 2021 5:02 am When i buy an item something on my character will unequip (cloak, khajiit suit)
Items taken off shelves are immediately equipped, if applicable. This is classic behavior, and also serves as a check that your character class can actually equip the item.
There has been a feature request to change that, but as far as I know it hasn't been implemented by any mod.
I was buying arrows and ingredients, its never happened like this before.
pango wrote: Sat Jan 30, 2021 11:38 am
Regnier wrote: Sat Jan 30, 2021 5:02 am Also when using info mode in inventory, the window doesnt go away unless you click off an item (on a neutral space).
Expected behavior is that info message stays on display until you click anywhere. I'm not sure from what you describe is you experienced anything different.
Normally i would click twice to see the first and second window then click a third time to close the window. Now i have to find a neutral spot on the hud to click out of the info screen.

Thanks

User avatar
pango
Posts: 2841
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Items unequipped when i buy an item

Post by pango »

Regnier wrote: Sun Jan 31, 2021 6:15 am I was buying arrows and ingredients, its never happened like this before.
That's because neither are equippable items.
Regnier wrote: Sun Jan 31, 2021 6:15 am Normally i would click twice to see the first and second window then click a third time to close the window. Now i have to find a neutral spot on the hud to click out of the info screen.
I see. I wonder if that's a side effect of one of all the mods you have installed...
Does it happen without mods?
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Regnier
Posts: 145
Joined: Wed Oct 02, 2019 6:26 am

Re: Items unequipped when i buy an item

Post by Regnier »

pango wrote: Sun Jan 31, 2021 11:45 am
Regnier wrote: Sun Jan 31, 2021 6:15 am I was buying arrows and ingredients, its never happened like this before.
That's because neither are equippable items.
Regnier wrote: Sun Jan 31, 2021 6:15 am Normally i would click twice to see the first and second window then click a third time to close the window. Now i have to find a neutral spot on the hud to click out of the info screen.
I see. I wonder if that's a side effect of one of all the mods you have installed...
Does it happen without mods?
Yes neither are equippable so i shouldnt have had anything unequip. Thats what im talking about; its a new problem and i was wondering if others had noticed

User avatar
pango
Posts: 2841
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Items unequipped when i buy an item

Post by pango »

I remember something like that in a DBFig stream. Turns out his mouse buttons were bouncy, so when clicking on "Yes" button to confirm the buy, first click would go to the button, and a second one would go to the paperdoll and unequip whatever was below mouse cursor...

(okay, that was while selling stuff, but could be the same problem nonetheless)
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 6133
Joined: Sun Mar 22, 2015 1:51 am

Re: Items unequipped when i buy an item

Post by Interkarma »

I tried buying many non-equipable items like arrows and ingredients from several shops, and I didn't experience any equipment being unequipped. That's not to say you haven't found a bug, just that I haven't reproduced it yet. :)

I also stepped through the code while selecting items from stores. These are passed to EquipItem() method for equip logic. To start with, arrows are explicitly excluded and the equip logic will immediately exit if buying arrows.

Code: Select all

if (item.ItemGroup == ItemGroups.Weapons && item.TemplateIndex == (int)Weapons.Arrow)
    return;
So if you're experiencing this with arrows, a bouncy mouse like Pango suggests is the most likely cause. Unless a mod is changing equipment categories or something, the code will never proceed to equip arrow from shop screen.

After checking prohibited materials etc., the item is then passed to player's equip table via playerEntity.ItemEquipTable.EquipItem(item). Here it checks the equip slot on item to see if it can be equipped anywhere. Items like ingredients don't map to any slots, so the code just exits.

Code: Select all

// Get slot for this item
EquipSlots slot = GetEquipSlot(item);
if (slot == EquipSlots.None)
    return null;
The handling for equip slot is hardcoded to Gems, Jewellery, Armor, Weapons (excluding arrows), MensClothing, WomensClothing. Again, arrows and ingredients aren't included here. But note that apothecaries can sell gems like diamonds which are equipable.

So far all working as expected. I'm happy to keep digging though if some new information comes up to help reproduce and there's a weird edge case somewhere.

Regnier
Posts: 145
Joined: Wed Oct 02, 2019 6:26 am

Re: Items unequipped when i buy an item

Post by Regnier »

Interkarma wrote: Mon Feb 08, 2021 1:04 am I tried buying many non-equipable items like arrows and ingredients from several shops, and I didn't experience any equipment being unequipped. That's not to say you haven't found a bug, just that I haven't reproduced it yet. :)

I also stepped through the code while selecting items from stores. These are passed to EquipItem() method for equip logic. To start with, arrows are explicitly excluded and the equip logic will immediately exit if buying arrows.

Code: Select all

if (item.ItemGroup == ItemGroups.Weapons && item.TemplateIndex == (int)Weapons.Arrow)
    return;
So if you're experiencing this with arrows, a bouncy mouse like Pango suggests is the most likely cause. Unless a mod is changing equipment categories or something, the code will never proceed to equip arrow from shop screen.

After checking prohibited materials etc., the item is then passed to player's equip table via playerEntity.ItemEquipTable.EquipItem(item). Here it checks the equip slot on item to see if it can be equipped anywhere. Items like ingredients don't map to any slots, so the code just exits.

Code: Select all

// Get slot for this item
EquipSlots slot = GetEquipSlot(item);
if (slot == EquipSlots.None)
    return null;
The handling for equip slot is hardcoded to Gems, Jewellery, Armor, Weapons (excluding arrows), MensClothing, WomensClothing. Again, arrows and ingredients aren't included here. But note that apothecaries can sell gems like diamonds which are equipable.

So far all working as expected. I'm happy to keep digging though if some new information comes up to help reproduce and there's a weird edge case somewhere.
Thanks Interkarma i have a feeling theres something wrong with the mouse cause im having the info screen issue too.

Post Reply