Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ffxiv_task_ vs onupdate handler.
#5
There are three task queues in the task hub and each queue can contain at most two tasks, the rootTask and the pendingTask. Once a task is queued and promoted to the rootTask, it continues to receive the bot update pulse as long as it has the highest priority among the queues. The queue priority goes in this order: IMMEDIATE->REACTIVE->LONG_TERM. Right now the ffxiv framework only uses the LONG_TERM task queue...using the other queues adds more complexity that we don't want to jump into until we have more experience with the framework (it was written from scratch for FFXIVMinion). Once a task is active, it basically just loops through its cnes which are added in its Init() function. Those CNEs may have need to queue a new subtask for that task, in which case a new task is added to the stack and this task becomes the "currentTask".

A task will continue until task_complete_eval() or task_fail_eval() checks return true, or it is manually killed. It's very easy to visualize, just imagine a single task that can queue a single subtask, which can queue a single subtask, etc. The highest subtask on the stack is the currentTask and will receive the update pulse and have its Process() CNEs checked. ALL tasks on the stack will have their ProcessOverwatch CNEs checked.

If you want your task to be queued, you would need to add a CNE that adds it as a subtask of whatever bot mode you want to use it from. You don't have to modify the Init() function of that task, you can insert them from an Init() function in your own module. Just add your cne to the task.process_elements() list or the task.overwatch_elements list. You want your module to be as independent of the main bot code as possible, so you want to avoid overriding/hooking/etc if at all possible.
Reply
 


Messages In This Thread
RE: ffxiv_task_ vs onupdate handler. - by HansW - 11-30-2013, 09:27 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-16-2013, 10:22 PM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-16-2013, 11:49 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 12:36 AM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-17-2013, 01:26 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 02:33 AM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-17-2013, 03:08 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 04:34 AM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 04:05 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 05:41 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 05:49 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 07:38 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 08:11 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 09:41 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 10:00 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-15-2014, 12:02 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products