• 0

    posted a message on PitBull 4.0
    Quote from markv
    I tried searching through this thread but really am kind of brain dead at this hour. Is there a way to limit the length of a players name within the health bars? I am using Lua Texts with this and my player health bar also is displaying that persons name but the name exceeds the lenght of the bar and I really just want it to cut short the player name if it exceeds that length. Right now I am just using a custom lua text of the following:

    return '%s',Name(unit)
    Any help would be appreciated.


    The easiest solution is to avoid using Right aligned text. Right aligned text isn't automatically cut off. It's a limitation of the way we do layouts and the things that WoW allows us to do. The way we're doing it now is probably great for 99% of the people. But people that want to make extensive use of Right alignment can run into this stuff.

    Outside of that you can limit the length of the name by using the strsub function. e.g.:

    return strsub(Name(unit),1,3)


    Would limit the name to 3 characters. Incidentally you don't need a format string if you're just returning a single string. The 1 in the call means to start at index 1 and 3 means to stop at 3. So you can chop up whatever you want out to the string. To say limit to 7 characters you'd pass a 7 as the last parameter and so on.

    This question has come up repeatedly on the 2 LuaTexts threads (the one on ElitistJerks that you already have been pointed to and the other one in the Unit Frames forum here on wowace).
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from detox2
    For the interes to the ones using [Outline] DogTags:

    When I was using Stuf unitframes I loved the "Outline | Monochrome" option for my texts on my Unitframes.

    Unfortunately Pitbull comes with a hardcoded Text-Shadow and thus making the Outline not look as nice on pixelfonts as Stuf Unitframe does.

    If you ever wanted to get rid of your Text-Shadow, locate


    if you're using LuaTexts you can just add:
    font_string:SetShadowOffset(0,0)
    to the LuaText to get rid of the shadow on any particular text that you want.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from gamemaster128
    Is there a way to change the anchor point of UIParent that each unit frame uses? I haven't found an option for it. I want to anchor my pet's unit frame to BOTTOMRIGHT, so that it will stay in the same location relative to the edge of the screen under different resolutions.


    Not at this time. It's hard coded. I'm going to be changing this soon, it's necessary to allow us to have some decent defaults that work regardless of resolution.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from mrmcgee21
    Hello, just want to start off by thanking you guys for keeping Pitbull4 up and going, I've been using Pitbull for many years now and love it. I recently though have ran into a problem with battlegrounds constantly fumbling up where my party ends up in the raid window, and my friends are usually in several different groups. I found that Grid has a customlayouts addon where you can actually define exactly what players to show as party members all the time, regardless of what group in the raid they might be in. But Grid isn't Pitbull by anymeans and trying to use it as a party frame is driving me nuts.

    So my question is, is this possible in Pitbull4? I tried to actually look at the code but I'm completely lost in it. But if there is anyway this could be worked in I for one would be willing to donate some more.


    It's something we could do. But I've been really hesitant to do it. Let me give you a brief overview of how raid and party frames work in order to explain why. Groups (be it a raid or a party) all have to use a specific interface from Blizzard in order to get the frames to work. This interface is called the SecureTemplates and in particular the SecureGroupHeader templates. There are a lot of limitations about what can and can't be done in combat with the UI. The Templates handle doing some things for us that we can't do for our selves because they would normally be against the rules.

    For example we can't create unit frames in combat, we can't move them, we can't size them, we can't hide or show them. Instead all of these things are done for us by Blizzard code. Since we can't do these things this also means that the sorting and what not is also done by Blizzard code.

    We can set options on the GroupHeader outside of combat which tell the Blizzard code what to do for us. If you go into your Groups section and look at the options almost all of these get passed through to the template in some form.

    So about custom sorting. This can be achieved by using what the templates call nameLists. You sort the group however you want and then while you're out of combat you set a list of names in the order you want them. The problem with this is that the nameLists can't be set in combat. So if someone joins your party while you're in combat they can't be added to your frames until you leave combat.

    There is no way to have custom sorts and frames working perfectly in combat. So it's likely that I'll implement some sort of nameList functionality at some point in the future. It's not a super high priority for me because it feels like a really poor implementation.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from Niightblade
    Shefki if you can help me with this I promise to go away and never bother you again :)


    Default debuffs, mine is intended to show debuffs you cast or can remove only.

    You probably want to create your own filter that is setup like this:
    Filter: Player OP: AND
    Filter: Mine OP: AND
    Filter: All self debuffs OP: OR
    Filter: Friend OP: AND
    Filter: Mine OP: AND
    Filter: All friend debuffs OP: OR
    Filter: All enemy debuffs OP: OR
    Filter: ExtraWhitelist

    Where ExtraWhitelist has whatever else you want shown in a Namelist. I'm really not sure what you're tring to do with an unknown caster. The caster is only going to be unknown if they're not in your group and nobody in your group has them targeted. Which is probably basically never in a boss fight.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from Torhal
    The only way to get that information is via tooltip-scanning.


    Actually there's a MobInfo library of some sort that has this information. I've thought about making PB4/LuaTexts use it if it's available to to resolve this issue for people. I just haven't gotten around to looking at it.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from Niightblade
    Ok if you can't colour-code the select control, can you include icons? A little tick or cross maybe?


    Don't think so. Though I wonder if I can put stuff encoded to display icons and colors in the text via the normal FontString encoding stuff. Never occured me to try.


    Here's a different (better?) idea than color coding or icons: Move the white/black flag to a meta page, like an operator. So for example, a list of class buffs would just be "a list", and if you wanted to hide them all, you would do something like in a meta: "Filter: ClassBuffs Type: blacklist".


    Not inclined to do that because you don't have to use a meta filter to use a Name filter. All of the filters can stand alone and function on their own. There is a request to add the ability to have a NOT logical operator to the Meta filters. Which would work since a black list is just a NOT of a whitelist.

    I decided not to add a NOT operator though when I designed the whitelists because I felt it cluttered things too much and everything can be done without it. The only advantage to having it is literally to be able to reuse a name list as a white list sometimes and a black list other times.

    Which is why I'm considering it. I just haven't settled on how I want to implement it. It's not high priority because it's pretty easy to workaround by just making two lists.

    Hint: You can duplicate an existing filter by selecting it before typing a new filter in the list. So if you want to make a Blacklist of a given name list you just have to select it, type in the name for your new filter and then choose Blacklist. I realize this would be a lot of lists to turn the default filters into blacklists. But it'll save you a lot of work.


    Edit: Regarding class-filters, do you need multiple spell id's to cover downranking? Specifically, locks often use Life Tap Rank 1.


    No. The name of the spell is the same. Even though you can filter by spell id now we're still filtering by name mostly because maintaining a list of every spellid for every rank would be a hell of a lot more annoying that just one rank.

    Specifically, we always track the lowest rank of the spell, since sometimes Blizzard removes the ranking on spells.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from Niightblade

    Edit: Where can I submit additions to the class filters? :)


    Here or opening a ticket. I should add, opening a ticket is much preferred. Things fall through the cracks when tickets aren't opened. If you can post here you can make a ticket.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from Niightblade
    Ok, so should I make a custom meta that just filters out class & race buffs?


    You already have one, Default buffs. You can safely just add stuff to the Friend buffs drop down on the Simple tab. This will actually add things to the Extra buffs filter. Which is used by Default buffs.

    If for some reason you wanted to make your own separate name list you can make another Meta filter that references the default filters while adding the stuff you want like so:

    Filter: Default buffs Operator: OR
    Filter: SomeOtherWhitelist

    If for some reason you want to remove things shown in the default filters you can of course just uncheck them in the Simple boxes. Or you can make your own Blacklist and do something like this:

    Filter: Default buffs Operator: AND
    Filter: SomeOtherBlacklist

    Basically, you can reference the default filters and build your own on top of them to avoid having to rebuild them. You'll automatically pickup any improvements to them and can tweak them.

    Either way using the Simple tab or producing your own filters and chaining with a Meta filter will work fine.

    Edit: As far as color coding things. The select control from AceGUI is somewhat limited. I really need to get around to writing my own to deal with the sorting limitation of the AceGUI one. Color coding would be a possibility at that point.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from Niightblade
    I would like to filter out all buffs on me except trinket/gear procs. I tried using the "Default Buffs" filter but it's filtering out procs too. I really don't want to "white list" each proc individually.


    You're going to have to white list them all individually. There's no way to just detect what is a trinket proc or not inside the game. Just like all the class filters were built by hand. The only difference is me and other people who have pointed out missing things made the class filters for you.


    Also, is there a way of showing guild name?


    http://wowprogramming.com/docs/api/GetGuildInfo
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from StijnH
    I would like to use different combo point images.
    Is there way to do it besides overwriting the default.tga file? Custom files will be overwritten when updating Pitbull.


    No.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from disturbedHR

    - Is it possible to make frames highlighted when someone is casting heal on that unit? (Even if all heal is overhealing)


    No.


    - How to make specific text visible only when mouse is hovering frame? I have been going over documentation and i found IsMouseOver() function, but it works only for "frame the text is attached to" and not the whole frame.


    You're reading too much into the documentation. It works how you want it to work.
    Posted in: Unit Frames
  • 0

    posted a message on Pitbull 4 Friendly Unit Buffs
    You most certainly can do this. The only thing you can't do is show an icon for a debuff that is missing.

    To do what you want is pretty easy. Since everyone seems convinced that you can't let's walk through how to do it.

    a) /pitbull, Modules, Aura, Aura filter editor.

    b) Go to the Advanced tab and select Druid friend buffs.

    c) In the New filter box type "Extra Buffs". You'll now have a filter that's identical to the built in Druid friend buffs filter but is named Extra buffs. This filter is going to be Extra buffs that we want to always be able to see. Uncheck everything but Gift of the Wild, Thorns and Mark of the Wild.

    d) Now scroll to the top and choose Default buffs mine.

    e) In the New filter box type Mine+Buffs (or whatever you want to call it).

    f) Set all the Filter dropdowns to None until you only have one. Technically you could just add what we're going to do to the end, but doing it in the manner I'll show you will make your filter dependent upon the built in one so if it changes you don't have to do anything to gain the changes.

    g) Now for the first Filter drop down choose Default buffs, mine. In the second choose Extra Buffs. In the first opreator field change it to OR. Everything else can be left alone.

    h) Now go under the Layout editor to the layout you want to use this on, go to Auras, Filters, Buffs and choose the Mine+Buffs filter.

    Useful things to know about meta filters. AND bind more closely than OR. So if you have something that looks like this:

    foo and bar or baz

    foo and bar must be true or baz must be true.

    If you want to force ORs to bind more closely than an AND just put them in a separate meta filter. Each filter is evaluated separately so that can get you want you want in that circumstance.

    There really is almost nothing you can't do with the aura filtering system in PB4. Some things might take a bit more hoop jumping than I'd like but the design allows for a fairly simple UI and filtering code.
    Posted in: AddOn HELP!
  • 0

    posted a message on PitBull 4.0
    Quote from Lorthas
    I got the two following errors today:

    5x <string>:"PitBull4_LuaTexts:Player:Lua:Energie":5: attempt to index local 'color' (a nil value)
    PitBull4_LuaTexts-v4.0.0-beta6\LuaTexts.lua:1127: in function `AddFontString'
    PitBull4-v4.0.0-beta6\ModuleHandling\TextProviderModule.lua:118: in function `UpdateFrame'
    PitBull4-v4.0.0-beta6\ModuleHandling\Module.lua:319: in function `Update'
    PitBull4-v4.0.0-beta6\UnitFrame.lua:636: in function `Update'
    PitBull4-v4.0.0-beta6\UnitFrame.lua:662: in function `UpdateGUID'
    PitBull4-v4.0.0-beta6\Main.lua:1331: in function `CheckGUIDForUnitID'
    PitBull4-v4.0.0-beta6\Main.lua:1342: in function `?'
    CallbackHandler-1.0-5 (Ace3):147: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:147>
    <string>:"safecall Dispatcher[1]":4: in function <[string "safecall Dispatcher[1]"]:4>
    <in C code>: ?
    <string>:"safecall Dispatcher[1]":13: in function `?'
    CallbackHandler-1.0-5 (Ace3):92: in function `Fire'
    AceEvent-3.0-3 (Ace3):120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
    <in C code>: in function `TurnOrActionStop'
    <string>:"TURNORACTION":4: in function <[string "TURNORACTION"]:1>
    
      ---


    22x <string>:"PitBull4_LuaTexts:Player:Lua:Energie":5: attempt to index local 'color' (a nil value)
    PitBull4_LuaTexts-v4.0.0-beta6\LuaTexts.lua:966: in function `?'
    CallbackHandler-1.0-5 (Ace3):147: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:147>
    <string>:"safecall Dispatcher[2]":4: in function <[string "safecall Dispatcher[2]"]:4>
    <in C code>: ?
    <string>:"safecall Dispatcher[2]":13: in function `?'
    CallbackHandler-1.0-5 (Ace3):92: in function `Fire'
    AceEvent-3.0-3 (Ace3):120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
    
      ---


    Bad LuaText code is bad. Stanzilla asked me about this same error. Guessing you're using the same LuaText.

    This one is correct:
    local max = MaxPower(unit)
    if max > 0 then
        local _, power_token = UnitPowerType(unit)
        local r,g,b = PowerColor(power_token)
        return "|cff%02x%02x%02x%s|r || |cff377BBC%s|r", r, g, b, Power(unit), MaxPower(unit)
    end


    The LuaText that causes this error is mucking around in the internal color tables without realizing that it's possible that there is no color for a given type of powerbar. Use PowerColor()
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    Quote from crozak
    i need some help guys. i want my target's target frame to show my name as "<YOU>". like this.



    if UnitIsUnit(unit,"player") then
      return "<YOU>"
    else
      return Name(unit)
    end


    Something like that.
    Posted in: Unit Frames
  • To post a comment, please or register a new account.