cdmichaelb / Outfitter

Outfitter - Classic
MIT License
10 stars 22 forks source link

Spec Change Automation for Wrath Classic #118

Open not-ilzan opened 1 year ago

not-ilzan commented 1 year ago

I don't remember when this was added to Outfitter the first time around but it was great having an automation script for gear when swapping between primary and secondary talents. Particularly in the case of classes/specs with gear that requires specific talents to equip. (Looking at you enhance shamans and titan's grip fury warriors.) Is this something that could be relatively easily added?

aristoblis commented 1 year ago

I am also eager to see this functionality added. Would be amazing to be able to swap specs and gear with a single click.

dwieland commented 1 year ago

Until someone implements it in the plugin, you can use the following custom script:

-- $EVENTS PLAYER_TALENT_UPDATE
-- $DESC Equips the outfit when your specialization changes

-- $SETTING talentGroup = {type="number", label="Talent group ID"}

-- Equip if it's the specified talent group
if GetActiveTalentGroup() == setting.talentGroup then
  equip = true
end

You can then configure Talent group ID as either 1 or 2, depending on what you to use the gear set for.

aristoblis commented 1 year ago

OMG...this is amazing!! You, sir (or m'am, I don't judge), are a damn genius.

Gogo1951 commented 1 year ago

Hey @not-ilzan ,

It works for some specs, but not all... needs some more work.

But honestly switching gear based on the spec is really flawed, like having one gear for a bike. You want multiple gear sets. I just key-bind sets for what I'm doing... as a tank... do I need more threat or mitigation? Keybind swap, no need to rock defense gear for trash... As a healer, same deal... do I need MP5, or just SP. I set up shift+Z thorugh shift+c for common sets. That way it's easy to toggle.

Goblintor commented 1 year ago

my little custom script. so far tested with warrior/paladin/mage/shaman/priest/hunter and druid

-- $EVENTS ACTIVE_TALENT_GROUP_CHANGED PLAYER_ENTERING_WORLD
-- $DESC Automatic Equip-Switch after Spec-Switch, Login, entering a dungeon/raid
-- $SETTING Tree1={type="boolean", label="Primary", default=false}
-- $SETTING Tree2={type="boolean", label="Secondary", default=false}
-- activate Tree1 or Tree2 (not both)
if not setting.Tree1 and not setting.Tree2
or setting.Tree1 and setting.Tree2 then
   return
end
-- selected tree = talent group then equip change
if setting.Tree1 and GetActiveTalentGroup()== 1 then
    equip = true
elseif setting.Tree2 and GetActiveTalentGroup()== 2 then
    equip = true
end
Belden1 commented 8 months ago

Had this problem also, took this from 3.3.5 lua

{
        Name = TALENT_SPEC_PRIMARY or "Primary Talents",
        ID = "Talent1",
        Category = "GENERAL",
        Script = Outfitter:GenerateScriptHeader("ACTIVE_TALENT_GROUP_CHANGED", "Equips the outfit when you activate your primary talents")..
[[
equip = GetActiveTalentGroup() == 1
]],
    },
    {
        Name = TALENT_SPEC_SECONDARY or "Secondary Talents",
        ID = "Talent2",
        Category = "GENERAL",
        Script = Outfitter:GenerateScriptHeader("ACTIVE_TALENT_GROUP_CHANGED", "Equips the outfit when you activate your secondary talents")..
[[
equip = GetActiveTalentGroup() == 2
]],
},

How it looks

-- $EVENTS ACTIVE_TALENT_GROUP_CHANGED
-- $DESC Equips the outfit when you activate your primary talents

if GetActiveTalentGroup() == 1 then
    equip = true
else
    equip = false
end