Log in

View Full Version : Vuhdo, custom tank and sort team member.



Baltyre
07-26-2019, 06:27 PM
I'm looking for a way, to automaticly add all my toons in vuhdo private tank pannel and sort them by their slot number in isboxer.

I'm really no good in lua coding, never write an addon or anything. So i did try something really dirty that seems to work (at least, at first glance), i'm wondering if that could be of any interest for someone and if that could be done in a more proper way.

I've got something like this in my Vudho lua :


do_quickRaidReload = false
if IsAddOnLoaded("Isboxer" ) then
if isboxer_load == false and not InCombatLockdown() then
table.wipe(VUHDO_PLAYER_TARGETS);
end
for value, data in pairs( isboxer.CharacterSet ) do
if value == "Members" then
for slot, isboxerCharacterName in pairs( data ) do
isboxerCharacterName = gsub(isboxerCharacterName, "%-[^|]+", "")
if tName == isboxerCharacterName then tInfo["sortMaxHp"] = tInfo["sortMaxHp"]+(1000000*slot); end
if isboxer_load == false and not InCombatLockdown() then
VUHDO_PLAYER_TARGETS[isboxerCharacterName] = true;
do_quickRaidReload = true;
end
if VUHDO_RAID_NAMES[isboxerCharacterName] ~= nil then
VUHDO_PLAYER_TARGETS[isboxerCharacterName] = true;
do_quickRaidReload = true
end
end
end
end
if do_quickRaidReload == true then
isboxer_load = true;
VUHDO_quickRaidReload();
end
end

(full file here : https://pastebin.com/m7150cNU)

My character in private tank are set to be sort by max hp in reverse order.
Seems to work, but i probably did things wrong and idk if it result in unnecessary cpu increase.

Moorea
07-26-2019, 07:08 PM
If there is interest I'm happy to add something for Vudho to DynamicBoxer like it's already doing to sync and sort the EMA team
(or someone can contribute it, it's on github :) )

Moorea
07-27-2019, 04:07 PM
I added an optional callback in 2.2, wanna try to use it ? set DynBoxer.teamCompleteCallBack and it will get called with the team table (indexed by slot), you can use for instance team[i].fullName (or .new if you need just the shortest name that works in target/spells/invite etc)

MadMilitia
07-30-2019, 07:33 PM
By slot? Grid 2 can do this with a custom grid addon if you do something like name your characters a specific way alphabetically.

If you prefer these are the steps:

Install Grid 2.
Make a folder in the _retail_/Interface/AddOns called 'Grid2MyLayout'

Add two files in this location, with the following content:

Filename: Grid2MyLayout.toc



## Interface: 80000
## Title: Grid2MyLayout
## Notes: My Custom Layout(s) for Grid2.
## Author: MadMilitia
## Version: v80000-1.0.0


## Dependencies: Grid2
Grid2MyLayout.lua


Filename: Grid2MyLayout.lua



Grid2Layout:AddLayout("2 Box", {
meta = {
raid25 = true,
raid15 = true,
raid10 = true,
raid = true,
party = true,
arena = true,
},
defaults = {
showSolo = true,
showPlayer = true,
sortMethod = "NAME",
unitsPerColumn = 2,
maxColumns = 2,
allowVehicleTarget = true,
},
[1] = {
nameList="characterName, characterName, characterName",
}
})


Grid2Layout:AddLayout("5 Box", {
meta = {
raid25 = true,
raid15 = true,
raid10 = true,
raid = true,
party = true,
arena = true,
},
defaults = {
showSolo = true,
showPlayer = true,
sortMethod = "NAME",
unitsPerColumn = 5,
maxColumns = 5,
allowVehicleTarget = true,
},
[1] = {
nameList="characterName, characterName, characterName",
}
})


Grid2Layout:AddLayout("10 Box", {
meta = {
raid25 = true,
raid15 = true,
raid10 = true,
raid = true,
party = true,
arena = true,
},
defaults = {
showSolo = true,
showPlayer = true,
sortMethod = "NAME",
unitsPerColumn = 5,
maxColumns = 2,
allowVehicleTarget = true,
},
[1] = {
nameList="characterName, characterName, characterName",
},
[2] = {
nameList="characterName, characterName, characterName",
},
[3] = {
nameList="characterName, characterName, characterName",
},
[4] = {
nameList="characterName",
},
})




Those 3 settings do a single row for 2 box, sorted by name. A single row for 5 box sorted by name and a 1 x 3 x 3 = 10 set for raiding.

You can add multiple rows in Grid2, put specific characters in specific rows, then set the style to whatever you like in Grid2. Ezpz. Then select the appropriate layout in /Grid2 > Layouts > Select by group / solo setting and the item from the above list, aka "5 Box"

Your group will be loaded exactly how you have it named in the lua config. Of course remember to load the new addon along with Grid2 in WoW!