• 0

    posted a message on Idea for a Heroic Faction Champs Addon
    Well, oh the shame, but my guild is finding H.Champs25 a pain in the ass and I've been trying to think of an idea that could be useful. There's three things I can see that would be useful to be able to track:

    * Current status of CC / slow effects on each mob
    * Current target of each mob
    * 'Melee Fixate' warning when the melee decide to say hi

    INTENT
    The intent is that it would display something akin to the MT list in a moveable frame showing CC, current target of each mob and do a screen flash/sound when you get fixated to remind you to gogo leg it.


    RATIONALE
    Now, the problem with using a system like "raid1target", etc like the BossHealth module does for DBM is that there is unlikely to be someone in the raid targeting every mob. Most mobs are /focused and you can't use "raidXfocus" :(

    So, I was considering an addon that would use SendAddonMsg() in a sane manner to close the capability gap. The code is reasonably easy, and the actual data needed to be sent is tiny:
    * single digit fact champ ID (from a preconfigured table)
    * single character that specifies current target with bitmask of CC on/off.

    I did a quick test of round trip time with SendAddonMsg() and it's not too bad. Additionally, libhealcomm doesn't seem to smash net bandwidth too badly and it's a lot more noisy than my protocol would be.

    The addon could also only allow each person one target (say their focus target) to broadcast, and would have a small negotiation phase to avoid multiple players posting data about the same target.
    (maybe something like the lower raid index number gets priority)

    Thoughts? It's not much effort to actually code and it seems reasonably useful. However, if an addon already does this I'd be keen to introduce it to our guild.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Best way to create raid unit frames?
    I suspect slak is being a little disingenuous. However, I will say that you're definitely starting at the deeper end of the pool dealing with taint on your first addon.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    thanks very much talden. My development so far really hasn't worried about exact positioning so I hadn't noticed this issue. Looks like I'm going to have to do some reading on how the wow layout manager decides to round pixels.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    Seerah, thanks heaps again! Damn that was a frustrating bug to track down.

    If I may ask another favour. Could someone correct my understanding of coordinate scale within wow:

    I was under the impression if UIParent:GetScale() returned 1 that if you did something like:

    local frm=CreateFrame("Frame", nil, UIParent)
    frm:SetWidth(100)
    frm:SetHeight(100)


    would create a frame 100 pixels x 100 pixels (in true screen pixels). However I'm finding this is not the case. My wow screen is 1650 pixels wide yet with UIParent:GetScale() returning 1, a frame width of approximately 1230 pixels covers the entire screen.

    Am I missing something obvious here? (Note, I do not have the 'Use UI scale' flag ticked in video settings)

    The reason I ask, is that as some of the others have mentioned in these forums, I'm getting a few weird texture renderings and am having to do weird stuff like use sub pixel edgeSize's to make my UI look right. Is there a 'right' way to do screen pixel coordinate calculations?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    FUCK.

    Thanks heaps for that seerah :) Seriously, I've been beating my head against a wall with that for like 3 evenings.

    Apologies for the language. Works brilliantly now. Christ, glad that it's fixed but so much time down toilet :(
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    thanks for all the help, I'm sure it's something very simple (and stupid) I'm doing, but I'm stumped. WTB error codes!

    function BubbleHUD:testIcon()
    	local frm=CreateFrame("Frame")
    	frm:SetFrameStrata("MEDIUM")
    	frm:SetMovable(false)
    	frm:EnableMouse(1)
    	frm:SetWidth(100)
    	frm:SetHeight(100)
    	frm:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
    	frm:SetBackdrop( {
    	  bgFile = [[Textures/white.blp]], tile = false, tileSize=0,
    	  edgeFile = [[white.blp]],
    --	  edgeFile="Interface/Tooltips/UI-Tooltip-Border",
    	  edgeSize = 8,
    --	  insets = {left=2, top=2, right=2, bottom=2}
    	})
    --	frm:SetBackdropColor(0, 1, 0, 1)
    --	frm:SetBackdropBorderColor(1, 0, 0, 1)
    	frm:Show()
    end


    If I comment out the 'tooltips' file and uncomment white.blp I just get a blank frame. I know it's there but you can't see it.

    I've tested that the PNG file is correct (or at least I believe it is correct). I've placed the white.blp file in the root directory of my addon rather than "Textures" subdirectory. Reloaded wow. Still can't seem to get it to work.

    I've pretty much done everything I can think of to fix this. I'm guessing it has to be the path to the bitmap, or somehow there's a problem with the bitmap itself. I've checked the bitmap by placing it on a simple html file with a black background (excuse the awful html hack) and it works fine.

    <html>
    <head><title>test</title></head>
    <body bgcolor=#000000><img ="white.png" /></body>
    </html>


    So either blpconv is doing something screwy or it's the path, but either option has me farked how.
    (I've attached the original white.png and white.blp files I'm using)
    Posted in: Lua Code Discussion
  • 0

    posted a message on small problem with partyframes
    UnitExists("pet") should return true if the pet is alive.
    You may have to also invoke UnitHealth("pet") if you care whether the pet is dead.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    Quote from Nandini
    The minimum size for either dimension in textures for WoW is 8 pixels.

    Therefore, your border texture file must be a minimum of 8x8 pixels in size.

    Border textures are actually comprised of 8 sub-textures. So if you want to make a "real" border texture, it should be 64 x 8 pixels, or a multiple thereof.

    Your 8x8 texture may still work. Presumably, it would stretch each 1 x 8 pixel chunk to your desired edge size and then tile it.

    thanks heaps nandini! I'll give that a crack tonight and see how it goes. I hadn't read (well at least noticed) the minimum of 8x8 before anywhere.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    Quote from Seerah
    8x1? No. All edges must be a power of 2.

    ummm, isn't 2^3 by 2^0 ok? So should I make it 8x2?
    Or are you saying both files of the edge inner components must be positive powers of 2?
    (ie. it must be minimum size of 16x2 so that the actual edges are 2x2?)

    I'll try this when I get home tonight - perhaps this was the problem. Many thanks.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    cheers tek. I was typing the code from memory and perhaps I did something as dumb as that in my real code.

    In truth, I just wanted to ensure that I wasn't somehow misunderstanding how SetBackdrop() worked. So using an 8x1 pixel, solid white image with edgeSize=1 is reasonable for a border yeh?

    (ie. it will scale to fill whatever inserts={} I use and will get coloured via SetBackdropBorderColor()?)

    If so, then it's something dumb I'm doing (and it could quite likely be the [[""]] trick. I'll check it when I get home from work)
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetBackdrop Question
    Hey guys,

    Intro (feel free to skip)
    After a few months away from wow, I returned and have been doing some good progress on some wow addons. Basically as a bit of a learning project have been writing a complete UI replacement (an amalgum of grid, omen, icehud, rBuff, power auras, dkp mod, minimap, etc).

    Most of the core functionality has been fairly routine to implement, but now I'm starting to do a 'sexy' pass and there's some basic behaviours that I'm being stumped with.

    Right now, my rBuff type implementation (it has a few tricks in the way it lays things outs and time formatting, but nothing super crazy) is not looking the way I'd like. I'd like to have a user configurable width square border around my buff icons.


    Actual Question
    I want to set my frame up with an empty background (done) and with a border (edge file) that can be coloured via Frame:SetBackdropBorderColor() to generate a nice square border.

    My question is how do I create this border? I've tried creating a PNG file that is 8 pixels wide of white (1, 1, 1, 1) and another and my code does:

    Frame:SetBackdrop({
        bgFile = [[ "Masks\Empty.blp" ]],
        edgeFile = [[ "Masks\White.blp" ]],
        tile = false, tileSize=0, edgeSize=1,
        insets = { left=1, top=1, right=1, bottom=1}
    })
    Frame:SetBackdropBorderColor(1, 0, 0, 1)


    Now, am I doing something super dumb here or should that be the way to have a 1 pixel wide square red border? If I'm on the right track, I'll muddle my way to work out what's going wrong, but if not, could someone just give me a kick in the right direction please.

    Many thanks in advance.
    bubble

    P.S. My only reason for asking is because there seems to be a reasonably large lack of documentation on this function anywhere. I've tried wowwiki and wowprogramming websites and the wowprogramming book: nothing really covers it in a little more detail.

    I've also tried looking through the code for ButtonFacade but tbh it got a little complicated and I still couldn't see how they were forming the border.

    I did cheat by using a flat colour texture behind my icon but this obviously fails when I want to have my 'buff' textures at some alpha transparency as the flat colour washes out the texture.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Help with AceGUI:Create("PullDown")
    upyursh, I've gone through the steep learning curve for parts of the wow api/lua/Ace3 so I may or may not be able to help you.

    I've been building an entire replacement UI as a bit of a learning project in my spare time so I'm reasonably familiar with the wow API now. Give me a buzz if you have any questions and I'll see what I can do. I still get bamboozled all the time by stuff and I also aim to stay on the 'easy' paths with things so it depends what you need.

    I also happen to be on your realm/faction. You can catch me on 'bubblecannon' on khaz'goroth, clandropbears.

    cheers
    bubble
    Posted in: Ace3
  • 0

    posted a message on Cleaner Boss Mods Library
    cheers for the reply orion. I'll have another look at BW and see what I can make work.
    Posted in: Addon Ideas
  • 0

    posted a message on Cleaner Boss Mods Library
    yep, I agree that BW looks a little bit cleaner in design than DBM.

    I guess what I'm trying to get at is that the 'instance event plugin' could expose a list of events it generates from whatever sources (NPC_SAY, EMOTE or _UNFILTERED).

    Then any number of 'frontends' can register for those events to get stimulated. It still means that frontends only have to concern themselves with events the event plugin generates. It also means that you can ignore a hell of a lot of stuff if you're just looking for something simple.

    As it stands, to make another malygos addon cooperate with the existing bigwig frontend yet complement in some manner seems less than trivial.

    Edit:
    I'm not sure I'm being clear. By seperating rendering of events from the generation of events you're enabling far richer encounter UIs to be developed with far less effort and less system overhead.
    Posted in: Addon Ideas
  • 0

    posted a message on Cleaner Boss Mods Library
    I've been playing with some boss mod addon development for some fights that we do now that I've cracked my first addon (big whoop). Anyway, I've noticed that a lot of addons I use are listening to COMBAT_LOG_EVENT_UNFILTERED a lot and I'm guessing that has to be a fairly ineffecient way of doing things.

    I'm playing with an idea of seperating out a bossmod into 3 components:

    (1.) instance event plugins that register and generate events (eg. MALY_SURGE_YOU, MALY_SURGE_START, etc, etc)
    (2.) instance event UIs that turn the events into
    (3.) the core glue code that provide generic alert code and allows the connection of the above two components.

    Now this may sound a little 'reinvent' the wheel, but what it does mean is that 3rd party addons can just plug into the bosslib without having to have their own EMOTE, NPC_SAY, and COMBAT_UNFILTERED event handlers.

    It also reduces a hell of a lot of code for the 3rd party addon. ie. the 3rd party code really becomes:

    bosslib:RegisterEvent("MALY_SURGE_YOU", function()
    do the code to render your UI in some manner for a 3rd party tool
    end)
    bosslib:RegisterEvent("MALY_SURGE_START", function()
    do the code to render your UI in some manner for a 3rd party tool
    end)
    ... etc etc

    with no need to write any entry/exit combat code, no zone sniffing code, etc.

    Is this an asinine idea? or is someone already doing it?

    Edit:
    The reason I've even considered this development is because I'm working on Yet Another Malygos Addon and I'm simply baffled by the amount of duplication all these type of addons require. I'm also an ex asm programmer so anyway I can improve performance is win.
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.