I see, I'm guessing the major reason for the distinction is because multiple instances means it's necessary to manage the instance variables, etc.
With regards to priorities, in the code:
Code:
local ke_dead = ml_element:create( "Dead", c_dead, e_dead, 20 )
self:add( ke_dead, self.overwatch_elements)
local ke_flee = ml_element:create( "Flee", c_flee, e_flee, 15 )
self:add( ke_flee, self.overwatch_elements)
local ke_rest = ml_element:create( "Rest", c_rest, e_rest, 14 )
self:add( ke_rest, self.overwatch_elements)
local ke_addFate = ml_element:create( "AddFate", c_add_fate, e_add_fate, 10 )
self:add(ke_addFate, self.overwatch_elements)
local ke_returnToMarker = ml_element:create( "ReturnToMarker", c_returntomarker, e_returntomarker, 25 )
self:add( ke_returnToMarker, self.process_elements)
--nextmarker defined in ffxiv_task_gather.lua
local ke_nextMarker = ml_element:create( "NextMarker", c_nextmarker, e_nextmarker, 20 )
self:add( ke_nextMarker, self.process_elements)
local ke_addKillTarget = ml_element:create( "AddKillTarget", c_add_killtarget, e_add_killtarget, 15 )
self:add(ke_addKillTarget, self.process_elements)
local ke_fateWait = ml_element:create( "FateWait", c_fatewait, e_fatewait, 10 )
self:add(ke_fateWait, self.process_elements)
Am I correct that the firing order is something like:
--Overwatches execute first, highest priority = first executed
1) Check if we're dead,
2) Check if we should flee,
3) Check if we should add a FATE
--Process elements, executed assuming overwatches pass, highest priority first
4) Return to our marker,
5) Next marker if timer has expired,
6) Kill the best target available,
7) Wait a FATE if necessary
Every task also performs its subTask before returning back to the root, so if we hit 4, we perform the subtasks all the way down to it's lowest level, and work our way back up to the root. Also, if I added an overwatch with priority 13 to check mob aggro(not saying I need to, just theory), it effectively alters all instances of ffxiv_task_grind to process this overwatch before checking to see if a FATE should be added?
Thanks for being patient with me also, I'm mostly a sql/vba developer and I haven't worked in an OO language since college, tough getting back into that mindset.