User Tools

Site Tools



behaviortree

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
behaviortree [2017/06/29 07:17] fxfirebehaviortree [2021/02/16 09:44] frenkey
Line 1: Line 1:
 =====Behavior Tree Framwork===== =====Behavior Tree Framwork=====
-Behavior Trees are a wonderful thing when it comes to writing any kind of AI logic. It is currently in its "first working version" and there are still improvements coming in the future.  +Behavior Trees are a wonderful thing when it comes to writing any kind of AI logic. It is currently in its "first working version" and there are still improvements coming in the future. 
-GW2Minion is completely written with this framework. FFXIVMinion is not making use of this, but it *could* be used as well.+  
 +**GW2Minion** is completely written with this framework.  
 + 
 +**FFXIVMinion** is not making use of this, but it *could* be used as well. Instead, it uses the 'older' Cause&Effect framework. Example Code how to build your own addon : {{ ::newaddon.zip |}}
  
 **BT Basics, How they work:** [[http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php|Behavior trees for AI]] **BT Basics, How they work:** [[http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php|Behavior trees for AI]]
Line 69: Line 72:
 {{youtube>MMASYe_FEuU?medium}} {{youtube>MMASYe_FEuU?medium}}
  
 +EDIT: Above the lines where you add the Checkbox, you need to make sure the used variable is NOT nil, so put this above: 
 +<code lua> 
 +if (not Settings.sillyjumper.jump ) then Settings.sillyjumper.jump = false end 
 +</code>
 \\ \\
  
Line 112: Line 118:
  Reload = function() sillyjumper.LoadBehaviorFiles() end,   Reload = function() sillyjumper.LoadBehaviorFiles() end,
  -- if set, it will be treated as a private addon, loadable from the addon store  -- if set, it will be treated as a private addon, loadable from the addon store
- private = true,+ private = false,
   
  }  }
Line 201: Line 207:
  Reload = function() sillyjumper.LoadBehaviorFiles() end,   Reload = function() sillyjumper.LoadBehaviorFiles() end,
  -- if set, it will be treated as a private addon, loadable from the addon store  -- if set, it will be treated as a private addon, loadable from the addon store
- private = true,+ private = false,
                    
                         -- (optional) Callback function, is called by the BTree Framework when the BTree is started. Allows us to supply a custom "context" table to the BTree:                         -- (optional) Callback function, is called by the BTree Framework when the BTree is started. Allows us to supply a custom "context" table to the BTree:
Line 256: Line 262:
  Reload = function() sillyjumper.LoadBehaviorFiles() end,   Reload = function() sillyjumper.LoadBehaviorFiles() end,
  -- if set, it will be treated as a private addon, loadable from the addon store  -- if set, it will be treated as a private addon, loadable from the addon store
- private = true,+ private = false,
  -- (optional) Callback function, is called by the BTree Framework when the BTree is started. Allows us to supply a custom "context" table to the BTree:  -- (optional) Callback function, is called by the BTree Framework when the BTree is started. Allows us to supply a custom "context" table to the BTree:
  LoadContext = function() return sillyjumper.GetContext() end,  LoadContext = function() return sillyjumper.GetContext() end,
Line 324: Line 330:
   
  -- if set, it will be treated as a private addon, loadable from the addon store  -- if set, it will be treated as a private addon, loadable from the addon store
- private = true,+ private = false,
   
  -- if set, the btree will not appear in the botmode dropdown  -- if set, the btree will not appear in the botmode dropdown
Line 359: Line 365:
 BehaviorManager:Start() BehaviorManager:Start()
 BehaviorManager:Stop() BehaviorManager:Stop()
-BehaviorManager:GetTicksThreshold()+BehaviorManager:GetTicksThreshold()  -- How often (in ms) the BTree is being called. 
 +BehaviorManager:SetTicksThreshold(milliseconds)
 BehaviorManager:GetLastTick() BehaviorManager:GetLastTick()
 BehaviorManager:SetLastTick(ticks) BehaviorManager:SetLastTick(ticks)
Line 367: Line 374:
 BehaviorManager:Paused(p) BehaviorManager:Paused(p)
 BehaviorManager:CurrentBTreeName() BehaviorManager:CurrentBTreeName()
 +BehaviorManager:SetBtreeFile(botmode_name)
 </code> </code>
behaviortree.txt · Last modified: 2022/07/18 09:27 by fxfire