|Go to Page...|
Lozareth's configurable, scriptable Discord Art, now with custom functions.
Curse Client users: I don't host on Curse so if Discord Art appears in the download list, press Ignore because it is most likely a very ancient version.
Included Discord Library version: 6.2
See the Change Log (tab above) for a list of all changes.
Modify your World of Warcraft environment to suit your style. Add textures that are clickable, will react to events ie. showing when you aquire a target and hiding again when not and lots lots more.
The screenshots show how you can use Discord Art to build the background for a MazzleUI style layout to host your UI (bars, unitframes, chat, loot, statistical information etc.). With the help of the Quick Script: code below shows how you don't have to lose actual screen realestate to your artwork (mobs don't sneak in from behind any sooner than if you didn't have the artwork displayed).
NOTE: If you change names of, copy, move, add textures and let's not forget typos while in-game, you will have to completly exit WOW and re-start before the "new" textures will register (going back to the character select or account login screens is not good enough).
A bright green blob where your amazing artwork is supposed to appear is a good clue your texture hasn't registered (did I mention typos ).
Because the ubiquitous "this" is no longer a valid construct in WOW Lua, the scripting engine has been changed to include/parse "self" as a replacement to "this". "param" is still the universal parameter 1 name passed to scripts so for OnEvent self= the old "this" and param = the "event" paramter. For OnUpdate, self= the old "this" and param = the "elapsed" parameter. For OnClick self = the old "this" and param = the "button" paramter etc...
Version 6.1 added the ability to create custom functions that are "compiled" to the private DART namespace table, they are NOT global. These functions can be called from any texture script or any of your other custom functions. See the Function Options section of the ReadMe.htm for more information.
***USING OLDER DART
If you load a DART profile imported from pre 5.0 version of Discord Art you may (most likely will) get errors due to scripting that is no longer valid. The WOW API has changed a lot so these will need some careful attention.
***IF YOU DO GET ERRORS, please post the full error message and a discription of what you were doing at the time.
For information on how to customise DART, the Readme.html in your "[WOW]\Interface\Addons\DiscordArt" folder is the place to go. It's old school like DART but it will get updated as required.
Discord Art Custom Textures a starter pack of artwork and a DiscordArt.lua file containing several profiles from a bygone era but still usable with some adjustments has be included under the Other Files tab above.
Sharing your DART configuration: Dreadlorde's Discord Custom Layout Extractors (The DART_Custom sub-folder) still works with Discord Art. You will need to enable "Out of date Addons" under the Addons button of the character selection screen. DART MUST be installed as well otherwise errors will be generated ie. only install the extracor(s) for the Discord addons you have installed. See the ReadMe file in each extractors folder for information on how to use DCLE.
If you do have a bottom heavy UI and want to adjust your ViewPort to account for it (no more enemies getting the drop on you because part of your usable view screen is covered by art, buttons etc.) add something like the following (depending on screen resolution) to the OnLoad script of a texture that is displayed unconditionally.
local bottom = 30 -- 30 can be adjusted to any number depending on the height of your artwork. self.ViewportOverlay = WorldFrame:CreateTexture(nil, "BACKGROUND") self.ViewportOverlay:SetTexture(0, 0, 0, 1) self.ViewportOverlay:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -1, 1) self.ViewportOverlay:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 1, -1) local currentXResolution, currentYResolution = 1900 , 1200 -- Your screen resolution. bottom = (bottom*(currentYResolution/1200)) WorldFrame:SetPoint("TOPLEFT", 0, 0) WorldFrame:SetPoint("BOTTOMRIGHT", 0, (bottom * (2668 / currentYResolution)))
local text = _G["DART_Texture_nn_Text"]; text.variables["$co"] = true; self.GetDurability = function(self) local t1 = nil local t2 = 0 local t3 = 0 local t5 = 100 local current, full, name, pct local lowestCur,lowestFull = 500,0 for i=1,19 do current, full = GetInventoryItemDurability(i) if current and full then pct = floor(100*current/full + 0.5) if (pct < t5) then t5 = pct end if (current < lowestCur) then lowestCur = current lowestFull = full end t2 = t2 + current t3 = t3 + full end end t4 = format("%d/%d", lowestCur, lowestFull) if (t3 == 0) then t1 = "N/A" else t1 = floor(t2 * 100 / t3) end return t1 end
local durability = self:GetDurability() local text = "Armor " .. durability .. "%" if (type(durability) == "number") then if durability > 50 then text = string.format("$coff%2xff00", ((durability > 50) and (255 - 2.55*durability) or (2.55*durability)), durability) .. text else text = string.format("$coffff%2x00", (2.55*durability), durability) .. text end else text = "" end DART_Text(nn, text)
if param == "ZONE_CHANGED_NEW_AREA" then SetMapToCurrentZone() end
local x,y = GetPlayerMapPosition("player") local x = format("%.1f", x*100) local y = format("%.1f", y*100) DART_Text(nn, x .. " " .. y)
local text = _G["DART_Texture_nn_Text"]; text.variables["$co"] = true;
local m = GetMoney() local gold = floor(m/10000) local silver = floor((m - (10000*gold))/100) local copper = m - (10000*gold) - (100*silver) DART_Text(nn, gold .. "g $cofff0f0f0" .. silver .. "s $coffb46d24" .. copper .. "c")
local minutes, hour, minute local t = date("*t", time()) hour = t.hour minute = t.min minutes = (hour*60) + minute if (minutes > 1440) then minutes = minutes - 1440 end minutes = abs(minutes) hour = floor(minutes/60) minute = format("%02d", mod(minutes, 60)) local text if minutes > 719 then if minutes > 779 then hour = floor(minutes/60) - 12 end text = hour .. ":" .. minute .. " pm" else if (hour == 0) then hour = 12 end text = hour .. ":" .. minute .. " am" end DART_Text(nn, text)
self.updateFrequency = 60 self.updatecount = 0
self.updatecount = self.updatecount + 1 if self.updatecount ~= self.updateFrequency then return end self.updatecount = 0 DART_Text(nn, string.format("%0.i",GetFramerate()) .. " fps")
local _,_,latency = GetNetStats() if latency > 500 then DART_TextColor(nn, 1, 0, 0, 1) elseif latency > 200 then DART_TextColor(nn, 1, 1, 0, 1) else DART_TextColor(nn, 0, 1, 0, 1) end DART_Text(nn, latency .. " ms")