Download
(46Kb)
Download
Updated: 09-07-10 10:44 AM
Pictures
File Info
Updated:09-07-10 10:44 AM
Created:unknown
Downloads:70,757
Favorites:320
MD5:

cargBags  Popular! (More than 5000 hits)

Version: 2.1.2
by: Cargor [More]

Problems? Visit the Wiki or Help & Discussion Thread!

cargBags is a modular inventory framework. It was created with one simple thing in mind: Taking the boring work away for you, so that you can start right-away with the important things: Layout and categories! You don't have to care anymore about fetching item-data, updating at the right time or creating a sophisticated filtering system - cargBags does this all for you!

From a simple all-in-one inventory over multiple category-based bags to your own needs:

Just start with the user-friendly and commented example cargBags_Simplicity, build upon it and implement your own features. Create and release your own individual bag addon by embedding cargBags!

Default Features

  • modular: remove features you don't need or add new ones
  • simple, fully extensible filtering-system (optional)
  • object-oriented approach
  • embed cargBags and make your own bag addon!
  • extensive API: Hook into every part of cargBags
  • optimized: recycling of buttons, caching of item data and more
  • plugin-system for often-used snippets like a space- or money-display (optional)

Additional resources and help
FAQ

My cargBags doesn't show anything!
Do you have a layout? This is a framework and does nothing by itself!

Will you provide support for alt bags / bank?
No, because it would be too hackish and cause problems. You can use external addons like BagSync. But if you are a layout author, nothing stops you from providing support yourself.

What about auto-stacking / -sorting?
In my opinion, this does not need to be in a bag addon, because there are lots of external addons for this, like Genie or kRestack.

Guildbank? Stack compression?
I'm trying, but don't expect anything soon.

Do you support LibDataBroker?
You can use LibCargoShip for this.

cargBags is licensed under the GPL 2. Go ahead and fork it!

Changes to the core prior to version 1.2 are located in the changelog.txt.
Releases are normally not backwards-compatible, although changes are kept to a minimum!
In most cases the version tagging follows the scheme Rewrite.Feature.Bugfix.

2.1.2
* bank now updates correctly again (sorry for that!)
* mostly bagBar changes and equipSets bugfixes

- .HighlightFunction changed to .highlightFunction (small 'H', consistency FTW)
- bagBar now supports highlightFunctions
- bagBar can be global for all containers (.isGlobal = true)
- new function: Implementation:GetBagButton()
- fixed bagButton onClick not toggling its bag
- fixed typo in equipSets-itemkey
- equipSets now update all open bags when changed
- introducing cargBags:FireEvent(force, event, ...)

2.1.1
* bugfix update, you need this if you have 2.1!
* fixed searchbar, extended filters and bags-sieve

- item.bindOn now supports soulbound items ("soul")
- new itemKey: item.bagType
- removed item.clink
- .toc bumped to Cataclysm

2.1
* The wiki was updated!
* Improved embedding support
* Sieves! Replace the filters with another system
* Scaffolds! Provide your own templates for item buttons
* Extended filters: pass arguments to them!
* Localization tables for auction house item classes

- File structure overhaul
- new Sieve: by bagID - lightweight enthusiasts, get rid of this filter
clutter :P
- Moved the ItemButton-UpdateX functions to their own scaffold, "Default"
- Callbacks are now correctly named events (RegisterCallback -> RegisterEvent,
HasCallback -> IsEventRegistered)
- the SearchBar now needs a .HighlightFunction to work

2.0-beta
* COMPLETE REWRITE
* Don't ever think about fixing your old layout, build a new one =)
* Beta-version, please note the "Planned features"- / ToDo-List
* and please write a comment for bug-reports, feedback, thank-you's and flaming

- object-oriented approach
- bags initialize on first open instead of in loading screen
- new plugin: TagDisplay
- a lot more modular than before!

1.3
* licensed as GPL 3
* fixed background texture of empty bag buttons
* hovering over a bag button can now fade different bag objects
* fixed tooltip-parsing not working correctly
* and now the usual developer-stuff:

- BagBar new property: BagBar.BackgroundTexture - texture path if no icon was found
- new function: object:Fire(callback, ...) - fires a callback with the defined arguments
- new function cargBags.C2I(id) - translates a ContainerID into an InventoryID
- new function cargBags.I2C(id) - translates an InventoryID into a ContainerID
- function changed: cargBags.ParseBags(bagString or bagID or table) - now returns a table every time
- new property: cargBags.BagStrings[] - holds tables of the bagID's for the different bagStrings
- :PreCheckFilters() now also fires on :GetItemInfo()

1.2
* first tooltip-scanning code, if you have wishes for more parsed infos than bindOn,
* please let me know =)

- updated for 3.2
- fixed item.id not working properly
- new item data: item.bindOn - returns "equip", "pickup", "account", "quest", "use" or nil
- 3.2 only: new item data: item.stats - returns a table of all stats of the item (see GetItemStats() for info)
- 3.2 only: new item data: item.sellValue - returns the sellValue in copper of an item
- new plugin: DataBroker - displays a databroker-object, the addon cargoShip is needed for that
Optional Files (1)
File Name
Version
Size
Author
Date
Type
9.0 r93
104kB
01-28-21 04:12 AM
Addon


Post A Reply Comment Options
Unread 05-13-09, 06:45 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
@both of you and a reminder for everyone :
Would you mind asking this kind of questions in the Help & Diskussion-thread. This keeps the comments section of the Core a bit uncluttered and maybe other users look there as well.
I want comments here to only address with the core, for example appearance of wrong buttons or requests for callbacks.

@Logiar: I'll look into this addon and maybe provide you with a solution to it which you can add to your layout

@recluse:
You'd likely have to write another function for your 'fake' main bag which handles the size and position of the sub-bags and its own dimensions. And then you call this function after one (or all) sub-bags were sized at the update.

Somehow it is possible, because other addons do it as well (ArkInventory for example) - and since cargBags-core doesn't to anything about sizing/positioning, it's completely up to your layout
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-13-09, 06:17 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 94
Uploads: 13
Originally posted by Cargor
I would suggest adding these filtered bags and hide their background and all things you don't need (spacing and so on), then position them as you like and make a "global" background that surrounds all frames
[/b]
Is it possible to have them collapse/expand properly, though? I would assume doing this would only allow one filtered bag per row without risking the overflow to really be placed strangely.

I'm poking around with making a layout atm.
__________________
We'd be together, but only diamonds last forever...
Last edited by Recluse : 05-13-09 at 06:18 AM.
Report comment to moderator  
Reply With Quote
Unread 05-12-09, 07:16 PM  
Logiar
A Defias Bandit

Forum posts: 2
File comments: 5
Uploads: 0
When using this mod http://www.wowinterface.com/download...azScrooge.html is there any way to make cargBags show the money value thats modified by NazScrooge?
Report comment to moderator  
Reply With Quote
Unread 05-12-09, 10:09 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Yeah, it's completely up to the layout author

Essentially, it is nothing more than several filtered bags contained in a parent bag.
I would suggest adding these filtered bags and hide their background and all things you don't need (spacing and so on), then position them as you like and make a "global" background that surrounds all frames

It just has to be some simple frame/background and no real cargBags object, as the buttons are stored in your filtered subbags. For money/space display, you can take the ones from the main bag and move them to somewhere else.
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-12-09, 09:57 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 94
Uploads: 13
I was curious about this addon, and gave it a try with a layout, and it's not bad at all - but there is one thing which made me go back to my current, bloated bag addon - the lack of sub-bags. I can't express how much I hate all in one bags, and yes with the filters you provide, you can at least make several virtual bags containing the things you like, but I didn't see any sub-bags for each virtual bag.

Now, this might be something that the layout author has to add in themselves (and that's cool, I'd write my own layout if this is the case), but from the few short minutes I poked around in the code, I didn't see anything which pointed to the allowing of sub-bags.

If I lost you on this sub-bag concept, I can explain further. For example, you can create an extra bag "Consumables", and apply a filter to dump your consumables in there. But now you just have a bag with jumbled pots, elixirs, flasks, food... Creating sub-bags with filters would allow you to have a single "Consumables" bag with several sectioned off categories inside of it.

Code:
Consumables-----------------
| Flasks        Pots       |
| [ ] [ ] [ ]   [ ] [ ]    |
----------------------------
Essentially, it is nothing more than several filtered bags contained in a parent bag.

Now, perhaps the ability is already in cargBags, and I just didn't peruse the code long enough to discover it, but if it is not already a feature, is this something that you would consider adding?
__________________
We'd be together, but only diamonds last forever...
Report comment to moderator  
Reply With Quote
Unread 05-12-09, 06:44 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
For non-Anywhere-bags users, of course.

Handlers are the underlying system that provide the item data for cargBags. The core addon does mostly only the following:
1) Take the inventory data from the handler (items, slot numbers, money, ...)
2) Check the filters and move item in other bags when needed
3) Inform layout that it needs to be updated and pass item data to it

You're currently using it already, because cargBags has a handler named "Standard" included (in handler.lua) - this is a simple one which grabs all your inventory data.

The only change you'd have to make in your layout would be to enable the "Anywhere"-handler if it's loaded - so that it is used instead of Standard. Of course, your users could add it manually, but it's not taking so much space and no resources

Code:
if(cargBags.Handler["Anywhere"]) then
	cargBags:SetActiveHandler("Anywhere")
end
The mentioned self:GetHandler().GetContainerNumSlots()-related thingy is that your function request is piped through the cargBags-core and cargBags ensures from which the data comes. So people using another handler than Standard would still get the standard-blizz-item information, although they're using another handler

An example: In your layout, you're using GetContainerItemLink() to fetch the item link for Tabard-O-Matic. Now a user with Anywhere-bags viewing bags of another character would get the link of the "real" bagslot and from the database of the other character
The UpdateButton-function already stores the correct item-link in item.link - for other function you'd have to use the self:GetHandler()-prefix

Hope, this clears up a few things. Of course it's up to you, if you want to provide support for Anywhere-bags. But I expect your users requesting it
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-11-09, 04:24 PM  
Luzzifus
A Warpwood Thunder Caller
 
Luzzifus's Avatar
AddOn Author - Click to view AddOns

Forum posts: 94
File comments: 237
Uploads: 6
Will my layout keep working if I decide not to use that feature?
Btw. how does that handler stuff work and what are my benefits if I use those?
Last edited by Luzzifus : 05-11-09 at 04:26 PM.
Report comment to moderator  
Reply With Quote
Unread 05-11-09, 02:35 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Of course.

That's the main reason why it was still not included since the first cargBags - it's an often requested feature, but I wanted it to stay completely optional, because it almost doubles memory usage because of its internal database.

Chances are high that I'm releasing a beta today or in a few days. To provide support for it, you'd have to add 3-6 lines in your layout.

But it will mostly break your custom layouts, as you all access GetContainerNumSlots() and similiar Blizz-inventory-function directly instead of passing it through the handler self:GetHandler().GetContainerNumSlots()
__________________
« Website | GitHub »

Oh hai!
Last edited by xConStruct : 05-11-09 at 02:48 AM.
Report comment to moderator  
Reply With Quote
Unread 05-11-09, 01:55 AM  
Luzzifus
A Warpwood Thunder Caller
 
Luzzifus's Avatar
AddOn Author - Click to view AddOns

Forum posts: 94
File comments: 237
Uploads: 6
I hope that will be optional too.
Report comment to moderator  
Reply With Quote
Unread 05-10-09, 05:48 PM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
That's the thing I'm currently working on

The system works perfectly, I just have to get a dropdown-menu ready, so you can select the chars by GUI and not only by Lua-command.
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-10-09, 05:39 PM  
Spookie455
Illiterate Spectre
 
Spookie455's Avatar
Premium Member

Forum posts: 25
File comments: 4
Uploads: 1
Really liking it so far. Would love the ability to view my other toons and my bank while wandering out and about. If that's not already on your to do list.

Not sure if that's something I should request from the plugin developer though? :s
Report comment to moderator  
Reply With Quote
Unread 05-10-09, 04:07 PM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Okay, made a thread for layout/plugin/handler help and discussion. Click here

Now, this comment section should only be for discussion of the Core of cargBags.
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-10-09, 06:30 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Yeah, you're right - overlapping with some of my frames, too. Setting it up so seems to solve it:
Code:
background:SetFrameStrata"HIGH"
background:SetFrameLevel(1)
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-10-09, 05:54 AM  
Luzzifus
A Warpwood Thunder Caller
 
Luzzifus's Avatar
AddOn Author - Click to view AddOns

Forum posts: 94
File comments: 237
Uploads: 6
Originally posted by Cargor
At the moment there is no real variable for the amount of buttons in an object (only for each bag in .Bags of it).

However, if you want to hide empty bags, you can do that in :UpdateButtonPositions() as this is called when the amount of buttons change. So, you can count the amount of them by yourself while the buttons are positioned - and hide/show the object afterwards.
Thanks, that helped alot. So counting the amount of buttons in a category was pretty simple. After that it took some time to build a proper anchoring system so that empty (hidden) bags don't leave empty spaces. But I think I got it working now. ^^

Originally posted by moniker
Just as FYI, I find that I have to do
Code:
background:SetFrameStrata("MEDIUM")
to keep the bag background above various other UI elements -- otherwise I have buttons floating on top of things like the minimap, unitframes, quest tracker, etc.
Actually I had to set it to "HIGH" to be over my action bars and omen and some more addons. But at that strata the space plugin is below the background..
Last edited by Luzzifus : 05-10-09 at 06:21 AM.
Report comment to moderator  
Reply With Quote
Unread 05-10-09, 04:58 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Originally posted by moniker
Just as FYI, I find that I have to do background:SetFrameStrata("MEDIUM") to keep the bag background above various other UI elements -- otherwise I have buttons floating on top of things like the minimap, unitframes, quest tracker, etc.

PS- Glad you got your Linux/Wine up and running again
Thanks for the info. Someone reported it before and I already built it in _Aurora, but I was a bit lazy on _Pernobilis. I don't think I would push an update out to fix one line

Yep, WoW's working fine now, and I got a lot to do on cargBags
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.