So right now I have stuff like this:
Code:
sets.idle = {}
sets.idle.Town = {}
sets.idle.Town.Normal = {main=staffs.PDT, sub="Quire Grip",range="Oneiros Harp",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.Field = {}
sets.idle.Field.Normal = {main=staffs.PDT, sub="Quire Grip",range="Oneiros Harp",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.Weak = {}
sets.idle.Weak.Normal = {main=staffs.PDT,sub="Quire Grip",range="Oneiros Harp",
head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Bloodgem Earring",
body="Gendewitha Bliaut",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Meridian Ring",
back="Umbra Cape",waist="Flume Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
The idea is that there are multiple possible idle sets a job may want to use within any given scope. Scopes are Weak, Town and Field; so, I have an idle set while weak, an idle set for town gear, and an idle set for everywhere else in the world.
Within each of these I may want to be more specific, such as having a DT idle set that still allows some refresh (blm), or varying pet idle sets for pup or bst.
Now, the 'Normal' version of each set is the default if no other idle mode has been defined. Code for that is (simplified):
Code:
if sets.idle.Field[IdleMode] then
equip(sets.idle.Field[IdleMode])
else
equip(sets.idle.Field.Normal)
end
What I'm wondering is if I -need- to define it like that, or if I could simplify to:
Code:
sets.idle = {}
sets.idle.Town = {main=staffs.PDT, sub="Quire Grip",range="Oneiros Harp",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.Field = {main=staffs.PDT, sub="Quire Grip",range="Oneiros Harp",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Flume Belt",legs="Nares Trews",feet="Aoidos' Cothurnes +2"}
sets.idle.Field.DT = {...}
sets.idle.Field.Pet = {...}
sets.idle.Weak = {main=staffs.PDT,sub="Quire Grip",range="Oneiros Harp",
head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Bloodgem Earring",
body="Gendewitha Bliaut",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Meridian Ring",
back="Umbra Cape",waist="Flume Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
And use:
Code:
if sets.idle.Field[IdleMode] then
equip(sets.idle.Field[IdleMode])
else
equip(sets.idle.Field)
end
This removes the empty top-level definition of sets.idle.Field = {}, making that the default set instead, and creating new sets underneath that that allow for more specificity. The question is whether GearSwap is ok with that. Since those sub-sets' names won't conflict with any of the existing equip slot fields, it doesn't seem like it should care if they exist or not, and it shouldn't interfere with the other equips being done, I think.
If so then I could also create a fallback when the weak/field/town scopes aren't defined, such that they could all be collapsed into a single set (sets.idle) if I don't want to differentiate between them, or if I don't want to differentiate all of them (eg: default idle set, and a different idle set for weak, but don't bother distinguishing between town and field).
Anyway, going to try that approach and see what happens.