Download
(46Kb)
Download
Updated: 09-07-10 10:44 AM
Pictures
File Info
Updated:09-07-10 10:44 AM
Created:unknown
Downloads:70,846
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 06-08-10, 05:21 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1711
File comments: 1222
Uploads: 43
Use an xml to load the files, for embedding.
Report comment to moderator  
Reply With Quote
Unread 06-08-10, 05:03 PM  
Haleth
This Space For Rent
 
Haleth's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1173
File comments: 1146
Uploads: 17
Update looks promising, I might work on a layout sometime.

I absolutely LOVE the experimeral list layout, always had ideas about it (text >icon to recognize and find items) but never quite knew how it'd work out. Do you think it's possible to add a way of 'scrolling' through the list so the frame doesn't need to be huge? That would be really awesome.
Report comment to moderator  
Reply With Quote
Unread 06-08-10, 01:59 PM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Okay, now cargBags 2 is officially public beta =)
I hope that slowly there will be some more layouts, after all it's community driven!

I don't really now what to do with my old cargBags-layouts. Pernobilis will be discontinued in favor of Simplicity and Aurora ... well, let's see. But I don't want to manage four different bag addons :O if someone wants to pick it up, feel free to do it.

EDIT: Just to prevent questions: Support on Anywhere bags is still undecided and will most likely come at a later point (2.1)
cargBags 1.3 still works, though.
__________________
« Website | GitHub »

Oh hai!
Last edited by xConStruct : 06-08-10 at 02:01 PM.
Report comment to moderator  
Reply With Quote
Unread 05-29-10, 06:17 AM  
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 56
File comments: 17
Uploads: 21
Script removed. All opening and closing with or without Esc functioning without problems now. At least the tests I've done.

Plugins? Hmm....
Report comment to moderator  
Reply With Quote
Unread 05-28-10, 07:49 AM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
I'm wondering that you still need your script, because all opening/closing issues with Esc and bank frame etc are resolved when I'm testing it with the newest core.
Especially :OnBankClosed() and CloseBankFrame() seems to be strange, because OnBankClosed() fires when the bank frame is closed (so you won't need to close it in the first line?) and it also hides the implementation, firing :OnClose().

Seems like I really have to start working on the bagbar - I don't really like scripting it, don't know why - running out of other features I prefer to write first.
Any ideas on other plugins etc which could be in the core?
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-28-10, 06:09 AM  
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 56
File comments: 17
Uploads: 21
I should probably study the core a bit better. I've added my closing script with CloseAllBags() and CloseBankFrame() to the :OnClose() and :OnBankClosed() instead now. I expect the bags to work a lot better with other addons or the UI itself closing them now. All troubles with the Esc key are gone when done this way.


Edit:
Why am I quoting myself?
Last edited by Goldpaw : 05-28-10 at 06:39 AM.
Report comment to moderator  
Reply With Quote
Unread 05-28-10, 02:43 AM  
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 56
File comments: 17
Uploads: 21
I saw the new TagDisplay plugin. Nice! Adding support for it today.

I'm happy that I can actually help contribute for once. Usually my initiatives ends up getting me run out of town, covered in tar and feathers, with 100+ crazy people with pitchforks and torches chasing me.
Last edited by Goldpaw : 05-28-10 at 02:55 AM.
Report comment to moderator  
Reply With Quote
Unread 05-27-10, 01:49 PM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Oh yeah, the old problems. Been struggling with this for a long time. I've rewritten all opening/closing functions now. There is no :Open() / :Close() anymore, you just :Show() or :Hide() it - the script handlers do the rest. I've also included :OnBankOpened() and :OnBankClosed(), don't know why I actually left them out in the beginning.

New is also the TagDisplay plugin - yeah, I admit it was inspired by the gBags feature . Maybe I can completely drop Space- and Money-plugins this way.

Going to write the bagbar and then release a cB 2 beta. Anywhere-support will come later.

Well, I see now - timing of your addon is perfect. Helps me clean up a few bugs and gives me new ideas.
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-27-10, 03:36 AM  
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 56
File comments: 17
Uploads: 21
One minor issue I have experienced, is opening/closing of the bags after closing them with the Esc key.

If I only have the bags open, and click Esc, I need to click my B button twice to re-open the bags.

If I have the bank open, and click Esc, talking to the banklady does nothing at all. I either have to click Esc until the game menu appears, or click B once, before it is possible to talk to the banker again.

I solved this (now) by adding the following to my :OnInit() function, where "main" and "bank" are local references to my main bank and bag containers, and;
Code:
	bank:SetScript("OnHide", function() 
		CloseBankFrame();
	end)
	main:SetScript("OnHide", function() 
		CloseAllBags();
	end)
This just makes sure that all the relevant closing functions fire off when using Esc to close the bags/bank, instead of simply hiding the frames.

I doubt this can be considered any bug, though. One workaround could be to hook these 2 to every container's OnHide script, but I'm not 100% sure how that would affect things.
Last edited by Goldpaw : 05-27-10 at 07:40 AM.
Report comment to moderator  
Reply With Quote
Unread 05-26-10, 05:30 PM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
I originally planned to first officially release cargBags 2 before any implementations are made public. Well, whatever happened, happened (as we know from Lost), so here you go

Embedding cargBags is also the preferred way in the new version, since I want to shift the focus away from cargBags to the implementation. And it is necessary if some lightweight-memory fanatic decides to remove core modules

Bagbar is next on my list.
I just need to figure out how to implement Anywhere-bags into v2 first - To be honest, I'd like to get rid of it, but I think a lot people would be angry with me if I did :O
Official release should be soon™ - with or without Anywhere.

Bank frames should be fixed now. The only change for your layout is that implementation.atBank would be implementation:AtBank() in the new update.

By the way: Your layout looks really nice!
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-26-10, 02:01 PM  
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 56
File comments: 17
Uploads: 21
I did ran into one problem though;

When logging in, and directly opening the bank frame, nothing happened. I had to manually open the bags first, then close them. And THEN the bank frame could be opened.

I would guess this is due to the OnInit() function only being run when the bags open? And the bank frame requires the bags to have been initialized already to run?

I solved it by adding a fast open/close of the bags at PLAYER_LOGIN. That forces the OnInit() function to happen.
Report comment to moderator  
Reply With Quote
Unread 05-26-10, 01:55 PM  
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 56
File comments: 17
Uploads: 21
So, I've gone and done something crazy again; Made an addon based on the beta version of CargBags 2.0!

I must say, cargBags2 is really a joy to work with. I really feel I didn't do justice to your work with this addon. The possibilities your new approach opens, are almost limitless! The only problems I ran into, were based on things I had to do for myself. Like getting the bagbar in the bank to work (as you know, there's no bagbar plugin yet available in the 2.0 version), but after some hours of reading through the original Blizzard BankFrame.lua I finally managed to get it right.

This addon does NOT work if you have cargBags 1.x installed, so I added a note for people to disable that. I embedded cargBags2 into the addon.

Anyway, don't hate me for releasing an addon based on an unfinished beta framework. CargBags 2.0 was just too good for me to wait! Even in it's unfinished state, there can be no doubt that it is THE framework to use for bag addons. It's truly an improvement from the 1.x versions, and I expect it to be a lot easier on the CPU, especially for Hunters.

Last but not least, here's gBags:
Report comment to moderator  
Reply With Quote
Unread 05-08-10, 07:18 PM  
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view AddOns

Forum posts: 199
File comments: 374
Uploads: 18
Thanks, I'm glad! Looking forward to further help
__________________
« Website | GitHub »

Oh hai!
Report comment to moderator  
Reply With Quote
Unread 05-08-10, 06:45 PM  
Guardix
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 114
Uploads: 3
cargBags 2.0

I must say that the new beta is way more pleasurable to work with. I hope I can be of more assistance later on
Report comment to moderator  
Reply With Quote
Unread 05-04-10, 03:07 AM  
Quokka
A Chromatic Dragonspawn
 
Quokka's Avatar
AddOn Author - Click to view AddOns

Forum posts: 196
File comments: 240
Uploads: 15
Cargor thx for the comeback
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.