Download
(3Kb)
Download
Updated: 07-10-10 02:18 PM
Pictures
File Info
Updated:07-10-10 02:18 PM
Created:07-04-10 04:12 PM
Downloads:3,399
Favorites:8
MD5:

Sort

Version: 0.6
by: dibbe [More]

Extremely simple (and quite stupid) addon for sorting bag space. The addon is still under development, be warned.

CURRENT FUNCTIONALITY
- Sort and stack items in bags and bank according to type, subtype, quality and name
- It will completely ignore any items in special bags (i.e. bags that can only contain certain types of items, such as shard- or enchanting bags)

CURRENT BUGS
- Sorting is quite slow

FUTURE PLANS
- Faster sorting algorithm

USAGE
- type "/sort" to sort inventory
- type "/sort bank" to sort your bank

This addon aims to be a very light weight alternative to MrPlow. Short, clean code and low memory footprint (at least while idle) is the primary goal.

0.6
* Merge partial stacks
* Sort by stack count (effectively putting the last partial stack at the end of a row of similar items)
0.5
* Bank support
* Don't break on slots (bag or bank) that don't have a bag
0.4
* Somewhat faster sort algorithm
0.3
* Completely ignore all special bags (i.e. bags that can only hold items of a certain type)
0.2
* Sort by Item Class, Item Subclass and Item Quality as well as name.
* Quicker sorting (still Bubble Sort based though)
0.1
* Initial version. Handles sorting of bags, using bubble sort. Will likely break on specialized bags.
Optional Files (0)


Post A Reply Comment Options
Unread 10-20-10, 05:49 AM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally posted by Caellian
Works well enough, does its job, nothing to complain about, just one weird behavior though, if you look at the screenshot, notice the 4 slots wide hole in the bank, it doesn't make sense as to why this is happening, all the bags are 18 slots.

Sorry for the late reply. My WoW account was dormant for a while, and I haven't been paying much attention.
I certainly can't explain the behavior, and can't think of anything that would cause it. One of my goals with the addon is to keep it simple enough that confusing shit like this should not happen.

Questions:
Does it still occur?
Are all bags the same type - if not, which different ones is it? (item id would help)
Does the hole occur in the same place if you swap the bag order around? I.e. is it always between the same two items? If yes, what items are those? (item ids again, please)
Report comment to moderator  
Reply With Quote
Unread 09-09-10, 03:35 AM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar

Forum posts: 281
File comments: 252
Uploads: 5
Works well enough, does its job, nothing to complain about, just one weird behavior though, if you look at the screenshot, notice the 4 slots wide hole in the bank, it doesn't make sense as to why this is happening, all the bags are 18 slots.

__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Report comment to moderator  
Reply With Quote
Unread 07-11-10, 06:39 AM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally posted by Wella
It's not very friendly to directly link to another 'better' addon in the comments
section. People can find things for themselves.
I don't particularly mind. I even agree that there are better addons out there (depending, perhaps, on how you look at it). My ambition level is much lower than most's.

Anyway, if this was quicker and you had the option to auto-stack/sort at various events, such as after looting, purchasing, receiving mail, etc. I would probably use this.
Admittedly, I expected the performance to be an easier thing to fix. The limitation (that you have to wait for communication with the server all the time) was more severe and had more impact than I expected. I'll get to it eventually, but I make no promises about a time schedule.

Sort does stacking now (since 0.6), and the idea to auto-sort on certain events actually hadn't occurred to me. I'll consider it, but again I make no promises. At a first glance, it seems like a feature that may cause about as much trouble as it solves. Thanks for the suggestion.
Report comment to moderator  
Reply With Quote
Unread 07-11-10, 04:53 AM  
Wella
A Rage Talon Dragon Guard
 
Wella's Avatar
AddOn Author - Click to view AddOns

Forum posts: 322
File comments: 72
Uploads: 1
Originally posted by Lamark
http://wow.curseforge.com/addons/bag-sort/ is better
It's not very friendly to directly link to another 'better' addon in the comments section. People can find things for themselves.

Anyway, if this was quicker and you had the option to auto-stack/sort at various events, such as after looting, purchasing, receiving mail, etc. I would probably use this.
__________________
Addons I use, not that any of you care
* Bejeweled - For boring 5 minute flights to Tanaris
* Genie - Blizzard really should have implemented bag sorting by now
* ncHoverBind - I'm a Lock, what can you expect?
* oGlow - Agan, a missing feature
* Recount - Derp
* ShooShards - Another missing feature


"Your idea is good. So i will try it."
- popmissa
Report comment to moderator  
Reply With Quote
Unread 07-10-10, 10:53 AM  
JackOnTheMap
A Murloc Raider

Forum posts: 8
File comments: 147
Uploads: 0
Originally posted by Lamark
http://wow.curseforge.com/addons/bag-sort/ is better
Last updated 28 Oct 2008? I'm sure it may still work but I'd personally prefer to use updated addons.
Report comment to moderator  
Reply With Quote
Unread 07-07-10, 01:10 PM  
Lamark
A Kobold Labourer
 
Lamark's Avatar

Forum posts: 0
File comments: 6
Uploads: 0
Report comment to moderator  
Reply With Quote
Unread 07-07-10, 04:15 AM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Reading your post, Zidomo, I think I came to the conclusion that we're actually in agreement. The thing we may disagree on is whether Ace/LPT is necessary (or rather useful) for a simple sorting addon.
Though, I'm not even sure about that, and suspect that it was just my poor choice of words that made you misunderstand my motivation, and just flagged me as an irrational follower of the Not Invented Here principle :-)

In either case, I thank you for your comments. In particular the last one's discussion about garbage generation - something Sort was really bad at until 0.4 (and still can do better).
Report comment to moderator  
Reply With Quote
Unread 07-06-10, 03:07 PM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1046
Uploads: 0
Originally posted by dibbe
Fair enough. I don't imply a mysterious inherent badness about LUA libraries in particular, but rather a badness (nothing mysterious) about any huge software library needed for solving a simple task, be it Qt, .NET, glibc (smaller alternatives exist) and also some LUA libraries for WoW. If you have plenty of addons that use these libraries, all is well and good. If you, like me, usually use a total of three or four addons, none of which is over a KB or two in total size, introducing an addon which pulls 500KB (in pure source code) worth of libraries is is annoying, and even noticeable on low end machines.
Grouping all software frameworks into one generalized blob and assuming behaviors based on what other ones do without looking at what a specific one does, sure, you can run into misconceptions.

Ace3 (& LibPerodicTable (LPT)) specifically are not all-in-one frameworks. Unlike frameworks like .NET, etc., you can use only the libraries you need and leave out anything you don't. As well, LPT is LOD. Which means you won't be loading that "gigantic" 500kb each time (again, shared between mods), only what the mod actually uses.

In WoW LUA: static memory used is totally irrelevant. Unless you are loading, say, a database mod with 20MB+ of SV data (which can delay logon by a couple seconds). I used to run WoW and still test on a low end machine. And I am quite sensitive to excessive resource usage of any mod (as people who have seem my testing here and elsewhere can verify ). Believe me, a few hundred KB (or less) of static memory used certainly is not noticeable on "low end" machines.

What's potentially noticeable on low end machines:
--CPU cycle usage (continual or spikes). This item is by far the #1 thing that can cause issues on low (& high) end machines.
--continual memory consumption (as opposed to static).
--excessive, ongoing garbage generation (this was more an issue in the old pre-2.0 days when Blizzard didn't use "smart" incremental garbage collection running in the background).

None of which really apply to Ace3 or LPT. Ace3 uses 0 to 0.9 CPU/second when idle, depending what libraries are used. AceTimer uses the most, a lot of other of its libraries use 0. LPT uses 0.

Both Ace3 & LPT have 0 memory consumption after the initial static load.

Garbage generation at load is very low for both frameworks as well.

Originally posted by dibbe
Apart from the noticeable resource allocation, large software packages have somewhat more indirect problems. Feature creep and internal inconsistency for historical reasons (backwards compatibility) make them hard to penetrate. Often there are subtle and non intuitive behaviors (usually also for historical reasons) that hinder, rather than help development. Though these later reasons are none I have seen in Ace in particular (as I admittedly don't know Ace well at all), but rather a gut feeling I've acquired over the years w/r to large libraries in general.
These are valid criticisms of software frameworks in general. None of which really apply to Ace3 or LPT. Resource allocation has been previously discussed. Ace3 has not really had any feature creep since it came out of alpha. The only "creep" in LPT is in adding new items in the game to its tables. And so on.

For sure, in general, using a library framework just because you can and not for any reason other than that is not a great reason to do so. But for reasons such as a general "making development easier", reducing development time, avoiding alpha custom code methods that can be obtained a lot more easily from a library, reducing CPU time used, etc., a mature multi-part library framework can be of benefit. To some people. More information here.

Again, best of luck with development of Sort; may be testing it later .
Report comment to moderator  
Reply With Quote
Unread 07-06-10, 02:20 AM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally posted by Ferous
The sorting takes forever, but when all the bugs and tweaks have been set, i plan to use this For now, I use Bankstack.
Thank you for the vote of confidence. I warn you that I may never get around to managing trade material bags properly (I've really never found them useful). A quicker sorting algorithm and bank support can be expected though.
And my main's a warlock, so at least I'll make sure it doesn't break on shard bags in a not too distant future.
I sort of suspect that once I've solved the shard bag problem, the other specialized bags can be handled in a similar way, but I'm not completely sure about that. What I want to avoid is keeping a huge list of all trade materials and bags (à la LibPeriodicTable - the point of this addon was specifically to avoid that), so I'll need to figure out another way of handling the problem.
I'm hoping to be able to detect specialized bags simply by realizing that certain things can't be moved into them, but I haven't actually tried writing any code that deals with it yet, so it's still just vague plans...
Report comment to moderator  
Reply With Quote
Unread 07-06-10, 02:07 AM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally posted by Tuller
I find this interesting because of your use of coroutines. I had completely forgotten that they exist in wowlua.
Yeah, they're convenient when stacking lots of interface actions. The idea is not mine though, but stolen from MrPlow which also uses coroutines to solve the same problem.
I'm not sure the best way to restart sleeping routines is to listen on OnUpdate events to a window though - my knowledge of "good patterns" for WoW/LUA is very poor. It's one of the implementation details I referred to in a previous post as being "quite unhappy with".

Originally posted by Tuller
A global print function is already defined in more recent versions, too.
Ah, yes. Thank you for pointing it out.
Report comment to moderator  
Reply With Quote
Unread 07-05-10, 05:48 PM  
Ferous
Sheer Sense of Doom
AddOn Author - Click to view AddOns

Forum posts: 863
File comments: 563
Uploads: 10
The sorting takes forever, but when all the bugs and tweaks have been set, i plan to use this For now, I use Bankstack.
Report comment to moderator  
Reply With Quote
Unread 07-05-10, 04:59 PM  
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 91
File comments: 1740
Uploads: 17
I find this interesting because of your use of coroutines. I had completely forgotten that they exist in wowlua.

A global print function is already defined in more recent versions, too.
Report comment to moderator  
Reply With Quote
Unread 07-05-10, 04:34 PM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
Originally posted by Zidomo
The Ace3 & PeriodicTable libraries are nothing more than software frameworks. They are shared between mods, use few resources, etc. etc.. Also, its not Ace3 or LibPeriodicTable libraries determining sort orders. Its the individual sort algorithms each mod uses along with any user modifier options (i.e. "move junk to the front", etc.). Test a full bag sort between BankStack & MrPlow (two Ace3 mods) with backpacks having the majority of space occupied by items. They will never end up with with the same sort order.
That is true. MrPlow, at least, does however base its sorting on data that is available only through LibPeriodicTable.

Originally posted by Zidomo
My hair goes into static flyaway when people mention and/or imply that there is some mysterious inherent badness about mature LUA library systems like the above without detailing what it is. I wish you the best in the development of this mod, though.
Fair enough. I don't imply a mysterious inherent badness about LUA libraries in particular, but rather a badness (nothing mysterious) about any huge software library needed for solving a simple task, be it Qt, .NET, glibc (smaller alternatives exist) and also some LUA libraries for WoW. If you have plenty of addons that use these libraries, all is well and good. If you, like me, usually use a total of three or four addons, none of which is over a KB or two in total size, introducing an addon which pulls 500KB (in pure source code) worth of libraries is is annoying, and even noticeable on low end machines.

Apart from the noticeable resource allocation, large software packages have somewhat more indirect problems. Feature creep and internal inconsistency for historical reasons (backwards compatibility) make them hard to penetrate. Often there are subtle and non intuitive behaviors (usually also for historical reasons) that hinder, rather than help development. Though these later reasons are none I have seen in Ace in particular (as I admittedly don't know Ace well at all), but rather a gut feeling I've acquired over the years w/r to large libraries in general.

That said, I'm sure there are plenty of things I can learn from Ace (and similar). This is one of the first things I've coded for WoW (and in LUA) and there are a few things I'm quite unhappy with in my current implementation.
Report comment to moderator  
Reply With Quote
Unread 07-05-10, 04:05 PM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1046
Uploads: 0
As well as MrPlow & BankStack, there are:
--kRestack
--JPack
--Neat Freak. (I'd also add Stackpack, but it uses outrageous amounts of CPU time when you mouse over any items in your bags, unlike the other mods. Thus its not really a viable option).

The Ace3 & PeriodicTable libraries are nothing more than software frameworks. They are shared between mods, use few resources, etc. etc.. Also, its not Ace3 or LibPeriodicTable libraries determining sort orders. Its the individual sort algorithms each mod uses along with any user modifier options (i.e. "move junk to the front", etc.). Test a full bag sort between BankStack & MrPlow (two Ace3 mods) with backpacks having the majority of space occupied by items. They will never end up with the same sort order.

My hair goes into static flyaway when people mention and/or imply that there is some mysterious inherent badness about mature LUA library systems like the above without detailing what it is . I wish you the best in the development of this mod, though.
Report comment to moderator  
Reply With Quote
Unread 07-05-10, 01:56 PM  
dibbe
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
I've taken a closer look at BankStack and decided to not abandon Sort. While the feature sets are overlapping, I got a bit overwhelmed by the dependency list of BankStack.

Thanks again for pointing it out to me, though.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: