LibSink-2.0 is a small library that you can throw in to easily get configuration options for your addon on where it should output any kind of messages.
By default, LibSink-2.0 supports several addons as output "sinks"; Blizzard floating combat text, MSBT, SCT, Parrot, BCF.
And if that's not enough it can also route your output to any ingame channel, like raid warning, party chat, say.
Or just to a local chatframe, UIErrorsFrame, etc.
In order to use LibSink-2.0 in your addon, you simply need to embed it into the addon object;
local addon = LibStub("AceAddon-3.0"):NewAddon("Bunnies!", "LibSink-2.0")
Then you get a few new methods on your addon object, most notably :Pour(...):
self:Pour(text, r, g, b, font, size, outline, sticky, location, icon)
The only ones you need to concern yourself with are usually text, r, g and b. These arguments say what text you want to output in and what color. RGB should be passed as decimal values ranging from 0.0 to 1.0.
The next thing you should note is that LibSink-2.0 provides a method on your addon object that you can invoke to produce options for configuring where, exactly, :Pour requests should be poured from your addon;
self:GetSinkAce3OptionsDataTable()
self:GetSinkAce2OptionsDataTable()
So obviously you use the one appropriate for your addon (probably Ace3 nowadays).
If you already have an option table for your addon (which is very likely), you just insert the return value from this function into its own section in your config;
local options = {
type = "group",
name = "Bunny options!",
args = {}
}
options.args.output = self:GetSinkAce3OptionsDataTable()
And, of course, LibSink-2.0 will need somewhere to store the users preferences about your addon, and since libraries can not have SavedVariables, you need to supply it;
self:SetSinkStorage(self.db.profile)
LibSink can potentially store a few different keys in your database, including sink20OutputSink, sink20Sticky and sink20ScrollArea.
------------------------------------------------------------------------
r64 | rabbit | 2009-04-14 11:17:10 +0000 (Tue, 14 Apr 2009) | 1 line
Changed paths:
M /trunk/LibSink-2.0.toc
TOC bump.
------------------------------------------------------------------------
r63 | rabbit | 2009-03-09 15:11:32 +0000 (Mon, 09 Mar 2009) | 1 line
Changed paths:
M /trunk/LibSink-2.0/LibSink-2.0.lua
M /trunk/LibSink-2.0.toc
Work around a bug in RaidNotice_AddMessage coloring when 3 or more warnings are displayed in rapid succession.
------------------------------------------------------------------------
Installation Guide
- Exit "World of Warcraft" completely
- Download the mod you want to install
- Make a folder on your desktop called "My Mods"
- Save the .zip/.rar files to this folder.
- If, when you try to download the file, it automatically "opens" it... you need to RIGHT click on the link and "save as..." or "Save Target As".
- Extract the file - commonly known as 'unzipping'
Do this ONE FILE AT A TIME!
- Windows
- Windows XP has a built in ZIP extractor. Double click on the file to open it, inside should be the file or folders needed. Copy these outside to the "My Mods" folder.
- WinRAR: Right click the file, select "Extract Here"
- WinZip: You MUST make sure the option to "Use Folder Names" is CHECKED or it will just extract the files and not make the proper folders how the Authors designed
- Mac Users
- StuffitExpander: Double click the archive to extract it to a folder in the current directory.
- Verify your WoW Installation Path
That is where you are running WoW from and THAT is where you need to install your mods.
- Move to the Addon folder
- Open your World of Warcraft folder. (default is C:\Program Files\World of Warcraft\)
- Go into the "Interface" folder.
- Go into the "AddOns" folder.
- In a new window, open the "My Mods" folder.
- The "My Mods" folder should have the "Addonname" folder in it.
- Move the "Addonname" folder into the "AddOns" folder
- Start World of Warcraft
- Make sure AddOns are installed
- Log in
- At the Character Select screen, look in lower left corner for the "addons" button.
- If button is there: make sure all the mods you installed are listed and make sure "load out of date addons" is checked.
- If the button is NOT there: means you did not install the addons properly. Look at the above screenshots. Try repeating the steps or getting someone who knows more about computers than you do to help.
Translations
When you download a mod, please be sure that the mod is compatible with your translation of wow. Some mods only work on the US versions, while some only work on some of the various European versions. These variations are called "Localizations".
TOC Numbers (Out of Date Mods)
When Blizzard patches WoW, they change the Interface number. This means that all mods will be "out of date" unless or until the author releases a new version for that interface. Some people go into the .toc files and update the numbers themselves, but this is STRONGLY advised against as it will cause problems locating possible incompatibilities addons. When you log into WoW after a patch, you DO NOT have to delete your interface directory. All you have to do is simply tell WoW to ignore the interface numbers and load all the mods anyway. All you have to do is, while at the "character select" screen, look in the lower left corner and click on the "addons" button. A window will pop up listing all your installed mods.
If you look in the upper left corner of that window there should be a box that says "Load Out of Date AddOns". You want to CHECK this box. Now simply go into WoW normally and all your mods should load. As of the 1.9 patch, you will have to do this after EVERY patch/update that Blizzard posts! If you encounter any problems with a mod after a patch, please be sure to let the author of the mod know so they can fix it.
See also: About "Out Of Date AddOns"
Mac Support
WoW addons are not platformed based. As such, they can be used on either Mac or PC. You can extract both .zip and .rar files on a Mac using StuffitExpander.
Directory Structure
World of Warcraft
|_ Interface
|_AddOns
|_*AddonName*
|_ *AddonName*.toc
|_ *AddonName*.xml
|_ *AddonName*.lua
|_ (possibly others as well)...