Thread Tools Display Modes
10-24-09, 02:46 PM   #1
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
ncAddons portal

Hi all!
My name is nightcracker, and I'm new here. I'm a huge fan of lightweight, and so are my addons. I've been an addon and Lua user for a long time now, and I finally feel like adding something to the addon community so here I am! I will be coding and testing my addons for the coming three months, and after that I will be working on finishing and packaging up my to be coming UI, ncUI. Here are the links to every addon I've released so far plus a short discription. I will be updating this page, so see this as my addon portal.

Check out my new bitbucket!

ncDatatext
A small framework for creating small dataframes with variable input. For example a textstring with in it "FPS: <fps>". This all in an addon with less than 20kB memory usage, and easy LUA config.

ncError
An error hiding addon, it hides all errors, not notifications(like quest progress) and the unique part is that you use /error to print out the latest error hidden(to remove the "why the **** can't I do that?"-situation sometimes occuring if you hide errormessages).

ncQuest
A simple addon to automaticly pick up quests, complete quests unless there are multiple rewards and take followups. That's all!

ncResurrect
An addon to automaticly accept resurrects and release spirit in BG's and wintergrasp.

ncDequip
A simple addon for adding the slash command /dequip # where # is an inventoryslot number. For example "/dequip 13" dequips the first trinket.

ncSpellalert
A lightweight spell alerter mod for self buffs, enemy buffs and interuptable spells.

ncNameplates
Another lightweight addon, for modifying the nameplates into a minimalistic look. Also adds a class icon to the nameplates.

For the progress on my UI look here.

Feedback is appreciated

Last edited by Cairenn : 11-21-09 at 12:29 PM. Reason: removed links to offsite download - Cairenn
  Reply With Quote
10-25-09, 05:25 AM   #2
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Update:
I'm working on an update for ncDatatext, in the next version it will be made a library with LibStub, the defaults are embedded in the library(no need to give them anymore). I didn't test the code yet, but here is the core code:

Code:
local lib = LibStub:NewLibrary("ncDatatext", 1)
if not lib then return end
function lib:Create(tab)
	assert(type(tab) == "table", "ncDatatext: Bad arguments given, for reference look at the config file.")
	for name in pairs(tab) do
		assert(type(tab[name].content) == "function", "ncDatatext: Content must be a function, the value of the frame is the return value of the function.")
		local f, t, e, rate, font, fontsize, anchor, parent, x, y, flags, event, content = CreateFrame("Frame", name), f:CreateFontString(nil, "OVERLAY"), 0, tab[name].rate or 1, tab[name].font or "Fonts\\FRIZQT__.ttf", tab[name].fontsize or 8, tab[name].anchor or "CENTER", tab[name].parent or "UIParent", tab[name].x or 0, tab[name].y or 0, tab[name].flags or "", tab[name].event or nil, tab[name].content
		t:SetFont(font, fontsize, flags)
		f:SetPoint(anchor, parent, anchor, x, y)
		t:SetPoint("CENTER", f)
		function f:Update(self, event, ...)
			t:SetText(content(self, event, ...))			
			f:SetHeight(t:GetStringHeight())
			f:SetWidth(t:GetStringWidth())
		end
		if event then
			f:SetScript("OnEvent", function()
				f:Update()
			end)
			f:RegisterEvent(event)
		else	
			f:SetScript("OnUpdate", function(self, elapsed)
				e = e + elapsed
				if (e>rate) then
					f:Update()
				end
			end)
			f:Update()
		end
	end
end
The defaults are still given, but this is merely for documentation and has no effect whatsoever. Also the examples have been modified to call the lib:

Code:
-- The default value will be used if no value is specified in the frame.
LibStub("ncDatatext"):Create({
	["Defaults"] = {
		rate = 1, -- This value determines how often all frames update in seconds(aka global update). Realtime updating(when the event occurs) must be done by registering the frame with the value "event". If an event is registered with the frame, it will not update with the global update anymore. (Self, event, ...) are passed to the content function if registered with an event.
		font = "Fonts\\FRIZQT__.ttf", -- The font that should be used. If you want to use an other font than the default, place your font in the ncDatatext folder, and change this value to "Interface\\Addons\\ncDatatext\\<Yourfontname>.ttf". It must be a TrueType font.
		fontsize = 8, -- The font size, simple.
		anchor = "CENTER",	-- Which the frame should anchor to, can be any frame or BOTTOMLEFT, BOTTOM, BOTTOMRIGHT, LEFT, CENTER, RIGHT, TOPLEFT, TOP, TOPRIGHT.
		parent = "UIParent", -- The parent of the frame.
		x = 0, -- The horizontal offset from the anchor. A negative value moves x pixels to the left, a positive value x pixels to the right.
		y = 0, -- Same as above, but vertical.
		flags = "", -- Can be any comma-seperated combination of MONOCHROME, OUTLINE and THICKOUTLINE. For example flags = "OUTLINE" creates a little black border around the font.
		content = function()
			return ""
		end, -- The actual content of the frame. Must always be a function, the return value is the displayed value.
		event = nil, -- The registered event of the frame, if one is given the frame will not update with the global update anymore(see top).
	},
})

-- The actual frames, 5 examples have been given.
LibStub("ncDatatext"):Create({
	["ExperienceRep"] = {
		x = 100,
		y = 100,
		content = function()
			if (UnitLevel("player")<MAX_PLAYER_LEVEL) then
				return "XP: "..UnitXP('player').."/"..UnitXPMax('player').." | "..string.format("%.2f", (UnitXP('player')/UnitXPMax('player')*100)).."%"
			else
				local _, _, minimum, maximum, value = GetWatchedFactionInfo()
				if ((value-minimum)==999) and ((maximum-minimum)==1000) then
					return "REP: "..(value-minimum).."/"..(maximum-minimum).." | 100%"
				else
					return "REP: "..(value-minimum).."/"..(maximum-minimum).." | "..string.format("%.2f", (value-minimum)/(maximum-minimum)*100).."%"
				end
			end
		end,
		event = "PLAYER_XP_UPDATE",
	},
	["FPS"] = {
		x = -100,
		y = -100,
		content = function()
			return "FPS: "..floor(GetFramerate())
		end,
	},
	["Mail"] = {
		fontsize = 14,
		x = -100,
		y = 100,
		content = function()
			local mail = (HasNewMail() or 0)
			if mail>0 then
				return "You've got mail"
			else
				return "No new mail"
			end
		end,
	},
	["Latency"] = {
		x = 100,
		y = -100,
		content = function()
			return select(3, GetNetStats()).." MS"
		end,
	},
	["Memory"] = {
		content = function()
			local t = 0
			UpdateAddOnMemoryUsage()
			for i=1, GetNumAddOns(), 1 do
				t = t + GetAddOnMemoryUsage(i)
			end
			if t > 1024 then
				return "Memory: "..(floor(t)/1024).." MB"
			else
				return "Memory: "..floor(t).." KB"
			end
		end,
	},
})
This update will be put in the addon when I am at home(currently at school) and have tested it.

Last edited by nightcracker : 10-26-09 at 09:52 AM.
  Reply With Quote
10-25-09, 02:56 PM   #3
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Originally Posted by nightcracker View Post
P.S.: Can some moderator delete my addon ncExperience? It's been replaced with ncDatatext. Thanks!
Deleted as per your request.
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
  Reply With Quote
10-25-09, 04:41 PM   #4
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by Cairenn View Post
Deleted as per your request.
Thanks.

The message you have entered is too short. Please lengthen your message to at least 10 characters.
  Reply With Quote
10-26-09, 09:56 AM   #5
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Call for feedback! Please give me feedback on my addons so I can improve them!

Also an update:
I just created my bitbucket repository, check it out!

Last edited by Cairenn : 11-21-09 at 12:28 PM. Reason: removed links to offsite download - Cairenn
  Reply With Quote
11-09-09, 02:26 AM   #6
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Updated the main post, scroll up
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » ncAddons portal


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off