Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(5 Kb)
Download
Updated: 10-13-10 07:57 PM
Pictures
File Info
Updated:10-13-10 07:57 PM
Created:05-12-09 04:35 AM
Downloads:9,169
Favorites:126
MD5:

kRestack  Popular! (More than 5000 hits)

Version: 40000.1
by: Katae [More]

Simple, low profile addon for quickly and automatically compressing your bag, bank, or guild vault inventory item stacks, keeping them nice and tidy, all while being unobtrusive.

If you have any class/profession specific bags equipped (warlock soul pouch, mining bag, inscription, etc), items that can go into those bags will be automatically sorted into them while the addon runs.

Auto-stacking, when enabled, will run only when opening or closing bags and looting, so you can safely split stacks, trade, etc. without turning the setting off.

Configuration can be reached with a slash command or with an optional Data Broker display (as shown in the picture).

/restack : Configure or manually run the addon.

40000.1 -- 2010-10-13
- 4.0 toc update.
- "arg1" bug fix.

1.1.1 -- 2009-12-08
- 3.3 toc update.

1.1 -- 2009-08-14
- Fixed a bug with multiple "special" bags conflicting with each other.
- Version bump.

1.0.9 -- 2009-08-04
- TOC updated to 3.2

1.0.8 -- 2009-07-08
- Some memory optimizations.
- Extended bag hooking to cover all of the bag open/close events.

1.0.7 -- 2009-06-16
- Code optimizations.
- In addition to restacking the player's bags, left-clicking the LDB plugin will now restack bank or guild vault when viewing them.

1.0.6 -- 2009-06-11
- Item looping now resets properly after finding and moving a matching partial stack. The entire process should now be much more stable and orderly.
- Special bags with partial stacks and no free bag slots should now be correctly filled with partial stacks from other bags.
- Set the LDB plugin to load when an addon with LDB embedded is loaded.
- Changed LDB data object type to "launcher".

1.0.5a -- 2009-06-06
- LDB conditionals in place.
- File structure and toc changes. Removed LDB libs that should be loaded anyway if there's a display.

1.0.5 -- 2009-06-06
- Fixed a bug in class/profession item sorting. A check wasn't in place to see if the item of the same type was a container, the result was bags in the inventory being equipped over the one already there.

1.0.4 -- 2009-06-02
- Throttled "OnUpdate" yield script.
- Minor backpack hook change.
- SavedVariables now account wide; settings still per-character.

1.0.3 -- 2009-05-23
- Removed auto-stacking from the TRADE_SHOW event.

1.0.2a -- 2009-05-22
- Added missing label text for LDB plugin.

1.0.2 -- 2009-05-22
- Added support for Data Broker. Left-click stacks bags, right-click opens menu.

1.0.1 -- 2009-05-19
- Fixed the handling of initializing saved variables when updating from 0.9
- Fixed a bug that disabled guild tab switching when guild bank auto-stacking is turned off.

1.0 -- 2009-05-18
- Added support for restacking guild vault tabs.
- Hooked bag auto-stack to LOOT_OPEN and TRADE_SHOW, and guild bank auto-stack to GUILDBANKFRAME_OPENED and SetCurrentGuildBankTab(i).
- Extended auto-stack toggle to enable or disable bags, bank, or guild bank individually.
- Will now move items that can go into special class/profession bags into those bags if possible (soul shards, herbs, arrows, etc).
- Cleaned up and commented code.

0.9 -- 2009-05-13
- Added option to auto-stack when opening bags or bank, off by default. Toggle with '/restack auto'
Archived Files (13)
File Name
Version
Size
Author
Date
40000.1
5kB
Katae
12-08-09 03:12 AM
1.1
5kB
Katae
08-14-09 02:03 AM
1.0.9
5kB
Katae
08-10-09 08:06 AM
1.0.7
5kB
Katae
06-16-09 01:30 AM
1.0.6
5kB
Katae
06-11-09 09:07 AM
1.0.5a
5kB
Katae
06-06-09 01:28 PM
1.0.5
10kB
Katae
06-06-09 07:04 AM
1.0.4
9kB
Katae
06-02-09 11:17 PM
1.0.3
11kB
Katae
05-23-09 03:36 PM
1.0.2a
11kB
Katae
05-22-09 05:55 PM
1.0.2
11kB
Katae
05-22-09 03:05 PM
1.0.1
4kB
Katae
05-19-09 04:12 AM
1.0
3kB
Katae
05-18-09 06:51 AM


Post A Reply Comment Options
Unread 12-18-10, 11:14 PM  
AmiYuy
A Deviate Faerie Dragon
 
AmiYuy's Avatar
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 61
Uploads: 1
For some reason this no longer seems to be automatically re-stacking when I open/close my bags. It still works if I click the button or use the slash command, but even though Bags/Bank/Guild Vault are checked, the auto function isn't working. No errors are being thrown and I deleted my saved variables for it, but no change.

I am using cargBags Nivaya, so there shouldn't be any interference.
Last edited by AmiYuy : 12-18-10 at 11:15 PM.
AmiYuy is offline Report comment to moderator  
Reply With Quote
Unread 12-14-10, 04:34 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Have you tried it with ark turned off? There shouldn't be a conflict...
Katae is offline Report comment to moderator  
Reply With Quote
Unread 12-14-10, 07:18 AM  
Rammoth
A Cliff Giant
 
Rammoth's Avatar
AddOn Author - Click to view AddOns

Forum posts: 73
File comments: 640
Uploads: 1
Confusion:

I'm having trouble getting the add-on to actually work. When type /restack it shows 2 options that I can do, but only as a slash command. Once I try either one, nothing happens. I don't know why. I use ArkInventory at the moment. Do I have to use Bagnon for this to work?
Last edited by Rammoth : 12-14-10 at 07:18 AM.
Rammoth is offline Report comment to moderator  
Reply With Quote
Unread 11-07-10, 06:22 PM  
KyrosKrane
A Kobold Labourer

Forum posts: 0
File comments: 12
Uploads: 0
Originally posted by Katae


I suspect if you take that code bit out of the if block, the stack counts will be restacked in decrementing order like you want.
Awesome, that worked perfectly! Thank you so much.
KyrosKrane is offline Report comment to moderator  
Reply With Quote
Unread 11-07-10, 05:44 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by KyrosKrane
Great add-on, most useful. I was looking through the code ... that's some scary-good code-fu you got there.
Highly appreciated!

Originally posted by KyrosKrane
One request, if possible please. Could you adjust the stacking logic so that the partial stack of any given item (if any) is the last one in the bags? If you look at the screenshot you have posted for this add-on, you can see that the mana potions become stacked as 20/2/20. It would be better if they could be 20/20/2.
I can't be 100% sure; I don't have an active account and the add-on has been mature for over a year.

This line here (line 215) should be checking if the inversely matched stack is a partial stack and not a full stack before stacking it on top of the first partial stack that was found.

Code:
if _count < _stack then found, pbag, pslot = true, _bag, _slot; break end
I suspect if you take that code bit out of the if block, the stack counts will be restacked in decrementing order like you want.

Code:
--if _count < _stack then
found, pbag, pslot = true, _bag, _slot
break
--end
Katae is offline Report comment to moderator  
Reply With Quote
Unread 11-07-10, 01:09 PM  
KyrosKrane
A Kobold Labourer

Forum posts: 0
File comments: 12
Uploads: 0
Hey there. =)

Great add-on, most useful. I was looking through the code ... that's some scary-good code-fu you got there.

One request, if possible please. Could you adjust the stacking logic so that the partial stack of any given item (if any) is the last one in the bags? If you look at the screenshot you have posted for this add-on, you can see that the mana potions become stacked as 20/2/20. It would be better if they could be 20/20/2.

The reason for this is that I use your add-on in conjunction with Panda for milling herbs, and Panda fails if the first stack it encounters of a given herb has less than five items. So for example, if your add-on were to create stacks of 4/20/20, then Panda would fail due to the initial four-stack.

I've asked the author of Panda if he could work around it, but he didn't seem interested.

Thanks again for your time and for this great add-on!
KyrosKrane is offline Report comment to moderator  
Reply With Quote
Unread 10-13-10, 07:58 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Bug fixed and toc updated, thanks guys.
Katae is offline Report comment to moderator  
Reply With Quote
Unread 10-13-10, 07:02 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by spiralofhope
I split a stack, closed my bag and re-opened it, and nothing happens.

Turning on the LUA error frame, I can see an infinite number of errors regarding arithmetic on arg1.

Did I misunderstand your change? [/b]
This arg1 error is also in the coroutine yielding function within onupdate, which I believe you can fix on your own with this...

f:SetScript("OnUpdate", function() -> f:SetScript("OnUpdate", function(self, arg1)

In retrospect, the arg1 trick was sloppy coding on my part...
Last edited by Katae : 10-13-10 at 07:03 PM.
Katae is offline Report comment to moderator  
Reply With Quote
Unread 10-13-10, 06:42 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by suicidalkatt
Simple fix for 4.0.1 functionality for those curious.
I'll check it out on a trial account shortly, thanks for the heads up.
Katae is offline Report comment to moderator  
Reply With Quote
Unread 10-13-10, 04:16 PM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 11
File comments: 207
Uploads: 0
Originally posted by suicidalkatt
Simple fix for 4.0.1 functionality for those curious.

Line 57:

Code:
f:SetScript("OnEvent", function(self, event, ...)
e = event
local arg1, arg2 = ...
This is what I understood would work:

Code:
f:RegisterEvent'GUILDBANKFRAME_CLOSED'
f:SetScript("OnEvent", function(_, e)
    -- more ldb stuff
=>

Code:
f:RegisterEvent'GUILDBANKFRAME_CLOSED'
f:SetScript("OnEvent", function(self, event, ...)
e = event
local arg1, arg2 = ...
    -- more ldb stuff
I split a stack, closed my bag and re-opened it, and nothing happens.

Turning on the LUA error frame, I can see an infinite number of errors regarding arithmetic on arg1.

Did I misunderstand your change?
__________________
spiralofhope.com
spiralofhope is offline Report comment to moderator  
Reply With Quote
Unread 10-13-10, 11:27 AM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 317
File comments: 1405
Uploads: 60
Simple fix for 4.0.1 functionality for those curious.

Line 57:

Code:
f:SetScript("OnEvent", function(self, event, ...)
e = event
local arg1, arg2 = ...
suicidalkatt is offline Report comment to moderator  
Reply With Quote
Unread 12-22-09, 11:40 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by radighoul
Any chance to have this addon hide the gui icon and restack text. I don't really need to see it on my screen for it to work.
You mean the LDB part of the addon? Just go into your data broker display config (whichever it may be) and turn it off.
Katae is offline Report comment to moderator  
Reply With Quote
Unread 12-22-09, 02:37 PM  
radighoul
A Kobold Labourer
AddOn Compiler - Click to view compilations

Forum posts: 0
File comments: 19
Uploads: 1
Any chance to have this addon hide the gui icon and restack text. I don't really need to see it on my screen for it to work.
radighoul is offline Report comment to moderator  
Reply With Quote
Unread 08-14-09, 01:31 AM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by zaphon
I've found some weird behavior when you have multiple "special" bags. For example, I have a bank alt who only holds herbs. She has 4 herb bags on her, and than some more in the bank. Every time I open my bags, it goes crazy re-organizing stuff. Same thing for my gem storage, leather storage, etc. It get's weirded out by multiple "special" bags. :-)
That is indeed some odd behavior... I've put in some extra conditionals to make sure it's only moving items from normal bags and not special ones. Uploading in a bit with the fix.

Thanks!
Katae is offline Report comment to moderator  
Reply With Quote
Unread 08-13-09, 11:57 PM  
zaphon
A Defias Bandit

Forum posts: 2
File comments: 35
Uploads: 0
I've found some weird behavior when you have multiple "special" bags. For example, I have a bank alt who only holds herbs. She has 4 herb bags on her, and than some more in the bank. Every time I open my bags, it goes crazy re-organizing stuff. Same thing for my gem storage, leather storage, etc. It get's weirded out by multiple "special" bags. :-)
zaphon is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: