Update and improve class documentation

This commit is contained in:
Serhii Snitsaruk 2023-04-10 16:57:36 +02:00
parent 348aa4f750
commit 9344bce9b1
74 changed files with 313 additions and 450 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBAabb" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBAabb" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
AABB-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="AABB( 0, 0, 0, 0, 0, 0 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="AABB(0, 0, 0, 0, 0, 0)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBArray" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBArray" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Array-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="[ ]" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="[]" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBBasis" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBBasis" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Basis-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBBool" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBBool" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Bool-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="false" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBByteArray" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBByteArray" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
ByteArray-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PoolByteArray( )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedByteArray()" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBColor" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBColor" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Color-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Color( 0, 0, 0, 1 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Color(0, 0, 0, 1)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBColorArray" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBColorArray" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
ColorArray-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,8 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedColorArray()" />
</members>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBDictionary" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBDictionary" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Dictionary-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="{}" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBFloat" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBFloat" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Float-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="0.0" />
</members>
<constants>
</constants>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBFloatArray" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedFloat64Array()" />
</members>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBInt" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBInt" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Integer-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="0" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBIntArray" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBIntArray" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
IntArray-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PoolIntArray( )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedInt64Array()" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBNode" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBNode" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Node-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="NodePath(&quot;&quot;)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBParam" inherits="Resource" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBParam" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A base class for typed parameters to be used with BT tasks.
</brief_description>
@ -19,16 +19,16 @@
</method>
<method name="get_value">
<return type="Variant" />
<argument index="0" name="p_agent" type="Object" />
<argument index="1" name="p_blackboard" type="Blackboard" />
<argument index="2" name="p_default" type="Variant" default="null" />
<param index="0" name="p_agent" type="Object" />
<param index="1" name="p_blackboard" type="Blackboard" />
<param index="2" name="p_default" type="Variant" default="null" />
<description>
Returns value of the parameter.
</description>
</method>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" default="PoolColorArray( )">
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" default="0">
A value that is saved with BBParam resource. The type of value is defined by [method get_type]. Provides the parameter's value, if [member value_source] is [constant SAVED_VALUE].
</member>
<member name="value_source" type="int" setter="set_value_source" getter="get_value_source" enum="BBParam.ValueSource" default="0">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBPlane" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBPlane" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Plane-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Plane( 0, 0, 0, 0 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Plane(0, 0, 0, 0)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBQuat" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Quat-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Quat( 0, 0, 0, 1 )" />
</members>
<constants>
</constants>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBQuaternion" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Quaternion(0, 0, 0, 1)" />
</members>
</class>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBRealArray" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
RealArray-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PoolRealArray( )" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBRect2" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBRect2" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Rect2-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Rect2( 0, 0, 0, 0 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Rect2(0, 0, 0, 0)" />
</members>
<constants>
</constants>
</class>

12
doc_classes/BBRect2i.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBRect2i" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Rect2i(0, 0, 0, 0)" />
</members>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBString" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBString" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
String-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="&quot;&quot;" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBStringArray" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBStringArray" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
StringArray-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PoolStringArray( )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedStringArray()" />
</members>
<constants>
</constants>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBStringName" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="&amp;&quot;&quot;" />
</members>
</class>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBTransform" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Transform-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBTransform2D" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBTransform2D" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Transform2D-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Transform2D( 1, 0, 0, 1, 0, 0 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Transform2D(1, 0, 0, 1, 0, 0)" />
</members>
<constants>
</constants>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBTransform3D" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
</members>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVariant" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBVariant" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Variant-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,13 +7,9 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="null" />
<member name="type" type="int" setter="set_type" getter="get_type" enum="Variant.Type" default="0">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector2" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBVector2" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Vector2-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector2( 0, 0 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector2(0, 0)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector2Array" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBVector2Array" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Vector2Array-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PoolVector2Array( )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedVector2Array()" />
</members>
<constants>
</constants>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector2i" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector2i(0, 0)" />
</members>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector3" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBVector3" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Vector3-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector3( 0, 0, 0 )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector3(0, 0, 0)" />
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector3Array" inherits="BBParam" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BBVector3Array" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Vector3Array-type parameter to be used with BT tasks. See [BBParam].
</brief_description>
@ -7,11 +7,7 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PoolVector3Array( )" />
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="PackedVector3Array()" />
</members>
<constants>
</constants>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector3i" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector3i(0, 0, 0)" />
</members>
</class>

12
doc_classes/BBVector4.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector4" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector4(0, 0, 0, 0)" />
</members>
</class>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BBVector4i" inherits="BBParam" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="saved_value" type="Variant" setter="set_saved_value" getter="get_saved_value" overrides="BBParam" default="Vector4i(0, 0, 0, 0)" />
</members>
</class>

View File

@ -1,16 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTAction" inherits="BTTask" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTAction" inherits="BTTask" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Base class for BT actions.
</brief_description>
<description>
Base class for all behavior tree actions. Extend [code]BTAction[/code] to create your own actions.
An action performs a task in one or multiple ticks. Actions return [code]RUNNING[/code] status, when it takes more than one tick to perform a task. When a task is finished an action returns [code]SUCCESS[/code] or [code]FAILURE[/code]. Actions cannot have child tasks.
Represents a specific action or behavior in a [BehaviorTree] that the agent should perform. It is the lowest level of the [BehaviorTree] hierarchy and is responsible for carrying out the actual work required to achieve a goal. Actions cannot have child tasks.
Actions performs a task in one or multiple ticks. Actions return [code]RUNNING[/code] status, when it takes more than one tick to perform a task. When a task is finished an action returns [code]SUCCESS[/code] or [code]FAILURE[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTAlwaysFail" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTAlwaysFail" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that turns SUCCESS into FAILURE.
</brief_description>
@ -7,8 +7,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTAlwaysSucceed" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTAlwaysSucceed" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that turns FAILURE into SUCCESS.
</brief_description>
@ -7,8 +7,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,16 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTComposite" inherits="BTTask" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTComposite" inherits="BTTask" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Base class for BT composite tasks.
</brief_description>
<description>
Base class for all behavior tree composite tasks. Extend [code]BTComposite[/code] to create your own.
Composite tasks can have one or more child tasks. A composite task will execute its child tasks in a certain order. Depending on the status returned by a child task, execution either continues to the next task in order or stops and a status is returned to the parent task.
Composite is a control task in a [BehaviorTree] that contains one or more child tasks. It defines the structure and flow of the [BehaviorTree] by specifying how child tasks are executed. It can be used to group related tasks into a single unit, making it easier to manage and maintain the [BehaviorTree]. Examples of [BehaviorTree] composites include [BTSelector], [BTSequence], and [BTParallel].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,16 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTCondition" inherits="BTTask" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTCondition" inherits="BTTask" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Base class for BT conditions.
</brief_description>
<description>
Base class for all behavior tree conditions. Extend [code]BTCondition[/code] to create your own conditions.
Conditions don't take multiple ticks to finish and return [constant BTTask.SUCCESS] or [constant BTTask.FAILURE] immeditely.
Base class for all [BehaviorTree] conditions. Extend [code]BTCondition[/code] to create your own conditions.
Condition is a task in a [BehaviorTree] that checks for a specific condition before executing subsequent tasks and often used inside composite tasks to control the execution flow. It is used to verify the state of the environment, check for the presence of an enemy, or evaluate the health status of the agent. The use of [BehaviorTree] condition tasks can improve the efficiency of the system and avoid unnecessary actions. However, it may not be suitable for complex decision-making processes, and too many condition tasks can make the [BehaviorTree] difficult to read.
Conditions usually don't take multiple ticks to finish and return [constant BTTask.SUCCESS] or [constant BTTask.FAILURE] immeditely.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTConsolePrint" inherits="BTAction" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTConsolePrint" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT action task that prints text to console.
</brief_description>
@ -8,16 +8,11 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="format_var_args" type="PoolStringArray" setter="set_format_var_args" getter="get_format_var_args" default="PoolStringArray( )">
An array with blackboard variables, values of which will serve as format arguments.
<member name="bb_format_parameters" type="PackedStringArray" setter="set_bb_format_parameters" getter="get_bb_format_parameters" default="PackedStringArray()">
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
Text to print. Can contain multiple placeholders to be replaced with format arguments. Same as GDScript's % operator, placeholders start with '%' followed by a format specifier. For example: %s - string, %d - integer, %f - real.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTCooldown" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTCooldown" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that executes child only if [member cooldown] time passed since previous execution.
</brief_description>
@ -11,8 +11,6 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="cooldown_state_var" type="String" setter="set_cooldown_state_var" getter="get_cooldown_state_var" default="&quot;&quot;">
Boolean variable to save cooldown state in the [Blackboard]. If empty, the variable will be automatically created and assigned.
@ -32,6 +30,4 @@
Trigger cooldown, if the child returns [code]FAILURE[/code].
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,16 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTDecorator" inherits="BTTask" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTDecorator" inherits="BTTask" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Base class for BT decorators.
</brief_description>
<description>
Base class for all behavior tree decorators. Extend [code]BTDecorator[/code] to create your own decorators.
Decorator alters the behavior of its child task in some way. Decorators can only have one child.
Decorator is a task in a [BehaviorTree] that alters the behavior of its child task. Can only have a single child.
It can be used to add conditions, limits, or other constraints to the execution of a task. Examples of [BehaviorTree] decorators include [BTInvert], [BTRepeat], and [BTCooldown]. The use of [BehaviorTree] decorators can help to simplify the design and implementation of complex behaviors by adding additional logic to existing tasks.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTDelay" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTDelay" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that delays execution of its child.
</brief_description>
@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="seconds" type="float" setter="set_seconds" getter="get_seconds" default="1.0">
Delay duration in seconds.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTDynamicSelector" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTDynamicSelector" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks from the beginning each tick until first [code]SUCCESS[/code].
</brief_description>
@ -11,8 +11,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTDynamicSequence" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTDynamicSequence" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks from the beginning each tick for as long as they return [code]SUCCESS[/code].
</brief_description>
@ -11,8 +11,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTFail" inherits="BTAction" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTFail" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT action that returns FAILURE.
</brief_description>
@ -7,8 +7,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTForEach" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTForEach" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that executes child for each element of an [Array].
</brief_description>
@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="array_var" type="String" setter="set_array_var" getter="get_array_var" default="&quot;&quot;">
An [Array] stored in the [Blackboard] to iterate over.
@ -18,6 +16,4 @@
[Blackboard] variable to store an element of array, referenced by [member array_var].
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTInvert" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTInvert" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that inverts FAILURE to SUCCESS and SUCCESS to FAILURE.
</brief_description>
@ -7,8 +7,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTNewScope" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTNewScope" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that creates a new [Blackboard] scope.
</brief_description>
@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="_blackboard_data" type="Dictionary" setter="_set_blackboard_data" getter="_get_blackboard_data" default="{}">
Data that is used to populate a new scope of the [Blackboard].
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTParallel" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTParallel" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks simultaneously.
</brief_description>
@ -12,8 +12,6 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="num_failures_required" type="int" setter="set_num_failures_required" getter="get_num_failures_required" default="1">
</member>
@ -22,6 +20,4 @@
<member name="repeat" type="bool" setter="set_repeat" getter="get_repeat" default="false">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTPlayer" inherits="Node" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTPlayer" inherits="Node" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Player of [BehaviorTree] resources.
</brief_description>
@ -9,6 +9,12 @@
<tutorials>
</tutorials>
<methods>
<method name="get_last_status" qualifiers="const">
<return type="int" />
<description>
Returns last execution status. See [enum BTTask.TaskStatus].
</description>
</method>
<method name="restart">
<return type="void" />
<description>
@ -17,26 +23,23 @@
</method>
<method name="set_blackboard">
<return type="void" />
<argument index="0" name="p_blackboard" type="Blackboard" />
<param index="0" name="p_blackboard" type="Blackboard" />
<description>
Assign a [Blackboard] instance.
</description>
</method>
<method name="update">
<return type="void" />
<argument index="0" name="p_delta" type="float" />
<param index="0" name="p_delta" type="float" />
<description>
Updates the tree by executing the root task. Call this method when [member update_mode] is set to [constant MANUAL]. When [member update_mode] is not set to [constant MANUAL], the tree is updated automatically. See [enum UpdateMode].
</description>
</method>
</methods>
<members>
<member name="active" type="bool" setter="set_active" getter="get_active" default="false">
<member name="active" type="bool" setter="set_active" getter="get_active" default="true">
If [code]true[/code], tree is active and will be processed.
</member>
<member name="auto_restart" type="bool" setter="set_auto_restart" getter="get_auto_restart" default="false">
If [code]true[/code] player will restart when it finishes executing the tree and receives a [code]SUCCESS[/code] or [code]FAILURE[/code].
</member>
<member name="behavior_tree" type="BehaviorTree" setter="set_behavior_tree" getter="get_behavior_tree">
[BehaviorTree] resource to instantiate and process at run time.
</member>
@ -46,13 +49,13 @@
<member name="prefetch_nodepath_vars" type="bool" setter="set_prefetch_nodepath_vars" getter="get_prefetch_nodepath_vars" default="true">
If [code]true[/code], any NodePath variables in the [Blackboard] are replaced with references during tree instantiation. References are retrieved by calling [method Node.get_node] of BTPlayer.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="BTPlayer.UpdateMode" default="0">
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="BTPlayer.UpdateMode" default="1">
Defines when BehaviorTree is executed. See [enum UpdateMode].
</member>
</members>
<signals>
<signal name="behavior_tree_finished">
<argument index="0" name="p_status" type="int" />
<param index="0" name="p_status" type="int" />
<description>
Notifies when behavior tree finishes executing and returns [code]SUCCESS[/code] or [code]FAILURE[/code].
Argument [code]p_status[/code] holds the status returned by the behavior tree.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTProbability" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTProbability" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that executes child with probability.
</brief_description>
@ -8,12 +8,8 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="run_chance" type="float" setter="set_run_chance" getter="get_run_chance" default="0.5">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRandomSelector" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRandomSelector" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks in random order until first [code]SUCCESS[/code].
</brief_description>
@ -11,8 +11,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRandomSequence" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRandomSequence" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks in random order for as long as they return [code]SUCCESS[/code].
</brief_description>
@ -11,8 +11,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRandomWait" inherits="BTAction" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRandomWait" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT action that waits for a randomized duration to pass and returns [code]SUCCESS[/code].
</brief_description>
<description>
BT action that waits for a randomized duration to pass and returns [code]SUCCESS[/code]. The minimum wait time is defined by [code]duration_min_max.x[/code], and the maximum is defined by [code]duration_min_max.y[/code].
BT action that waits for a randomized duration to pass and returns [code]SUCCESS[/code]. Actual duration is randomized. The minimum wait time is defined by [code]min_duration[/code], and the maximum is defined by [code]max_duration[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="duration_min_max" type="Vector2" setter="set_duration_min_max" getter="get_duration_min_max" default="Vector2( 1, 2 )">
<member name="max_duration" type="float" setter="set_max_duration" getter="get_max_duration" default="2.0">
Maximum duration to wait.
</member>
<member name="min_duration" type="float" setter="set_min_duration" getter="get_min_duration" default="1.0">
Minimum duration to wait.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRepeat" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRepeat" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that repeats its child specified number of [member times].
</brief_description>
@ -11,8 +11,6 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="abort_on_failure" type="bool" setter="set_abort_on_failure" getter="get_abort_on_failure" default="false">
If [code]false[/code], [code]FAILURE[/code] status returned by the child is also considered a successfully finished execution.
@ -21,6 +19,4 @@
A number of times to repeat an execution of the child task.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRepeatUntilFailure" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRepeatUntilFailure" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that repeats child until [code]FAILURE[/code].
</brief_description>
@ -10,8 +10,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRepeatUntilSuccess" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRepeatUntilSuccess" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that repeats child until [code]SUCCESS[/code].
</brief_description>
@ -10,8 +10,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRunLimit" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTRunLimit" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that allows child's execution a limited number of times.
</brief_description>
@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="run_limit" type="int" setter="set_run_limit" getter="get_run_limit" default="1">
A limit on number of times the child is allowed to be executed.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTSelector" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTSelector" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks in turn until first [code]SUCCESS[/code].
</brief_description>
@ -11,8 +11,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTSequence" inherits="BTComposite" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTSequence" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes tasks in turn for as long as they return [code]SUCCESS[/code].
</brief_description>
@ -11,8 +11,4 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,17 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTState" inherits="LimboState" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTState" inherits="LimboState" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A state node for [LimboHSM] that hosts a [BehaviorTree].
</brief_description>
<description>
This state node instantiates an instance of [BehaviorTree] and dispatches events, when the tree returns [code]SUCCESS[/code] or [code]FAILURE[/code].
When the tree returns [code]SUCCESS[/code], this state dispatches [member success_event].
When the tree returns [code]FAILURE[/code], this state dispatches [member failure_event].
This state node instantiates and executes a [BehaviorTree] resource. Dispatches state machine event, when the task tree returns [code]SUCCESS[/code] or [code]FAILURE[/code]. Event names can be specified by [member success_event] and [member failure_event].
For more information about state machine events see [method LimboState.dispatch].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="behavior_tree" type="BehaviorTree" setter="set_behavior_tree" getter="get_behavior_tree">
A [BehaviorTree] resource that contains state behavior.
@ -23,6 +20,4 @@
HSM event that will be dispatched when the behavior tree returns [code]SUCCESS[/code].
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTSubtree" inherits="BTNewScope" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTSubtree" inherits="BTNewScope" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that instantiates a subtree.
</brief_description>
@ -9,14 +9,9 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="_blackboard_data" type="Dictionary" setter="_set_blackboard_data" getter="_get_blackboard_data" overrides="BTNewScope" default="{}" />
<member name="subtree" type="BehaviorTree" setter="set_subtree" getter="get_subtree">
A [BehaviorTree] resource that will be instantiated as a subtree.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTTask" inherits="Resource" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTTask" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Base class for BT tasks.
Base class for [BehaviorTree] tasks.
</brief_description>
<description>
Base class for all behavior tree tasks. Tasks are arranged in a tree-like structure called behavior tree (BT).
Base class for all [BehaviorTree] tasks. A task is a building block in a [BehaviorTree] that represents a specific behavior or control flow. It is the basic unit of the Behavior Tree (BT) and is used to create complex behaviors by combining and nesting tasks in a hierarchy.
Tasks perform work and return their status with [method _tick]. See [enum TaskStatus].
There are several types of tasks: actions, conditions, decorators, and composites. Each type of task has its own corresponding subclass: [BTAction], [BTCondition], [BTDecorator], [BTComposite].
[b]Note:[/b] Do not inherint [BTTask] directly for your own tasks, instead inherit one of the subtypes above.
A Task can be an action, a condition, a composite, or a decorator. Each type of task has its own corresponding subclass: [BTAction], [BTCondition], [BTDecorator], [BTComposite].
[b]Note:[/b] Do not extend [code]BTTask[/code] directly for your own tasks, instead extend one of the subtypes above.
</description>
<tutorials>
</tutorials>
@ -25,13 +25,13 @@
Called when task is "exited", i.e. after [method _tick] returns [constant SUCCESS] or [constant FAILURE] status.
</description>
</method>
<method name="_generate_name" qualifiers="virtual">
<method name="_generate_name" qualifiers="virtual const">
<return type="String" />
<description>
When [member custom_name] is empty, the string returned by this method is used to display the task by the editor. See [method get_task_name].
</description>
</method>
<method name="_get_configuration_warning" qualifiers="virtual">
<method name="_get_configuration_warning" qualifiers="virtual const">
<return type="String" />
<description>
The string returned by this method is displayed as a warning in the BT editor if the script that overrides it is a [code]tool[/code] script.
@ -45,7 +45,7 @@
</method>
<method name="_tick" qualifiers="virtual">
<return type="int" />
<argument index="0" name="p_delta" type="float" />
<param index="0" name="p_delta" type="float" />
<description>
Called when task is "ticked", i.e. executed by [BTPlayer] or [BTState] during update.
Returns [member TaskStatus].
@ -54,15 +54,15 @@
</method>
<method name="add_child">
<return type="void" />
<argument index="0" name="p_child" type="BTTask" />
<param index="0" name="p_child" type="BTTask" />
<description>
Adds a child task. The [code]p_child[/code] is placed at the end of the children list.
</description>
</method>
<method name="add_child_at_index">
<return type="void" />
<argument index="0" name="p_child" type="BTTask" />
<argument index="1" name="p_idx" type="int" />
<param index="0" name="p_child" type="BTTask" />
<param index="1" name="p_idx" type="int" />
<description>
Adds a child task. The [code]p_child[/code] is placed at [code]p_idx[/code] position in the children list.
</description>
@ -75,14 +75,14 @@
</method>
<method name="execute">
<return type="int" />
<argument index="0" name="p_delta" type="float" />
<param index="0" name="p_delta" type="float" />
<description>
Performs task's execution. During execution [method _enter] is called first, unless current task [member status] is [code]RUNNING[/code]. [method _tick] is called next to perform task's main function. If [constant SUCCESS] or [constant FAILURE] status is returned by [method _tick], [method _exit] will be called next.
</description>
</method>
<method name="get_child" qualifiers="const">
<return type="BTTask" />
<argument index="0" name="p_idx" type="int" />
<param index="0" name="p_idx" type="int" />
<description>
Returns a child task by its index.
</description>
@ -95,11 +95,17 @@
</method>
<method name="get_child_index" qualifiers="const">
<return type="int" />
<argument index="0" name="p_child" type="BTTask" />
<param index="0" name="p_child" type="BTTask" />
<description>
Returns the child task's index. If [code]p_child[/code] is not a child of the task, [code]-1[/code] is returned instead.
</description>
</method>
<method name="get_parent" qualifiers="const">
<return type="BTTask" />
<description>
Returns task's parent.
</description>
</method>
<method name="get_root" qualifiers="const">
<return type="BTTask" />
<description>
@ -115,15 +121,15 @@
</method>
<method name="has_child" qualifiers="const">
<return type="bool" />
<argument index="0" name="p_child" type="BTTask" />
<param index="0" name="p_child" type="BTTask" />
<description>
Returns [code]true[/code] if [code]p_child[/code] is a child of this task.
</description>
</method>
<method name="initialize">
<return type="void" />
<argument index="0" name="p_agent" type="Object" />
<argument index="1" name="p_blackboard" type="Blackboard" />
<param index="0" name="p_agent" type="Node" />
<param index="1" name="p_blackboard" type="Blackboard" />
<description>
Initilizes the task. Assigns [member agent] and [member blackboard], and calls [method _setup] for the task and its children.
The method is called recursively for each child task.
@ -131,7 +137,7 @@
</method>
<method name="is_descendant_of" qualifiers="const">
<return type="bool" />
<argument index="0" name="p_task" type="BTTask" />
<param index="0" name="p_task" type="BTTask" />
<description>
Returns [code]true[/code] if this task is descendant of [code]p_task[/code]. I.e. this task must be a child of [code]p_task[/code] or one of its children or grandchildren.
</description>
@ -151,29 +157,29 @@
</method>
<method name="print_tree" qualifiers="const">
<return type="void" />
<argument index="0" name="p_initial_tabs" type="int" default="0" />
<param index="0" name="p_initial_tabs" type="int" default="0" />
<description>
Prints the subtree that starts with this task to console.
</description>
</method>
<method name="remove_child">
<return type="void" />
<argument index="0" name="p_child" type="BTTask" />
<param index="0" name="p_child" type="BTTask" />
<description>
Removes [code]p_child[/code] task from children.
</description>
</method>
<method name="remove_child_at_index">
<return type="void" />
<argument index="0" name="p_idx" type="int" />
<param index="0" name="p_idx" type="int" />
<description>
Removes a child task by index.
</description>
</method>
</methods>
<members>
<member name="agent" type="Object" setter="set_agent" getter="get_agent">
The agent is a contextual object for the task's behavior tree instance. Usually, the agent is an owner of the node with the behavior tree instance.
<member name="agent" type="Node" setter="set_agent" getter="get_agent">
The agent is a contextual object for the task's behavior tree instance. Usually, agent is the owner of a node with the [BehaviorTree] resource.
</member>
<member name="blackboard" type="Blackboard" setter="" getter="get_blackboard">
Provides access to the blackboard for this task and behavior tree. Blackboard is used to share data among tasks of the associated behavior tree.
@ -182,9 +188,6 @@
<member name="custom_name" type="String" setter="set_custom_name" getter="get_custom_name" default="&quot;&quot;">
User provided name for the task. If not empty, [code]custom_name[/code] is used by the editor to display the task. See [method get_task_name].
</member>
<member name="parent" type="BTTask" setter="" getter="get_parent">
The task's parent.
</member>
<member name="status" type="int" setter="" getter="get_status">
Last execution [enum TaskStatus] returned by [method _tick].
</member>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTTimeLimit" inherits="BTDecorator" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTTimeLimit" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that allots a limited time for child's execution.
</brief_description>
@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="time_limit" type="float" setter="set_time_limit" getter="get_time_limit" default="5.0">
Time allotted for a child task's execution.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTWait" inherits="BTAction" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTWait" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT action that waits for a [member duration] to pass and returns [code]SUCCESS[/code].
</brief_description>
@ -7,12 +7,8 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="duration" type="float" setter="set_duration" getter="get_duration" default="1.0">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTWaitTicks" inherits="BTAction" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BTWaitTicks" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT action that waits for a number of ticks to pass and returns SUCCESS.
</brief_description>
@ -7,12 +7,8 @@
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="num_ticks" type="int" setter="set_num_ticks" getter="get_num_ticks" default="1">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BehaviorTree" inherits="Resource" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="BehaviorTree" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Contains behavior tree data.
Contains Behavior Tree data.
</brief_description>
<description>
[BehaviorTree] is a hierarchical structure used to model and control the behavior of agents in a game. It is composed of tasks that represent specific actions or decision-making rules. The [BehaviorTree] is executed from the root task down to the leaf tasks, which represent the actual actions or behaviors that the agent should perform.
See also [BTTask] class.
</description>
<tutorials>
</tutorials>
@ -14,29 +16,31 @@
Makes a copy of behavior tree.
</description>
</method>
<method name="init">
<return type="void" />
<method name="get_root_task" qualifiers="const">
<return type="BTTask" />
<description>
Initializes a loaded behavior tree, making sure tasks are properly linked.
Returns root task of the [BehaviorTree] resource.
</description>
</method>
<method name="instance" qualifiers="const">
<method name="instantiate" qualifiers="const">
<return type="BTTask" />
<argument index="0" name="p_agent" type="Object" />
<argument index="1" name="p_blackboard" type="Blackboard" />
<param index="0" name="p_agent" type="Node" />
<param index="1" name="p_blackboard" type="Blackboard" />
<description>
Instantiates behavior tree and returns the root [BTTask].
</description>
</method>
<method name="set_root_task">
<return type="void" />
<param index="0" name="p_value" type="BTTask" />
<description>
Assign new root task to [BehaviorTree] resource.
</description>
</method>
</methods>
<members>
<member name="description" type="String" setter="set_description" getter="get_description" default="&quot;&quot;">
User-provided description of BehaviorTree.
</member>
<member name="root_task" type="BTTask" setter="set_root_task" getter="get_root_task">
Stores root task.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Blackboard" inherits="Reference" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="Blackboard" inherits="RefCounted" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A key/value store to hold data shared by BT tasks.
</brief_description>
@ -11,6 +11,13 @@
<tutorials>
</tutorials>
<methods>
<method name="erase_var">
<return type="void" />
<param index="0" name="p_key" type="Variant" />
<description>
Removes variable by name.
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="Dictionary" />
<description>
@ -25,49 +32,53 @@
</method>
<method name="get_var" qualifiers="const">
<return type="Variant" />
<argument index="0" name="p_key" type="Variant" />
<argument index="1" name="p_default" type="Variant" default="null" />
<param index="0" name="p_key" type="Variant" />
<param index="1" name="p_default" type="Variant" default="null" />
<description>
Returns variable value.
</description>
</method>
<method name="has_var" qualifiers="const">
<return type="bool" />
<argument index="0" name="p_key" type="Variant" />
<param index="0" name="p_key" type="Variant" />
<description>
Returns [code]true[/code] if Blackboard contains [code]p_key[/code] variable. Parent scope included.
</description>
</method>
<method name="prefetch_nodepath_vars">
<return type="void" />
<argument index="0" name="p_node" type="Node" />
<param index="0" name="p_node" type="Node" />
<description>
Replaces NodePath variables in the [Blackboard] with references that are retrieved by calling [method Node.get_node] on a [code]p_node[/code] argument.
</description>
</method>
<method name="set_data">
<return type="void" />
<argument index="0" name="p_data" type="Dictionary" />
<param index="0" name="p_data" type="Dictionary" />
<description>
Overrides Blackboard data, discarding anything that was stored at this scope. Use with caution.
</description>
</method>
<method name="set_parent_scope">
<return type="void" />
<argument index="0" name="p_blackboard" type="Blackboard" />
<param index="0" name="p_blackboard" type="Blackboard" />
<description>
Sets the parent scope. If a value is not found in the Blackboard's active scope, the parent scope Blackboard will be asked to retrieve it.
</description>
</method>
<method name="set_var">
<return type="void" />
<argument index="0" name="p_key" type="Variant" />
<argument index="1" name="p_value" type="Variant" />
<param index="0" name="p_key" type="Variant" />
<param index="1" name="p_value" type="Variant" />
<description>
Sets value of blackboard variable.
</description>
</method>
<method name="top" qualifiers="const">
<return type="Blackboard" />
<description>
Returns topmost [Blackboard] in the scope chain.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LimboHSM" inherits="LimboState" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="LimboHSM" inherits="LimboState" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Event-based Hierarchical State Machine (HSM).
</brief_description>
@ -12,9 +12,9 @@
<methods>
<method name="add_transition">
<return type="void" />
<argument index="0" name="p_from_state" type="Node" />
<argument index="1" name="p_to_state" type="Node" />
<argument index="2" name="p_event" type="String" />
<param index="0" name="p_from_state" type="Node" />
<param index="1" name="p_to_state" type="Node" />
<param index="2" name="p_event" type="String" />
<description>
Adds a transition from one state to another when [code]p_event[/code] is dispatched.
</description>
@ -33,22 +33,22 @@
</method>
<method name="initialize">
<return type="void" />
<argument index="0" name="p_agent" type="Object" />
<argument index="1" name="p_parent_scope" type="Blackboard" default="null" />
<param index="0" name="p_agent" type="Node" />
<param index="1" name="p_parent_scope" type="Blackboard" default="null" />
<description>
Initializes state and calls [code]_setup[/code] for itself and every substate.
</description>
</method>
<method name="set_active">
<return type="void" />
<argument index="0" name="p_active" type="bool" />
<param index="0" name="p_active" type="bool" />
<description>
If [code]true[/code], changes state to [member initial_state] and enables state processing depending on [member update_mode].
</description>
</method>
<method name="update">
<return type="void" />
<argument index="0" name="p_delta" type="float" />
<param index="0" name="p_delta" type="float" />
<description>
Calls [member LimboState._update] on itself and on the active substate. Call propagates down to the leaf state.
It is called automatically, if [member update_mode] is not set to [constant MANUAL].
@ -62,13 +62,13 @@
<member name="initial_state" type="LimboState" setter="set_initial_state" getter="get_initial_state">
A state that becomes active when state machine is activated by [method set_active] method.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="LimboHSM.UpdateMode" default="0">
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="LimboHSM.UpdateMode" default="1">
Determines when state machine is updated. See [enum UpdateMode].
</member>
</members>
<signals>
<signal name="state_changed">
<argument index="0" name="p_state" type="LimboState" />
<param index="0" name="p_state" type="LimboState" />
<description>
Emitted when state is changed.
</description>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LimboState" inherits="Node" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="LimboState" inherits="Node" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A State node for Hierarchical State Machine (HSM).
</brief_description>
@ -28,56 +28,53 @@
</method>
<method name="_update" qualifiers="virtual">
<return type="void" />
<argument index="0" name="p_delta" type="float" />
<param index="0" name="p_delta" type="float" />
<description>
Called during update.
</description>
</method>
<method name="add_event_handler">
<return type="void" />
<argument index="0" name="p_event" type="String" />
<argument index="1" name="p_method" type="String" />
<param index="0" name="p_event" type="String" />
<param index="1" name="p_handler" type="Callable" />
<description>
Register [code]p_method[/code] that will be called when [code]p_event[/code] happens. Method must belong to the state.
</description>
</method>
<method name="call_on_enter">
<return type="LimboState" />
<argument index="0" name="p_object" type="Object" />
<argument index="1" name="p_method" type="String" />
<param index="0" name="p_callable" type="Callable" />
<description>
A chained method that connects [signal entered] signal to a [code]p_method[/code] on a [p_object].
</description>
</method>
<method name="call_on_exit">
<return type="LimboState" />
<argument index="0" name="p_object" type="Object" />
<argument index="1" name="p_method" type="String" />
<param index="0" name="p_callable" type="Callable" />
<description>
A chained method that connects [signal exited] signal to a [code]p_method[/code] on a [p_object].
</description>
</method>
<method name="call_on_update">
<return type="LimboState" />
<argument index="0" name="p_object" type="Object" />
<argument index="1" name="p_method" type="String" />
<param index="0" name="p_callable" type="Callable" />
<description>
A chained method that connects [signal updated] signal to a [code]p_method[/code] on a [p_object].
</description>
</method>
<method name="clear_guard_func">
<method name="clear_guard">
<return type="void" />
<description>
Removes the guard function that was set by [method set_guard_func].
Removes state's guard function that was set by [method set_guard].
</description>
</method>
<method name="dispatch">
<return type="bool" />
<argument index="0" name="p_event" type="String" />
<argument index="1" name="p_cargo" type="Variant" default="null" />
<param index="0" name="p_event" type="String" />
<param index="1" name="p_cargo" type="Variant" default="null" />
<description>
Dispatches recursively a state machine event named [code]p_event[/code] with an optional argument [code]p_cargo[/code]. Returns [code]true[/code] if event was consumed.
Events propagate from the leaf state to the root. Propagation stops as soon as some state consumes the event.
Events propagate from the leaf state to the root. Propagation stops as soon as some state consumes the event. States will consume event if they have a transition associated with it, or an event handler. See also [method add_event_handler].
</description>
</method>
<method name="get_root" qualifiers="const">
@ -94,18 +91,16 @@
</method>
<method name="named">
<return type="LimboState" />
<argument index="0" name="p_name" type="String" />
<param index="0" name="p_name" type="String" />
<description>
A chained method that sets the name of this state.
</description>
</method>
<method name="set_guard_func">
<method name="set_guard">
<return type="void" />
<argument index="0" name="p_object" type="Object" />
<argument index="1" name="p_func" type="String" />
<argument index="2" name="p_binds" type="Array" default="[ ]" />
<param index="0" name="p_guard_callable" type="Callable" />
<description>
Sets the guard function. It is a function that will be called each time a transition to this state should happen. If that function returns [code]false[/code], that transition will not be allowed.
Sets the guard function. It is a function that will be called each time a transition to this state should happen. If that function returns [code]false[/code], the transition will not be allowed.
</description>
</method>
</methods>
@ -113,7 +108,7 @@
<member name="EVENT_FINISHED" type="String" setter="" getter="event_finished">
A commonly used event that signifies that the state has finished work.
</member>
<member name="agent" type="Object" setter="set_agent" getter="get_agent">
<member name="agent" type="Node" setter="set_agent" getter="get_agent">
An agent that is associated with the state. Assinged by initialization.
</member>
<member name="blackboard" type="Blackboard" setter="" getter="get_blackboard">
@ -137,12 +132,10 @@
</description>
</signal>
<signal name="updated">
<argument index="0" name="p_delta" type="float" />
<param index="0" name="p_delta" type="float" />
<description>
Emitted when the state is updated.
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LimboUtility" inherits="Object" version="3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="LimboUtility" inherits="Object" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Helper functions for LimboAI.
</brief_description>
@ -10,19 +10,17 @@
<methods>
<method name="decorate_var" qualifiers="const">
<return type="String" />
<argument index="0" name="p_variable" type="String" />
<param index="0" name="p_variable" type="String" />
<description>
Returns a string with a [Blackboard] variable name ready to be displayed or printed to console.
</description>
</method>
<method name="get_status_name" qualifiers="const">
<return type="String" />
<argument index="0" name="p_status" type="int" />
<param index="0" name="p_status" type="int" />
<description>
Returns name of a [BTTask] status code.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1020,6 +1020,8 @@ void LimboAIEditor::apply_changes() {
}
Ref<Texture> LimboAIEditor::get_task_icon(String p_script_path_or_class) {
ERR_FAIL_COND_V_MSG(p_script_path_or_class.is_empty(), Variant(), "BTTask: script path or class cannot be empty.");
String base_type = p_script_path_or_class;
if (p_script_path_or_class.begins_with("res:")) {
Ref<Script> script = ResourceLoader::load(p_script_path_or_class, "Script");