PDA

View Full Version : [WoW] Pitbull4 + custom group



Feehza
04-17-2010, 10:35 AM
Code & Download UPDATED (23.02.2011)
In search for a nice addon which support custom group (if your group splitted up in bgs or raids) i modified my pitbull4 (i dont like grid).
I am a newbie @ lua, but this modifications work for me
Pitbull-Version: v4.0.0-beta25

-----------------------------

You can download the code from here: http://tinyurl.com/y4xspgl (tinyurl, cuz i dont like to be existent for thousand years in searchengines)
You only have to replace the names of your toons in PitBull4\GroupHeader.lua on line 311

-----------------------------

... Or you can edit the pitbull code for yourself:


File: PitBull4\Options\Units.lua
search for:


MAINTANK = L["Main tanks"],


add a line below:


MULTIBOX = L["Multibox"],
-----------------------------

search for:


if start == 'MAINTANK' or start == 'MAINASSIST' then
replace with:


if start == 'MAINTANK' or start == 'MULTIBOX' or start == 'MAINASSIST' then
-----------------------------



File: PitBull4\GroupHeader.lua:
search for:


local tank_list = {}
local function get_main_tank_name_list()
local main_tanks
if oRA3 then
main_tanks = oRA3:GetSortedTanks()
elseif oRA then
main_tanks = oRA.maintanktable
else
main_tanks = CT_RA_MainTanks
end
if main_tanks then
wipe(tank_list)
for i = 1, 10 do
local v = main_tanks[i]
if v then
tank_list[#tank_list+1] = v
end
end
local s = table.concat(tank_list, ',')
if s ~= "" then
return s, #tank_list
end
end
if PitBull4.leaving_world or not UnitInRaid("player") or not UnitInParty("player") then
-- Not in a raid or a party, so no main tank list. We have
-- to bail out here becuase WoW whines with a You are not in a party
-- message to the user now. /sigh
return nil, 0
else
return nil, count_returns(GetPartyAssignment("MAINTANK"))
end
end
add this code below:


-- multibox group
local multibox_list = {}
local function get_multibox_name_list()
local multibox_units = { UnitName("Reyleniken"),UnitName("Reyvilan"),UnitName("Reynohen"),UnitName("Reyjouzyn"),UnitName("Reyrazchak")}


if multibox_units then
wipe(multibox_list)
for i = 1, 5 do
local v = multibox_units[i]
if v then
multibox_list[#multibox_list+1] = v
end
end
local s = table.concat(multibox_list, ',')
if s ~= "" then
return s, #multibox_list
end
end
if PitBull4.leaving_world or not UnitInRaid("player") or not UnitInParty("player") then
-- Not in a raid or a party, so no main tank list. We have
-- to bail out here becuase WoW whines with a You are not in a party
-- message to the user now. /sigh
return nil, 0
else
return nil, count_returns(GetPartyAssignment("MULTIBOX"))
end
end


-----------------------------

Search for:


if group_filter == "MAINTANK" then
name_list = get_main_tank_name_list()
end


add this code below:


if group_filter == "MULTIBOX" then
name_list = get_multibox_name_list()
end


-----------------------------

search for:


if start == "MAINTANK" or start == "MAINASSIST" then
replace with:


if start == "MAINTANK" or start == "MULTIBOX" or start == "MAINASSIST" then
-----------------------------



File: PitBull4\Options\Units.lua

search for:


disabled = disabled,
hidden = function(info)
local db = get_group_db()

local unit_group = db.unit_group
local party_based = unit_group:sub(1, 5) == "party"

return party_based -- only show in raid
end
replace with:


disabled = disabled,
hidden = function(info)
local db = get_group_db()

local unit_group = db.unit_group
local party_based = unit_group:sub(1, 5) == "party"

return -- only show in raid
end
-----------------------------

File: PitBull4\GroupHeader.lua:
search for:


local group_filter = not party_based and group_db.group_filter or nil


replace with:


local group_filter = group_db.group_filter or nil
-----------------------------




File: PitBull4\Main.lua

add somewhere in the code (maybe line 1149):


function refreshMultiboxingList_OnEvent()
for header in PitBull4:IterateHeadersForSuperUnitGroup("raid") do
local group_db = header.group_db
if group_db and group_db.group_filter == "MULTIBOX" then
header:RefreshGroup()
end
end
for header in PitBull4:IterateHeadersForSuperUnitGroup("party") do
local group_db = header.group_db
if group_db and group_db.group_filter == "MULTIBOX" then
header:RefreshGroup()
end
end
end

local MB_frame_party = CreateFrame("Frame","refreshMultiboxingList",UIParent)
MB_frame_party:SetScript("OnEvent", refreshMultiboxingList_OnEvent)
MB_frame_party:RegisterEvent("PARTY_MEMBERS_CHANGED")

local MB_frame_raid = CreateFrame("Frame","refreshMultiboxingList",UIParent)
MB_frame_raid:SetScript("OnEvent", refreshMultiboxingList_OnEvent)
MB_frame_raid:RegisterEvent("RAID_ROSTER_UPDATE")
------------------------------

File: PitBull4\GroupHeader.lua:
search for:

if party_based then
self.super_unit_group = "party"
self.unitsuffix = unit_group:sub(6)
self:SetAttribute("showRaid", nil)
self:SetAttribute("showParty", true)
self:SetAttribute("showPlayer", include_player and true or nil)
self:SetAttribute("showSolo", show_solo and true or nil)
self:SetAttribute("groupFilter", nil)
else
replace with:


if party_based then
self.super_unit_group = "party"
self.unitsuffix = unit_group:sub(6)
self:SetAttribute("showRaid", nil)
self:SetAttribute("showParty", true)
self:SetAttribute("showPlayer", include_player and true or nil)
self:SetAttribute("showSolo", show_solo and true or nil)
if name_list then
print ("Namelist"..name_list)
self:SetAttribute("groupFilter", nil)
self:SetAttribute("nameList", name_list)
else
self:SetAttribute("groupFilter", group_filter)
self:SetAttribute("nameList", nil)
end
else
search for:


self:SetAttribute("sortMethod", sort_method)
replace with:


sort_method = "NAMELIST"
self:SetAttribute("sortMethod", sort_method)
for Raid:
1. in pitbull you choose on the left side "groups"
2. create a new group and activate it, call it "multiboxing_raid" or smt
3. set dropdown to "Raid"
4. Choose Tab "Filter" turn on all raid types and set the dropdownbox to "Multibox"


for party only(if you delete the code in options\units.lua i shown above)
1. in pitbull you choose on the left side "groups", call it "multiboxing_party" or smt
2. create a new group and activate it (and: i prefer to disable the playerframe under the menue single units and turn on the playerframe in partymode)
3. set dropdown to "Group"
4. Choose Tab "Filter" turn on group and turn off all raidtypes and set the dropdownbox to "Multibox"


There is 1 problem:
If you form a raid, you wont get an update on multibox filtered raidframe until a player leave, join, switch to another group or you type /reloadui.
But when the raidframes appears no further issues are present.

mrmcgee21
04-17-2010, 11:22 AM
I've been looking for something like this for a long time, thanks a ton.

Feehza
04-18-2010, 09:11 AM
I've been looking for something like this for a long time, thanks a ton.

If you have some problems with it, tell me.
I have modified a lot since yesterday + i uploaded the necessary files on my webspace (look above).

Sam DeathWalker
04-18-2010, 11:47 PM
Ok seems Im the only one who dosn't mind sounding stupid but what exactly does this do?

Are you saying this will load a different set of pitbull action bars if you are in a raid and then another set if you are in your group?

So one set of bars for

maintank and another for mainassist and yet another for multibox group?

Feehza
04-19-2010, 04:16 AM
Ok seems Im the only one who dosn't mind sounding stupid but what exactly does this do?

Are you saying this will load a different set of pitbull action bars if you are in a raid and then another set if you are in your group?

So one set of bars for

maintank and another for mainassist and yet another for multibox group?


Hmmm approximate ...
You can choose for partylayout and raidlayout your predefined list of names, so you have your toons always in your partyframe and always in the right sort.
For example: In BG all your toons are splited up in different raidgroups. You just go to groups ->Tab:filter and choose not Maintank or Mainassist, you choose Multibox.
But remember, you have to put the Names of your toons in PitBull4\GroupHeader.lua.

lacitpo
04-19-2010, 09:50 AM
I'm haven't written LUA before so forgive me for my ignorance. Is there a way this could be written in a modular way so that it exists as it's own addon and works with pitbull as a plug-in of sorts?

EDIT: Submitted this post to the pitbull dev page as a feature request. (http://www.wowace.com/addons/pitbull4/tickets/736-custom-groups/) Might get better notice if others went behind me and voiced their support.

Feehza
04-19-2010, 10:26 AM
I'm haven't written LUA before so forgive me for my ignorance. Is there a way this could be written in a modular way so that it exists as it's own addon and works with pitbull as a plug-in of sorts?

EDIT: Submitted this post to the pitbull dev page as a feature request. (http://www.wowace.com/addons/pitbull4/tickets/736-custom-groups/) Might get better notice if others went behind me and voiced their support.



Download the edited files from here: http://tinyurl.com/y4xspgl
Put the files into your AddOns\PitBull4\

You only have to edit the line 334 in GroupHeader.lua for your real toon names
Thats not so hard, i assume you didnt see the download link :)

I am so lua-newbish, i dont think i am able to code an module for it. (I give it a try the next days)
Its more a hack not clean nice modification.



BTW: Somewhere i read a statement of a pitbull programer "no atm we dont plan to include custom groups" :(

lacitpo
04-19-2010, 11:10 AM
I'll download you're patch when I get home. I just think about when an update for pitbull 4 comes out and I accidently overwrite it, or you're not around to to update the code. I'm always wary to begin relying on something that may not be available to me in the future.

Nsaeyn
04-20-2010, 11:59 PM
Nice work. Thank you for posting but can you update the link. It is dead.

Feehza
04-21-2010, 03:56 AM
Nice work. Thank you for posting but can you update the link. It is dead.

Sorry, should work again.

Bloodcloud
04-21-2010, 05:40 AM
Hi,

I would have liked to use Pitbull for healing since a long time (with repeater regions-innerspace or on screen buttons - HKN) the only problem is that the right mouse was already taken.

Is there a possibility to move the right click (player context menu, where you can trade, inspect ...) to a part of the pitbull frame lets say the icon or so?

if this would work I could free up some screen propperty / remove healbot from my tank :) (which I use as the background for my on screen button)

lacitpo
04-21-2010, 09:43 AM
I always just adjusted that to ctrl+click or something like that. Not sure if that's an option for you

Feehza
04-21-2010, 12:08 PM
Hi,

I would have liked to use Pitbull for healing since a long time (with repeater regions-innerspace or on screen buttons - HKN) the only problem is that the right mouse was already taken.

Is there a possibility to move the right click (player context menu, where you can trade, inspect ...) to a part of the pitbull frame lets say the icon or so?

if this would work I could free up some screen propperty / remove healbot from my tank :) (which I use as the background for my on screen button)


Hello! i browse through the code and i didnt see a way to change this in a short time. For sure, it isnt impossible, its just a matter of time and skills (at which i lack).

Bloodcloud
04-22-2010, 05:33 AM
I always just adjusted that to ctrl+click or something like that. Not sure if that's an option for you

I normally use right/left/middle for Greater Heal/Flash Heal/renew and crtl is not mapped on my G13 :)
So it is not an option in my current setup. Thanks for the idea though.


Hello! i browse through the code and i didnt see a way to change this in a short time. For sure, it isnt impossible, its just a matter of time and skills (at which i lack).

I might have a look at it as well. I modified some lua code in the past.
TY for looking.

cheers
BC

lacitpo
04-23-2010, 09:55 AM
I don't know the process that the pitbull devs go through but I know any good dev listens to what their audience wants. Anyone who'd like to see this added to the core functionality of pitbull could drop by and voice your support (http://www.wowace.com/addons/pitbull4/tickets/736-custom-groups/).

The ticket is marked now as "New - Issue has not had initial review yet."

Flekkie
04-26-2010, 03:32 PM
Providing the ability to create custom name lists is something on my todo list but it's pretty low at this point.

He changed status to 'acepted' and priority to 'low'.

Bloodcloud
04-27-2010, 05:14 AM
I fiddled with some Pitbull4 layout in the weekend and I like it. Also the ability to create multiple party views and the click-through possibility.

I have now an interactive party frame with the right-click context menu and NO mana, health,cast .... bars to trade and do stuff with party members and a non-interactive (read: repeater area ala grid/healbot) where I see castbar/healthbar/manabar of my toons and can heal them with mouseclick :)

Will post a screenshot when I am done.

serz
04-28-2010, 07:10 AM
I like it, too,
The Toon heal with mouseclick is nice

Danash
05-28-2010, 11:02 PM
For some reason I got it to work once somehow (didnt work when I got inside BG, but I flipped something on and it did) Now everytime I go into BG's it only shows the player and not the whole party. Been messin around with clicking filters "raids" on and off, Seem stuck and also think Im overthinking it. Does it need to be turned on/reset everytime you enter a BG to see your peeps? Thank-you in advance.

Danash

Update: Here are three screens of my settings
I first downloaded your files, placed them in the folder. Then changed the names on line 334 as such "
local multibox_units = { UnitName("Orcyôrc"),UnitName("Orcyörc"),UnitName("Orcyòrc"),UnitName("Orcyórc"),UnitName("Neyleniken")". Left in the fifth name as Neyl because I am only running four right now, Not if I should delete it or if it even matters.
http://i105.photobucket.com/albums/m232/DanAshriggs/A3.jpg
http://i105.photobucket.com/albums/m232/DanAshriggs/A2.jpg
http://i105.photobucket.com/albums/m232/DanAshriggs/A1.jpg

Danash
05-31-2010, 02:44 AM
Update: Figured it out. For anyone that ever has this problem it is because I was failing to do one thing. In Groups > General Tab when Im in a BG I must use dropdown menu "Unit Groud" (in my third picture) and select "raid". When Im not in BG I must return setting to "party" to be able to see my team. Not much of a hassle, takes about 15 secs to do all 4 or 5. Wish I could use a macro to switch the setting but yea figured it out.

Feehza
06-01-2010, 05:29 AM
I dont have to do anything when im join a bg. Cant remember exactly but i think i have two sets. 1 for BG and 1 for Raid. And they only go active when the necessary groupmodus is existent. In the end i dont notice when my Pitbull switch between raid and group

Feehza
02-23-2011, 06:48 PM
downloadlink and code updated
(only modified files in file)