Author Topic: [Resolved] Drag, drop and shuffle with combat rigging  (Read 4706 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Resolved] Drag, drop and shuffle with combat rigging
« on: February 26, 2018, 03:02:41 AM »
(v24, linux)

When a character has a combat rigging perk, drag and drop between slots works sometimes differently than with two slots. Opening it as a bug, because how it shuffles isn't consistent (nor intuitive), but feel free to move. If may give a suggestion, would let the dragged item to be always dropped where was released, if possible.

Below are some observations how inventory operations behave, in case it helps anything.

Exchanging items between three populated slots:
-- from the 1st slot to the 2nd, instead of [1->2 2->1 3->3] the operation is [1->3 2->1 3->2].   
-- from the 2nd slot to the 1st, instead of [1->2 2->1 3->3] the operation is [1->3 2->2 3->1].   
-- between the 1st and 3rd slot (both ways), instead of [1->3 2->2 3->1] the operation is [1->3 2->1 3->2].   
-- between 2nd and 3rd slot (both ways), the operation is [1->1 2->3 3->2], which seems to me all right.

There is some further variation with one hand empty. Eg. when the 3rd is empty, it exchanges items between 1st and 2nd slot normally, while when 1st is empty and you want exchange items between 2nd and 3rd, it shifts them into 1st and 2nd. Whereas when you have the 2nd empty and try move 3rd item to the 2nd slot, what it does is [1->3, 3->1], so not only shift but also shuffle.

When there are two hands empty: the 1st item can't be moved anywhere except to inventory, 3rd->1st also won't move, *yawn* 2nd->3rd goes to the 1st, whereas [NOW big bug warning!] both 2nd->1st as well as 3rd->1st operation will cause an item duplication! (not sure if duplicates are real as they sometimes disappear but was able to sell them). In case replication of this isn't clear, can supply step-by-step.

There are more combinations and inconsistencies with dragging items from inventory to weapon slots and back, think can also make different ghost items, perhaps even cause an item dis- and re-apperance... But it seems that all those peculiarities are often result of the shifting inconsistency, where an operation will sometimes shift items and sometimes it won't. Basically: if you have all hands empty it always puts the item to the first slot, no matter where dropped, the next one will end in the 2nd, etc.; whereas, when you remove an item from any slot, it doesn't shift the other items. -> This goes the same with only two slots, but with combat rigging it even more complexifies. Been thinking, is the slot shifting here meant as feature or is it perhaps like default inventory behaviour?
« Last Edit: February 28, 2018, 01:52:09 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Drag, drop and shuffle with combat rigging
« Reply #1 on: February 26, 2018, 08:05:12 AM »
Thanks, will check this one out.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Drag, drop and shuffle with combat rigging
« Reply #2 on: February 27, 2018, 08:03:49 PM »
Will hopefully get to look at this tomorrow. Spent a good part of the day dealing with a frustrating inventory issue, so have a bit of familiarity in the area. It's a really long time since this code was written so can't really remember what intention was. It was likely quite functional, allowing the player to equip items and not having bugs :)

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Drag, drop and shuffle with combat rigging
« Reply #3 on: February 28, 2018, 12:23:07 AM »
Ouch. Yeah, it was. Can you imagine, doing a load of drag and dropping and finding no issues in the end:/...                    : )
Only that the dual behaviour was already there, in case it plays any role for combat rigging problems.   

One example of item duplication:


1. Put items into at least two hands.
2. Drag away any item from the 1st (and possibly 3rd) slot, so only an item in the 2nd slot remains.
3. Drag and drop from the 2nd slot to the 1st slot. Observe suddenly you have two items, one in the 2nd and one in the 3rd slot.
4. Put one of them away and you can make another duplication by dragging the remaining item to the 1st slot again. Rinse and repeat.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Drag, drop and shuffle with combat rigging
« Reply #4 on: February 28, 2018, 01:51:58 PM »
Thanks for the detailed info on the problem - it helped a lot in understanding what was going wrong. It's fixed now for combat and home. Wasn't quite as bad as the bug yesterday, but these inventory bugs are really time consuming to troubleshoot. Have experimented with dragging things around, haven't uncovered anything else. If you do happen to turn something else up, please let me know.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Drag, drop and shuffle with combat rigging
« Reply #5 on: March 01, 2018, 01:20:29 AM »
You're welcome. May I ask what got resolved then? Trying to assess if any issues remain. In the op got pretty much lost in combinations and bundled questioning functionality, where the game puts items pretty much into different slots than you want (even to the point of opposite), together with bugs of duplication (AFAIK there are at least three ways to duplicate). And there was also something looking like dis- and reappearance but haven't recreated (maybe it was with duplicates as those are bugged).

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Drag, drop and shuffle with combat rigging
« Reply #6 on: March 01, 2018, 09:30:18 AM »
Fixed the issue in post #3, item duplication. May look at the issue with where items end up after being dropped in the future, if there's time.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Drag, drop and shuffle with combat rigging
« Reply #7 on: March 01, 2018, 02:18:29 PM »
Ok. As that was specific one just for the sake of completeness will supply a few more examples. 

B. Most possibly resolved, but in case it wasn't clear, the same steps as in the post #3 for when you have two hands empty and drag an item from the 3rd slot to the first.


C. Something that looks like a ghost duplicate:

1. Have items in all three hands and drag away the one fron the 2nd slot.
2. Drag the item from the 3rd slot to the 2nd. Observe that it doesn't put it to this slot, but switches items, so [3->1 & 1->3] instead of [3->2].
3. Now, drag one of them away.
4. The remaining item duplicates itself in the 1st or 3rd slot (if you dragged the one from the 1st slot away then this will now hold a duplicate of the item in the 3rd slot, and vice versa). The duplicate can't be dragged anywhere from the slot. So I initially thought it's just a ghost item/image. But then if you drag another item from inventory to this position it will drop the duplicate to the inventory (so it's more real).


D. Similar but also combined with dis/reappearance:

1. Have items in all three hands and drag away the one fron the 1st slot.
2. Drag an item from the 2nd slot to the 1st (so now you have two items, one in the 1st and one in the 3rd slot).
3. Drag any item from inventory to the 2nd slot. Abrakadabra, the new item is in the 3rd slot and the one that was there before is gone.
4. Where is it? Drag away all remaining items...
5. Voila, the lost item is back... twice! 
Think neither of them can be dragged away from the slot but you can drag items from inventory over them, similar to a duplicate above.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Drag, drop and shuffle with combat rigging
« Reply #8 on: March 15, 2018, 03:39:28 PM »
Can't recreate these steps exactly any more, due to the way equipped items are moved when items are added/removed. Tried to recreate as closely as possible with no errors. Seems like your first example captured the root problem.