Item stacking [RESOLVED]

User avatar
Prester Lewin
Posts: 96
Joined: Thu Sep 13, 2018 2:16 pm

Item stacking [RESOLVED]

Post by Prester Lewin » Thu Sep 13, 2018 2:38 pm

Hi, new board member here, please delete this if it's a known issue or I'm being stupid. I'm using Windows #132, 64 bit.

In certain situations, "unique" items (quest or enchanted items) get stacked with ordinary items and I don't think they can be separated.

For example, Temple of Kyn sent me on a quest to get saint's hair. I got 4 other saint's hair items in the same dungeon. I noticed eventually that they had all gone into the same stack, with a green background, as it was the quest item. I don't think there is a way in-game to separate them and, on completing the quest, I lost all 5.

Also, I got a useful random loot item, a jade that heals stamina. I now have a stack of 9 jades including that one, as every new jade I get joins that stack. I don't know if I've got 9 enchanted ones now - that would be an exploit!

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

Re: Item stacking

Post by Interkarma » Thu Sep 13, 2018 7:28 pm

Thanks for report and welcome to the forums. :)

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

Re: Item stacking

Post by pango » Sun Sep 30, 2018 4:01 pm

I submitted a onliner to fix this, but it may not be the best fix.

Test case savegame: I have mummy wrappings from a fetch quest and I'm in front of shelves that contain standard mummy wrappings.
Attachments
SAVE53.zip
mummy wrappings
(278.12 KiB) Downloaded 7 times
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Item stacking

Post by Interkarma » Sun Sep 30, 2018 10:21 pm

Thank you for saves. This should be resolves in next round of builds thanks to a PR by petchema several hours ago.

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

Re: Item stacking

Post by pango » Sun Sep 30, 2018 11:25 pm

Yup, that's me picking low hanging fruits ;)
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Item stacking

Post by Interkarma » Sun Sep 30, 2018 11:42 pm

Of course, should have put that together. I'm a bit shattered today, think I need to step away for rest of day and get some rest.

Thank you for the fix. :)

User avatar
Prester Lewin
Posts: 96
Joined: Thu Sep 13, 2018 2:16 pm

Re: Item stacking

Post by Prester Lewin » Mon Oct 01, 2018 4:37 pm

Thanks for the hard work, guys. All of you.

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

Re: Item stacking

Post by pango » Tue Oct 02, 2018 11:41 am

Actually there's still a bug with this fix.
Hypothesis: your inventory contains a quest item (say a mummy wrapping), and a standard version of the same object, in this order.
Now pick another standard mummy wrapping: FindExistingStack() will select the quest item (since that's the first it finds in the inventory), then the fix will prevent stacking, even if it should happen with the other standard object.

So FindExistingStack() should really skip quest items like it skips unstackable objects;
Or, unstackable attribute should be implied for quest items (and also implied for items that can have charges or wear that they cannot share with similar objects, etc.)
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Item stacking

Post by Interkarma » Tue Oct 02, 2018 12:31 pm

pango wrote:
Tue Oct 02, 2018 11:41 am
So FindExistingStack() should really skip quest items like it skips unstackable objects;
Thanks for update. I think this is best solution overall.

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

Re: Item stacking

Post by pango » Tue Oct 02, 2018 7:06 pm

I sent a second PR with those changes
https://github.com/Interkarma/daggerfall-unity/pull/925
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply