lotrointerface.com
Search Downloads


Go Back   LoTROInterface > Outdated LotRO Interfaces


Post A Reply
Author Comments Comment Options
Unread 11-16-2010, 12:11 AM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
I have definitely lost more items. When this happens I just see an empty slot or two in the bag following a sort. It just happens so fast though that I usually can't tell specifically what was lost, just that there is one less of something there. Maybe some kind of check can be performed before the swap or maybe a hundredth of a second added to slow it down a bit?

I really appreciate everyone's work on this plugin. Thank you.

Last edited by cwsonline : 11-16-2010 at 12:19 AM.
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-16-2010, 10:28 PM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
I can reproduce the item destruction pretty easily with just splitting stacks and sorting. Here is a short clip I made in Fraps. You can view it in HD if you want any more detail. This is just a brief clip I made showing a problem I have been encountering with SortPack (I have also had items disappear with FilterBag). In this clip I am running SortPack with TOBII on a fresh character. I split two stacks of items then type /sort. The items are sorted as would be expected. I then type /sort again and two of the items are destroyed.

http://www.youtube.com/watch?v=njitK8u98x8

Thank you!

Last edited by cwsonline : 11-17-2010 at 08:45 AM.
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-17-2010, 04:57 PM  
BullFrog
The Wary

Forum posts: 1
File comments: 14
Uploads: 0
DO NOT use this plugin too often, since it delete items from inventory -.-

i had 3x50 pack of Shire Sweet Leaf, for fun (and for test the plugin) i made 2x25 pack +2x50 pack of leafes. And 25 pieces of leafes just disappered. And I belive its not the only item I've lost during the sort command, because magically few items disappeared from my inventry.

So use it at your own risk.


now i tried it again, just to test myself, i had 50+50+21, i made 25+25+50+21 pack, now i have only 17+50 , great plugin thanks for sharing

Last edited by BullFrog : 11-17-2010 at 05:01 PM.
BullFrog is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-17-2010, 06:31 PM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
I don't think it's a problem specifically with SortPack as i've had this happen with FilterBag as well. I think it has something to do with the method of moving the items. I could be totally off but I think the items are being swapped instead of moving one item out of a slot and moving the other item in. When you have two incomplete stacks that are small enough to combine, they don't swap, which ends up causing items to be lost. If you watch my earlier clip and go to 1080 HD, you can see that there were three identical stackable items. For a split second the item count goes to 2 just before the items are destroyed. Any ideas? Thank you.
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-18-2010, 05:42 PM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Many thanks for the video cwsonline - Now I have a way of reproducing the bug I can try and fight it. I have had a few hours spare tonight and wrestled with all sorts of ideas.

One idea was to do a search-and-re-stack before sorting, but that didn't work if you had *full* stacks. Tried altering item weights so each weight was unique. That didn't work either.

Very frustrating.

Will keep going!

Sadly I am very busy at work right now, and obviously the maths education of my classes counts as a greater cause!

I apologise to anyone who has lost items, but as LUA Plugins are Beta (check Turbine) bugs like this are going to happen.

EDIT: The longer I look at this the less obvious the answer seems to be. It appears to be a bug with the PerformItemDrop() command. I have tried various ways of implementing the command and had no success at all - it is almost as if the program is trying to condense stacks and then deleting them due to the speed of the plugin.

EDIT TO THE EDIT!: Right, of course! The command is trying to combine slots... I have an idea!

Final Edit for tonight: Really thought I had it. Was working perfectly and not combining piles. Then... suddenly it started doing it again. Midnight now and full work for the next two days, so it will be Sunday at the earliest before I get a chance to have a look. *Swears loudly and stomps off to bed*

Last edited by MrJackdaw : 11-18-2010 at 06:57 PM.
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-18-2010, 08:07 PM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
Would a solution be to compare the two items before the PerformItemDrop()? If they are the same then skip it? I think this would also eliminate the swapping of two non stackable items you see when things are already sorted.
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-19-2010, 01:28 AM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Quote:
Would a solution be to compare the two items before the PerformItemDrop()? If they are the same then skip it? I think this would also eliminate the swapping of two non stackable items you see when things are already sorted.
That's what I was doing - however something odd happens. Will keep coding...
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-19-2010, 04:53 PM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Spent all night working on a solution that, in theory, would work. But... I get a "You are too busy to do that right now." message and it stops the plugins.

Bugger.
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-19-2010, 10:12 PM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
I keep checking and I will test as soon as something is posted. Thank you for all your work MrJackdaw!
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-20-2010, 02:30 AM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Failed!

The problem is definitely due to the behaviour of PerformItemDrop() this does not seem to perform a true swop and can consolidate items instead. I think this is what is causing the loss behaviour we have seen.

I have uploaded to the SVN a version that *nearly* fixes the problem as it doesn't swop items if they are identical, and this seems to work, most of the time.

However, it does not fix the issue completely.

I completely recoded the plugin to use a shuttlesort, without using the LUA sort, and it worked - no item loss, perfect. BUT! I kept getting the "too busy" prompt and it would stop the plugin, meaning you had to run it 10, 20, 30 times for the pack to sort. No good.

Right now I am completly at a loss. Everything I try causes the "too busy" prompt and stops the plugin.

Sorry guys, looks like this is a loss for now.

Dammit!

For a little side project I wasn't going to spend any time on it sure has soaked up a few days!

Last edited by MrJackdaw : 11-20-2010 at 02:30 AM.
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-20-2010, 11:45 AM  
Hazado
The Indomitable
Interface Author - Click to view interfaces

Forum posts: 10
File comments: 21
Uploads: 1
Re: Failed!

Quote:
The problem is definitely due to the behaviour of PerformItemDrop() this does not seem to perform a true swop and can consolidate items instead. I think this is what is causing the loss behaviour we have seen.

I have uploaded to the SVN a version that *nearly* fixes the problem as it doesn't swop items if they are identical, and this seems to work, most of the time.

However, it does not fix the issue completely.

I completely recoded the plugin to use a shuttlesort, without using the LUA sort, and it worked - no item loss, perfect. BUT! I kept getting the "too busy" prompt and it would stop the plugin, meaning you had to run it 10, 20, 30 times for the pack to sort. No good.

Right now I am completly at a loss. Everything I try causes the "too busy" prompt and stops the plugin.

Sorry guys, looks like this is a loss for now.

Dammit!

For a little side project I wasn't going to spend any time on it sure has soaked up a few days!
Maybe start a topic on the forums, Im sure the Lua manager will take a look at the problem and we may get a fix then
http://forums.lotro.com/forumdisplay...amp-Discussion

Or maybe send Narrel a message on the Forums about the problems with performitemdrop()

Last edited by Hazado : 11-20-2010 at 11:46 AM.
Hazado is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-20-2010, 11:47 AM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
What if, instead of skipping the swap if the items are the same, a check is made after the swap to determine if they were combined such as checking to see if the slot that the one item was being moved from is now empty? If that is the case then restart the sort from scratch or, for an interim safety measure, stop the sort? One or more /sorts (depending on if it will rerun automatically) would then combine and sort the items?

Last edited by cwsonline : 11-20-2010 at 11:49 AM.
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2010, 12:08 AM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
MrJackdaw, I was wondering if you could take a look at this. I made a couple minor changes. It's not perfect but it should keep items from being destroyed. All I am doing here is just comparing the names of the item to be moved and the item being replaced. If they are the same then skip it. The sort won't fully complete in all cases but no more attempting to move items that don't need to be. Thank you.

Code:
--Now, map the virtual backpack to the real backpack			
	for i = 1, size do
		item = backpack:GetItem(VirtualBackpack[i].id);
		swapitem = backpack:GetItem(i); --Get the item that will be replaced.
		if item ~= nil then
			if swapitem ~= nil then
				if swapitem:GetName() ~= item:GetName() then --Drop only if the items don't have the same name.
					backpack:PerformItemDrop(item,i, false)
					--Turbine.Shell.WriteLine(item:GetName().." has a weight of "..VirtualBackpack[i].Weight) <<Just in case I want to check it is doing its job right.
				end
			else
				backpack:PerformItemDrop(item,i, false)
			end
		end
	end
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2010, 10:27 AM  
cwsonline
The Indomitable
 
cwsonline's Avatar

Forum posts: 13
File comments: 47
Uploads: 0
I had tried, unsuccessfully, a couple of other things such as condensing the bag down before the sort, trying to stack items before the sort, etc. This only worked with multiple /sorts and gave the "You are too busy messages".

I have a couple of other ideas that I will try out this evening. We'll see what happens.

Last edited by cwsonline : 11-23-2010 at 10:30 AM.
cwsonline is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-24-2010, 03:57 PM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Sounds like you are going through the same process as I did! Sorry I have no time right now to look at this. Very busy at work and I go into hospital at the end of next week so it's looking bad for me to be able to get any meaningful time to look at things.

Dammit...

Thanks for trying anyway! If you want SVN access just PM me your user name and I will grant it. There is a partially fixed version there.
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 02:55 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui