Gearset Equip Toggle?

I know I can devote a button to each set of gear I set up in the Equipment Manager, but what I want it a single button macro that will swap between 2 named sets. Say am in Set1, hit it and Set2 get enabled. Hit it again and Set1 get enabled. Spent half an hour trying various things I read about with not much luck… not sure how to write a conditional to test for the current name and switch it is it NOT enabled.

I haven’t tested this yet because I’m not on my Gaming PC right now, but this should do it.

/stopmacro [combat]
/run local E for i=0,9 do E=C_EquipmentSet.GetEquipmentSetInfo(i) if E and tContains({"Set Name 1","Set Name 2"},E.name) and not E.isEquipped then C_EquipmentSet.UseEquipmentSet(E.setID) break end end

If you’re in one of the ones you specified, you’ll swap to the other.

If you’re not, you’ll use the first one one the list.

You can actually set it up to use a whole list of them and traverse the list using this macro assuming you don’t run out of characters.

2 Likes

I have a set of gear for fishing and I toggle between my normal equipment and that using Equipment Sets and a macro.

I did is created 4 equipment sets on each character
“Fishing”, which has my fishing pole and other stuff
And the very originally named: Spec1, Spec2, Spec3 and these are assigned to my class specializations. Assigning to a class spec isn’t really required but it is convenient; when I switch class specs from frost to fire (for example), the game auto replaces my frost azerite gear with my fire azerite gear, as well as my weapon that I use for both specs.

This is the macro
#showtooltip
/equipset [noequipped:fishing pole] Fishing;[spec:1]Spec1;[spec:2]Spec2;[spec:3]Spec3

If you’re not familiar with the game’s Equipment Manager you access it this way:

  1. Open your character screen
  2. click the Equipment Manager button (little button near the upper-right corner)
  3. Create an Equipment Set
  4. Click a slot and choose to Ignore it (which is nearly everything in Fishing) or choose what gear you want there. Save the set.
    Do many saves, make a change to a slot, save the set.

NOTE: Every time you replace a piece of gear used in an equipment set you must remember to go into the Equipment Manager and update the set.

4 Likes

Hmmm, very interesting… yes I already have a macro to swap sets back and forth with my fishing gear. Works 100%. I tried adding the one more set (FWIW, I have a set with my Gift of Loa gear and one without as outside of Zuldazar, the “without” set is stronger), but didn’t understand why the set names in brackets, so I tried it without. BTW, my “with GoL” is “Raid” and without as “World.” Using

“…Fishing;World;Raid” only switched between Fishing and World. I added in the set names in brackets as such:

#showtooltip
/equipset [noequipped:Fishing Pole] Fishing;[World]World;[Raid]Raid

And it still only swapped between fishing and world. THEN it dawned on me I am NOT switching specs here, just gear sets. KNOW how to deal with that?

And thanks for the help…

#showtooltip
/equipset [noequipped:Fishing Pole] Fishing; [group:raid] Raid; World

The set I called Raid really is my “with Gift of the Loa 2 pc set bonus.” Thus I want it when questing around Zuldazar as well as inside raids. However, looking through the link… seems I CAN use an [equipped] conditional, just have to figure out how to write it (gonna try this:

#showtooltip
/equipset [noequipped:Fishing Pole] Fishing; [equipped:Raid] Raid; World)

Well, that doesn’t work… maybe because there already is a conditional at the start??

[equipped:Raid] isn’t going to work because “Raid” isn’t a type of gear.

If you have something like “In Raids I’ll always want set A and in everything else I’ll want set B,” I can work with that, but the initial description didn’t say anything other than ‘swap between two [arbitrary] gearsets’ so that’s what I wrote.

equipped:<item type>

So, equipped:Fishing Pole works just fine.

equipped:Shields works just fine.

equipped:raid doesn’t.

The list of item times is not as intitive as you’d think.

I believe it’s a pastiche of these two lists:

https://wow.gamepedia.com/InventorySlotName
and
https://wow.gamepedia.com/ItemType

The thread got kinda spun off because many have a specific set of gear for fishing (as I do)… and folks were trying to find a way I could choose among 2 sets of gear OTHER than fishing. I only used the term Raid because it was shorter than Zuldazar, my original name for that set of gear. I was only trying to see if it was possible to only use one button, unless anyone has a MUCH cleverer way, I may have to stick to 2 buttons.

As it’s also about a set of gear for one zone essentially, I kinda doubt I could have a constantly looping macro, but maybe a bit of lua script that WOULD simple swap in my “Raid/Loa” set of gear when I enter the zone… which COULD be a kinda worth while add-on!

My solution above will allow you to do exactly what you said.

If you want something that automatically assigns gear as you zone, that’s possible. It just takes an addon looking for the event involved in zoning.

Not complicated at all, really.

I may have an addon I used for something else that could be adapted to just that.

Did a little work on this, but didn’t finish before I ran out of steam tonight.

Essentially define this bit somewhere:

local BigBoyPants = "Name of your 'raid' set"
local BBPNumber
local TestSet
local CurrentSet = {}
local OldSet = {}
local player = "player"
local Maps = {}

function IsItTime()

  wipe(Maps)

  if IsInRaid() then

    return true

  else

    Maps.m = GetMapInfo(GetBestMapForUnit(player))

    while 
	  not tContains({"Cosmic", "World", "Continent"}, Maps.m.mapType) do

      Maps.o == CopyTable(Maps.m)
      Maps.m.GetMapInfo(Maps.m.parentMapID)

    end

    if Maps.o and Maps.o.mapType == "Continent" 
	and tContains({875, 876}, Maps.o.mapID) then

      return true

    end

  end

  return false

end

function PutOnMyBigBoyPants()

  wipe(CurrentSet)

  for i = 0, 9 do

    TestSet = C_EquipmentSet.GetEquipmentSetInfo(i)

    if TestSet and TestSet.name == BigBoyPants then

      BBPNumber = TestSet.setID

    end

    if TestSet and TestSet.isEquipped then

      CurrentSet = CopyTable(TestSet)

    end

    if BBPNumber and next(CurrentSet) then 

      break

    end

  end

  if BBPNumber then

    if next(CurrentSet) and CurrentSet.setID == BBPNumber then
    --  no action - you're already wearing your big boy pants

    else

      C_EquipmentSet.UseEquipmentSet(BBPNumber)

      if next(CurrentSet) then

        OldSet = CopyTable(CurrentSet)

      else

        print("You are not wearing a named equipment set.")
        print("The complimentary function will not execute.")

      end

    end

  else

    print("No equipment set named", BigBoyPants, "found.")

  end

end

function PutMyComfyClothesBackOn()

  if next(OldSet) then

    if C_EquipmentSet.GetEquipmentSetInfo(OldSet.setID).isEquipped then
	--  skip it - you're already in your comfy clothes

	else

	  C_EquipmentSet.UseEquipmentSet(OldSet.setID)

	end

  end

end

On the following events…

"NEW_WMO_CHUNK", "ZONE_CHANGED", "ZONE_CHANGED_NEW_AREA"

…run the following code:

if not UnitAffectingCombat(player) then

  if IsItTime() then

    PutMyBigBoyPantsOn()

  else

    PutMyComfyClothesBackOn()

  end

end

This is really rough and I haven’t tested it at all.

It’s more proof of concept than anything else.

But it does show a way of managing automatic gear swaps for arbitarily-defined equipment sets under arbitrarily-defined conditions.

There’s not nearly enough error checking in this for me to consider using it as is.

As and educational exercise, though, it might be worth playing with.

Did you see this ^?

Yes.

It does not allow for arbitrary equipment sets based on arbitrary requirements.

It does not set an equipment set based on presence in only Zandalar or Kul’Tiras.

It does SOME of what the OP asked for, not all of it.
what I want it a single button macro that will swap between 2 named sets
It does not do that.
a bit of lua script that WOULD simple swap in my “Raid/Loa” set of gear when I enter the zone
It does not do that.

What I wrote first will handle exactly the situation the OP mentioned - swap between two gear sets toggling a single button (no mention in that post of fishing or raids or anything else - just “two gear sets”).

What I wrote second will handle ANY situation that you can define and swap in and out ANY gearset based on them without having to do anything other than set it up. It’s a rough proof-of-concept and it could be easily expanded to cover virtually ANY definable situation.

What what you wrote covers only those things for which there are defined conditionals which most definitely does not include knowing which zone one is in.

I think adding in the fishing gearset somewhat muddied my original intent. From a logical standpoint, it might seem one needs to:

  1. evaluate which set is equipped (call them 1, 2, 3, just named gearsets)
  2. based on that swap to the next one (if 1, then 2, if 2 then 3, if 3 then 1).

So a single button to swap between 3 sets… obviously needing additional presses to get to what one wants. The only difficulty is that it is very easy to see visually when the fishing is equipped, but not at all going between the 2 pure gear unless I make the 2 back pieces look different (they are both xmogged the same right now). I wonder if one can post a screen notice as part of a macro?

Make sense?

https://wow.gamepedia.com/API_UseEquipmentSet

What I have can be modifed to stroll through multiples just as easily as it toggles between two. Lemme mess with it a bit.

Also, if you want notification on swap I can do that.

This makes an assumption that you name your gearsets SetN where N is an integer.

They don’t have to be in order in the display or line up with the set id number.

If you’re not wearing a set, you’ll go into the first one in the table. If you are, you’ll move to the next one.

You select which sets are in your rotation by putting the N part if the SetN name in the table named “T” in the code below.

/stopmacro [combat]
/run local T,E,N={1,3,7}N=T[1]for i=0,9 do E=C_EquipmentSet.GetEquipmentSetInfo(i)if E and tContains(T,strsub(E.name,4))and E.isEquipped then N=(i==#T and T[1]or T[i])break end end C_EquipmentSet.UseEquipmentSet(N)print("Equipping Set"..(N or "?"))

As written, this will rotate through Set1, Set3, and Set7 only (for instance).

There is virtually no error checking going on here, so make sure you’ve got everything set up right first.

Also, you get a notification of which Set is being equipped (or more accurately, which set was just equipped) in your private chat window.

1 Like

Might it be possible to use more recognizable gearset names rather than Set[number]? Am I correct in thinking your code just parses the number and not the “Set” designation? Somehow I THINK it needs the numbers to rotate, so could I use World1, Raid2, Fishing3?

Update: I renamed my 3 sets, pasted your code into a macro and got this LUA error:

Message: [string “local T,E,N={1,3,7}N=T[1]for i=0,9 do E=C_EquipmentSet.GetEquip…”]:1: ‘)’ expected near ‘’
Time: Sun Mar 3 10:54:57 2019
Count: 1
Stack: [string “local T,E,N={1,3,7}N=T[1]for i=0,9 do E=C_EquipmentSet.GetEquip…”]:1: ‘)’ expected near ‘’

Locals:

Yeah, I’m trying to keep this in the macro length limit. The simplest way to do that that doesn’t require you to know the set numbers (which are not always sequential) is to number the sets in the names.

I’ll take a look at the code for the error real quick.