diff --git a/doc/source/.readthedocs.yaml b/doc/source/.readthedocs.yaml new file mode 100644 index 0000000..61585fa --- /dev/null +++ b/doc/source/.readthedocs.yaml @@ -0,0 +1,35 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/src/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt \ No newline at end of file diff --git a/doc/source/Makefile b/doc/source/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/doc/source/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/source/classes/class_bbaabb.rst b/doc/source/classes/class_bbaabb.rst new file mode 100644 index 0000000..f9e32e7 --- /dev/null +++ b/doc/source/classes/class_bbaabb.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBAabb.xml. + +.. _class_BBAabb: + +BBAabb +====== + +**Inherits:** :ref:`BBParam` + +AABB-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbarray.rst b/doc/source/classes/class_bbarray.rst new file mode 100644 index 0000000..0746897 --- /dev/null +++ b/doc/source/classes/class_bbarray.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBArray.xml. + +.. _class_BBArray: + +BBArray +======= + +**Inherits:** :ref:`BBParam` + +Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbbasis.rst b/doc/source/classes/class_bbbasis.rst new file mode 100644 index 0000000..7790172 --- /dev/null +++ b/doc/source/classes/class_bbbasis.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBBasis.xml. + +.. _class_BBBasis: + +BBBasis +======= + +**Inherits:** :ref:`BBParam` + +Basis-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbbool.rst b/doc/source/classes/class_bbbool.rst new file mode 100644 index 0000000..1146140 --- /dev/null +++ b/doc/source/classes/class_bbbool.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBBool.xml. + +.. _class_BBBool: + +BBBool +====== + +**Inherits:** :ref:`BBParam` + +Bool-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbbytearray.rst b/doc/source/classes/class_bbbytearray.rst new file mode 100644 index 0000000..ac5834a --- /dev/null +++ b/doc/source/classes/class_bbbytearray.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBByteArray.xml. + +.. _class_BBByteArray: + +BBByteArray +=========== + +**Inherits:** :ref:`BBParam` + +ByteArray-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbcolor.rst b/doc/source/classes/class_bbcolor.rst new file mode 100644 index 0000000..95ead6e --- /dev/null +++ b/doc/source/classes/class_bbcolor.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBColor.xml. + +.. _class_BBColor: + +BBColor +======= + +**Inherits:** :ref:`BBParam` + +Color-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbcolorarray.rst b/doc/source/classes/class_bbcolorarray.rst new file mode 100644 index 0000000..708d1d3 --- /dev/null +++ b/doc/source/classes/class_bbcolorarray.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBColorArray.xml. + +.. _class_BBColorArray: + +BBColorArray +============ + +**Inherits:** :ref:`BBParam` + +ColorArray-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbdictionary.rst b/doc/source/classes/class_bbdictionary.rst new file mode 100644 index 0000000..96981a6 --- /dev/null +++ b/doc/source/classes/class_bbdictionary.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBDictionary.xml. + +.. _class_BBDictionary: + +BBDictionary +============ + +**Inherits:** :ref:`BBParam` + +Dictionary-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbfloat.rst b/doc/source/classes/class_bbfloat.rst new file mode 100644 index 0000000..078ff0d --- /dev/null +++ b/doc/source/classes/class_bbfloat.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBFloat.xml. + +.. _class_BBFloat: + +BBFloat +======= + +**Inherits:** :ref:`BBParam` + +Float-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbfloatarray.rst b/doc/source/classes/class_bbfloatarray.rst new file mode 100644 index 0000000..6d4f008 --- /dev/null +++ b/doc/source/classes/class_bbfloatarray.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBFloatArray.xml. + +.. _class_BBFloatArray: + +BBFloatArray +============ + +**Inherits:** :ref:`BBParam` + +FloatArray-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbint.rst b/doc/source/classes/class_bbint.rst new file mode 100644 index 0000000..e911bdf --- /dev/null +++ b/doc/source/classes/class_bbint.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBInt.xml. + +.. _class_BBInt: + +BBInt +===== + +**Inherits:** :ref:`BBParam` + +Integer-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbintarray.rst b/doc/source/classes/class_bbintarray.rst new file mode 100644 index 0000000..6bdc4de --- /dev/null +++ b/doc/source/classes/class_bbintarray.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBIntArray.xml. + +.. _class_BBIntArray: + +BBIntArray +========== + +**Inherits:** :ref:`BBParam` + +IntArray-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbnode.rst b/doc/source/classes/class_bbnode.rst new file mode 100644 index 0000000..0cad103 --- /dev/null +++ b/doc/source/classes/class_bbnode.rst @@ -0,0 +1,32 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBNode.xml. + +.. _class_BBNode: + +BBNode +====== + +**Inherits:** :ref:`BBParam` + +Node-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Node-type parameter intended for use with :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +If the source is a blackboard variable, it allows any type extended from ``Object``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbparam.rst b/doc/source/classes/class_bbparam.rst new file mode 100644 index 0000000..32c3934 --- /dev/null +++ b/doc/source/classes/class_bbparam.rst @@ -0,0 +1,180 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBParam.xml. + +.. _class_BBParam: + +BBParam +======= + +**Inherits:** + +**Inherited By:** :ref:`BBAabb`, :ref:`BBArray`, :ref:`BBBasis`, :ref:`BBBool`, :ref:`BBByteArray`, :ref:`BBColor`, :ref:`BBColorArray`, :ref:`BBDictionary`, :ref:`BBFloat`, :ref:`BBFloatArray`, :ref:`BBInt`, :ref:`BBIntArray`, :ref:`BBNode`, :ref:`BBPlane`, :ref:`BBQuaternion`, :ref:`BBRect2`, :ref:`BBRect2i`, :ref:`BBString`, :ref:`BBStringArray`, :ref:`BBStringName`, :ref:`BBTransform2D`, :ref:`BBTransform3D`, :ref:`BBVariant`, :ref:`BBVector2`, :ref:`BBVector2Array`, :ref:`BBVector2i`, :ref:`BBVector3`, :ref:`BBVector3Array`, :ref:`BBVector3i`, :ref:`BBVector4`, :ref:`BBVector4i` + +A base class for LimboAI typed parameters. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A base class for LimboAI typed parameters, with the ability to reference a :ref:`Blackboard` variable or hold a raw value of a specific :ref:`Variant.Type`. + +\ **Note**: Don't instantiate. Use specific subtypes instead. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +----------------------------------------------+----------------------------------------------------------+----------+ + | Variant | :ref:`saved_value` | ``null`` | + +----------------------------------------------+----------------------------------------------------------+----------+ + | :ref:`ValueSource` | :ref:`value_source` | ``0`` | + +----------------------------------------------+----------------------------------------------------------+----------+ + | String | :ref:`variable` | | + +----------------------------------------------+----------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant.Type` | :ref:`get_type` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Variant | :ref:`get_value` **(** Object p_agent, :ref:`Blackboard` p_blackboard, Variant p_default=null **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_BBParam_ValueSource: + +.. rst-class:: classref-enumeration + +enum **ValueSource**: + +.. _class_BBParam_constant_SAVED_VALUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ValueSource` **SAVED_VALUE** = ``0`` + +The value is stored directly within the BBParam resource. + +.. _class_BBParam_constant_BLACKBOARD_VAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ValueSource` **BLACKBOARD_VAR** = ``1`` + +The value is referenced by a variable name and retrieved from the :ref:`Blackboard`. The variable name is stored within the BBParam resource. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BBParam_property_saved_value: + +.. rst-class:: classref-property + +Variant **saved_value** = ``null`` + +.. rst-class:: classref-property-setget + +- void **set_saved_value** **(** Variant value **)** +- Variant **get_saved_value** **(** **)** + +Stores the parameter value when :ref:`value_source` is set to :ref:`SAVED_VALUE`. The data type of the value is determined by :ref:`get_type`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BBParam_property_value_source: + +.. rst-class:: classref-property + +:ref:`ValueSource` **value_source** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_value_source** **(** :ref:`ValueSource` value **)** +- :ref:`ValueSource` **get_value_source** **(** **)** + +Specifies the source of the value for BBParam. See :ref:`ValueSource`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BBParam_property_variable: + +.. rst-class:: classref-property + +String **variable** + +.. rst-class:: classref-property-setget + +- void **set_variable** **(** String value **)** +- String **get_variable** **(** **)** + +Stores the name of a :ref:`Blackboard` variable when :ref:`value_source` is set to :ref:`BLACKBOARD_VAR`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BBParam_method_get_type: + +.. rst-class:: classref-method + +:ref:`Variant.Type` **get_type** **(** **)** |const| + +Returns the expected data type of the parameter. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BBParam_method_get_value: + +.. rst-class:: classref-method + +Variant **get_value** **(** Object p_agent, :ref:`Blackboard` p_blackboard, Variant p_default=null **)** + +Returns the value of the parameter. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbplane.rst b/doc/source/classes/class_bbplane.rst new file mode 100644 index 0000000..04e77b0 --- /dev/null +++ b/doc/source/classes/class_bbplane.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBPlane.xml. + +.. _class_BBPlane: + +BBPlane +======= + +**Inherits:** :ref:`BBParam` + +Plane-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbquaternion.rst b/doc/source/classes/class_bbquaternion.rst new file mode 100644 index 0000000..437d3c9 --- /dev/null +++ b/doc/source/classes/class_bbquaternion.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBQuaternion.xml. + +.. _class_BBQuaternion: + +BBQuaternion +============ + +**Inherits:** :ref:`BBParam` + +Quaternion-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbrect2.rst b/doc/source/classes/class_bbrect2.rst new file mode 100644 index 0000000..6654395 --- /dev/null +++ b/doc/source/classes/class_bbrect2.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBRect2.xml. + +.. _class_BBRect2: + +BBRect2 +======= + +**Inherits:** :ref:`BBParam` + +Rect2-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbrect2i.rst b/doc/source/classes/class_bbrect2i.rst new file mode 100644 index 0000000..2241ba7 --- /dev/null +++ b/doc/source/classes/class_bbrect2i.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBRect2i.xml. + +.. _class_BBRect2i: + +BBRect2i +======== + +**Inherits:** :ref:`BBParam` + +Rect2i-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbstring.rst b/doc/source/classes/class_bbstring.rst new file mode 100644 index 0000000..08fd3ba --- /dev/null +++ b/doc/source/classes/class_bbstring.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBString.xml. + +.. _class_BBString: + +BBString +======== + +**Inherits:** :ref:`BBParam` + +String-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbstringarray.rst b/doc/source/classes/class_bbstringarray.rst new file mode 100644 index 0000000..02e4ffb --- /dev/null +++ b/doc/source/classes/class_bbstringarray.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBStringArray.xml. + +.. _class_BBStringArray: + +BBStringArray +============= + +**Inherits:** :ref:`BBParam` + +StringArray-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbstringname.rst b/doc/source/classes/class_bbstringname.rst new file mode 100644 index 0000000..62b28e8 --- /dev/null +++ b/doc/source/classes/class_bbstringname.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBStringName.xml. + +.. _class_BBStringName: + +BBStringName +============ + +**Inherits:** :ref:`BBParam` + +StringName-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbtransform2d.rst b/doc/source/classes/class_bbtransform2d.rst new file mode 100644 index 0000000..a4270da --- /dev/null +++ b/doc/source/classes/class_bbtransform2d.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBTransform2D.xml. + +.. _class_BBTransform2D: + +BBTransform2D +============= + +**Inherits:** :ref:`BBParam` + +Transform2D-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbtransform3d.rst b/doc/source/classes/class_bbtransform3d.rst new file mode 100644 index 0000000..be1701b --- /dev/null +++ b/doc/source/classes/class_bbtransform3d.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBTransform3D.xml. + +.. _class_BBTransform3D: + +BBTransform3D +============= + +**Inherits:** :ref:`BBParam` + +Transform3D-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvariant.rst b/doc/source/classes/class_bbvariant.rst new file mode 100644 index 0000000..75ba6ad --- /dev/null +++ b/doc/source/classes/class_bbvariant.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVariant.xml. + +.. _class_BBVariant: + +BBVariant +========= + +**Inherits:** :ref:`BBParam` + +Variant-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Variant-type parameter intended for use with :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +The data type is specified by :ref:`type`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------+-------+ + | :ref:`Variant.Type` | :ref:`type` | ``0`` | + +-----------------------------------------------------+--------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BBVariant_property_type: + +.. rst-class:: classref-property + +:ref:`Variant.Type` **type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_type** **(** :ref:`Variant.Type` value **)** +- :ref:`Variant.Type` **get_type** **(** **)** + +Specified :ref:`Variant.Type` for the parameter value. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector2.rst b/doc/source/classes/class_bbvector2.rst new file mode 100644 index 0000000..081fb53 --- /dev/null +++ b/doc/source/classes/class_bbvector2.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector2.xml. + +.. _class_BBVector2: + +BBVector2 +========= + +**Inherits:** :ref:`BBParam` + +Vector2-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector2array.rst b/doc/source/classes/class_bbvector2array.rst new file mode 100644 index 0000000..57976cf --- /dev/null +++ b/doc/source/classes/class_bbvector2array.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector2Array.xml. + +.. _class_BBVector2Array: + +BBVector2Array +============== + +**Inherits:** :ref:`BBParam` + +Vector2Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector2i.rst b/doc/source/classes/class_bbvector2i.rst new file mode 100644 index 0000000..1e64614 --- /dev/null +++ b/doc/source/classes/class_bbvector2i.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector2i.xml. + +.. _class_BBVector2i: + +BBVector2i +========== + +**Inherits:** :ref:`BBParam` + +Vector2i-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector3.rst b/doc/source/classes/class_bbvector3.rst new file mode 100644 index 0000000..1f6ecc4 --- /dev/null +++ b/doc/source/classes/class_bbvector3.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector3.xml. + +.. _class_BBVector3: + +BBVector3 +========= + +**Inherits:** :ref:`BBParam` + +Vector3-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector3array.rst b/doc/source/classes/class_bbvector3array.rst new file mode 100644 index 0000000..58b255a --- /dev/null +++ b/doc/source/classes/class_bbvector3array.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector3Array.xml. + +.. _class_BBVector3Array: + +BBVector3Array +============== + +**Inherits:** :ref:`BBParam` + +Vector3Array-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector3i.rst b/doc/source/classes/class_bbvector3i.rst new file mode 100644 index 0000000..1a70ae7 --- /dev/null +++ b/doc/source/classes/class_bbvector3i.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector3i.xml. + +.. _class_BBVector3i: + +BBVector3i +========== + +**Inherits:** :ref:`BBParam` + +Vector3i-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector4.rst b/doc/source/classes/class_bbvector4.rst new file mode 100644 index 0000000..aa2eccc --- /dev/null +++ b/doc/source/classes/class_bbvector4.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector4.xml. + +.. _class_BBVector4: + +BBVector4 +========= + +**Inherits:** :ref:`BBParam` + +Vector4-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bbvector4i.rst b/doc/source/classes/class_bbvector4i.rst new file mode 100644 index 0000000..ff2a053 --- /dev/null +++ b/doc/source/classes/class_bbvector4i.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BBVector4i.xml. + +.. _class_BBVector4i: + +BBVector4i +========== + +**Inherits:** :ref:`BBParam` + +Vector4i-type parameter for :ref:`BehaviorTree` tasks. See :ref:`BBParam`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_behaviortree.rst b/doc/source/classes/class_behaviortree.rst new file mode 100644 index 0000000..acd2ad9 --- /dev/null +++ b/doc/source/classes/class_behaviortree.rst @@ -0,0 +1,163 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BehaviorTree.xml. + +.. _class_BehaviorTree: + +BehaviorTree +============ + +**Inherits:** + +Contains Behavior Tree data. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Behavior Trees are hierarchical structures used to model and control the behavior of agents in a game (e.g., characters, enemies, entities). They are designed to make it easier to create complex and highly modular behaviors for your games. + +Behavior Trees are composed of tasks that represent specific actions or decision-making rules. Tasks can be broadly categorized into two main types: control tasks and leaf tasks. Control tasks determine the execution flow within the tree. They include :ref:`BTSequence`, :ref:`BTSelector`, and :ref:`BTInvert`. Leaf tasks represent specific actions to perform, like moving or attacking, or conditions that need to be checked. The :ref:`BTTask` class provides the foundation for various building blocks of the Behavior Trees. BT tasks can share data with the help of :ref:`Blackboard`. See :ref:`BTTask.blackboard` and :ref:`Blackboard`. + +\ **Note:** To create your own actions, extend the :ref:`BTAction` class. + +The BehaviorTree is executed from the root task and follows the rules specified by the control tasks, all the way down to the leaf tasks, which represent the actual actions that the agent should perform or conditions that should be checked. Each task returns a status when it is executed. It can be ``SUCCESS``, ``RUNNING``, or ``FAILURE``. These statuses determine how the tree progresses. They are defined in :ref:`Status`. + +Behavior Trees handle conditional logic using condition tasks. These tasks check for specific conditions and return either ``SUCCESS`` or ``FAILURE`` based on the state of the agent or its environment (e.g., "IsLowOnHealth", "IsTargetInSight"). Conditions can be used together with :ref:`BTSequence` and :ref:`BTSelector` to craft your decision-making logic. + +\ **Note**: To create your own conditions, extend the :ref:`BTCondition` class. + +Check out the :ref:`BTTask` class, which provides the foundation for various building blocks of Behavior Trees. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------+-------------------------------------------------------------+--------+ + | String | :ref:`description` | ``""`` | + +--------+-------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BehaviorTree` | :ref:`clone` **(** **)** |const| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`copy_other` **(** :ref:`BehaviorTree` p_other **)** | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_root_task` **(** **)** |const| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`instantiate` **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** |const| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_root_task` **(** :ref:`BTTask` p_value **)** | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BehaviorTree_property_description: + +.. rst-class:: classref-property + +String **description** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_description** **(** String value **)** +- String **get_description** **(** **)** + +User-provided description of the BehaviorTree. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BehaviorTree_method_clone: + +.. rst-class:: classref-method + +:ref:`BehaviorTree` **clone** **(** **)** |const| + +Makes a copy of the BehaviorTree resource. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BehaviorTree_method_copy_other: + +.. rst-class:: classref-method + +void **copy_other** **(** :ref:`BehaviorTree` p_other **)** + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_BehaviorTree_method_get_root_task: + +.. rst-class:: classref-method + +:ref:`BTTask` **get_root_task** **(** **)** |const| + +Returns the root task of the BehaviorTree resource. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BehaviorTree_method_instantiate: + +.. rst-class:: classref-method + +:ref:`BTTask` **instantiate** **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** |const| + +Instantiates the Behavior Tree and returns the root :ref:`BTTask`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BehaviorTree_method_set_root_task: + +.. rst-class:: classref-method + +void **set_root_task** **(** :ref:`BTTask` p_value **)** + +Assigns a new root task to the **BehaviorTree** resource. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_blackboard.rst b/doc/source/classes/class_blackboard.rst new file mode 100644 index 0000000..7e4672d --- /dev/null +++ b/doc/source/classes/class_blackboard.rst @@ -0,0 +1,189 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/Blackboard.xml. + +.. _class_Blackboard: + +Blackboard +========== + +**Inherits:** + +A key/value storage for sharing among :ref:`LimboHSM` states and :ref:`BehaviorTree` tasks. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Blackboard is where data is stored and shared between states in the :ref:`LimboHSM` system and tasks in a :ref:`BehaviorTree`. Each state and task in the :ref:`BehaviorTree` can access this Blackboard, allowing them to read and write data. This makes it easy to share information between different actions and behaviors. + +Blackboard can also act as a parent scope for another Blackboard. If a specific variable is not found in the active scope, it looks in the parent Blackboard to find it. A parent Blackboard can itself have its own parent scope, forming what we call a "blackboard scope chain." Importantly, there is no limit to how many Blackboards can be in this chain, and the Blackboard doesn't modify values in the parent scopes. + +New scopes can be created using the :ref:`BTNewScope` and :ref:`BTSubtree` decorators. Additionally, a new scope is automatically created for any :ref:`LimboState` that has defined non-empty Blackboard data or for any root-level :ref:`LimboHSM` node. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_var` **(** Variant p_key **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Dictionary | :ref:`get_data` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`get_parent_scope` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Variant | :ref:`get_var` **(** Variant p_key, Variant p_default=null **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`has_var` **(** Variant p_key **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`prefetch_nodepath_vars` **(** Node p_node **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_data` **(** Dictionary p_data **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_parent_scope` **(** :ref:`Blackboard` p_blackboard **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_var` **(** Variant p_key, Variant p_value **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`top` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Blackboard_method_erase_var: + +.. rst-class:: classref-method + +void **erase_var** **(** Variant p_key **)** + +Removes a variable by its name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_get_data: + +.. rst-class:: classref-method + +Dictionary **get_data** **(** **)** |const| + +Returns Blackboard data as a ``Dictionary``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_get_parent_scope: + +.. rst-class:: classref-method + +:ref:`Blackboard` **get_parent_scope** **(** **)** |const| + +Returns a Blackboard that serves as the parent scope for this instance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_get_var: + +.. rst-class:: classref-method + +Variant **get_var** **(** Variant p_key, Variant p_default=null **)** |const| + +Returns variable value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_has_var: + +.. rst-class:: classref-method + +bool **has_var** **(** Variant p_key **)** |const| + +Returns ``true`` if the Blackboard contains the ``p_key`` variable, including the parent scopes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_prefetch_nodepath_vars: + +.. rst-class:: classref-method + +void **prefetch_nodepath_vars** **(** Node p_node **)** + +If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with ``Node`` references when the tree is instantiated. References are retrieved by calling :ref:`Node.get_node` on the agent instance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_set_data: + +.. rst-class:: classref-method + +void **set_data** **(** Dictionary p_data **)** + +Overwrites Blackboard data, replacing any previously stored variables within current scope. Use with caution. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_set_parent_scope: + +.. rst-class:: classref-method + +void **set_parent_scope** **(** :ref:`Blackboard` p_blackboard **)** + +Assigns the parent scope. If a value isn't in the current Blackboard scope, it will look in the parent scope Blackboard to find it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_set_var: + +.. rst-class:: classref-method + +void **set_var** **(** Variant p_key, Variant p_value **)** + +Assigns a value to a Blackboard variable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Blackboard_method_top: + +.. rst-class:: classref-method + +:ref:`Blackboard` **top** **(** **)** |const| + +Returns the topmost **Blackboard** in the scope chain. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bt.rst b/doc/source/classes/class_bt.rst new file mode 100644 index 0000000..4a0432c --- /dev/null +++ b/doc/source/classes/class_bt.rst @@ -0,0 +1,72 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BT.xml. + +.. _class_BT: + +BT +== + +**Inherits:** + +**Inherited By:** :ref:`BTTask` + +Base of :ref:`BTTask`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_BT_Status: + +.. rst-class:: classref-enumeration + +enum **Status**: + +.. _class_BT_constant_FRESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **FRESH** = ``0`` + +Task wasn't executed yet or it was aborted and reset. + +.. _class_BT_constant_RUNNING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **RUNNING** = ``1`` + +Task is being performed and hasn't finished yet. + +.. _class_BT_constant_FAILURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **FAILURE** = ``2`` + +Task has finished with failure. + +.. _class_BT_constant_SUCCESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **SUCCESS** = ``3`` + +Task has finished with success. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btaction.rst b/doc/source/classes/class_btaction.rst new file mode 100644 index 0000000..b46c9d1 --- /dev/null +++ b/doc/source/classes/class_btaction.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTAction.xml. + +.. _class_BTAction: + +BTAction +======== + +**Inherits:** :ref:`BTTask` **<** :ref:`BT` + +**Inherited By:** :ref:`BTAwaitAnimation`, :ref:`BTCallMethod`, :ref:`BTConsolePrint`, :ref:`BTFail`, :ref:`BTPauseAnimation`, :ref:`BTPlayAnimation`, :ref:`BTRandomWait`, :ref:`BTSetAgentProperty`, :ref:`BTSetVar`, :ref:`BTStopAnimation`, :ref:`BTWait`, :ref:`BTWaitTicks` + +Base class for all :ref:`BehaviorTree` actions. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for all actions within a :ref:`BehaviorTree`. You can create your own actions by extending the **BTAction** class. + +Represents a specific behavior or action in a :ref:`BehaviorTree` that an agent should execute. Actions are the lowest level of the :ref:`BehaviorTree` hierarchy and are responsible for performing the actual work required to achieve a goal. Actions do not have child tasks. + +A single action can perform a task within one or multiple ticks. If it takes more than one tick to complete the task, the action should return ``RUNNING`` status. When the task is finished, the action returns either ``SUCCESS`` or ``FAILURE`` to indicate the outcome. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btalwaysfail.rst b/doc/source/classes/class_btalwaysfail.rst new file mode 100644 index 0000000..c10ee60 --- /dev/null +++ b/doc/source/classes/class_btalwaysfail.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTAlwaysFail.xml. + +.. _class_BTAlwaysFail: + +BTAlwaysFail +============ + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that converts ``SUCCESS`` into ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btalwayssucceed.rst b/doc/source/classes/class_btalwayssucceed.rst new file mode 100644 index 0000000..d93a6fb --- /dev/null +++ b/doc/source/classes/class_btalwayssucceed.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTAlwaysSucceed.xml. + +.. _class_BTAlwaysSucceed: + +BTAlwaysSucceed +=============== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that converts ``FAILURE`` into ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btawaitanimation.rst b/doc/source/classes/class_btawaitanimation.rst new file mode 100644 index 0000000..b2ca3c2 --- /dev/null +++ b/doc/source/classes/class_btawaitanimation.rst @@ -0,0 +1,106 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTAwaitAnimation.xml. + +.. _class_BTAwaitAnimation: + +BTAwaitAnimation +================ + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that waits for an animation to finish playing. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTAwaitAnimation action waits for an animation on the specified ``AnimationPlayer`` node to finish playing and returns ``SUCCESS``. + +Returns ``SUCCESS`` if the specified animation has finished playing or if the specified animation is not currently playing. + +Returns ``FAILURE`` if the specified animation doesn't exist or if the action fails to get the ``AnimationPlayer`` node. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------+---------+ + | StringName | :ref:`animation_name` | ``&""`` | + +-----------------------------+---------------------------------------------------------------------------+---------+ + | :ref:`BBNode` | :ref:`animation_player` | | + +-----------------------------+---------------------------------------------------------------------------+---------+ + | float | :ref:`max_time` | ``1.0`` | + +-----------------------------+---------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTAwaitAnimation_property_animation_name: + +.. rst-class:: classref-property + +StringName **animation_name** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_animation_name** **(** StringName value **)** +- StringName **get_animation_name** **(** **)** + +Animation's key within the ``AnimationPlayer`` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTAwaitAnimation_property_animation_player: + +.. rst-class:: classref-property + +:ref:`BBNode` **animation_player** + +.. rst-class:: classref-property-setget + +- void **set_animation_player** **(** :ref:`BBNode` value **)** +- :ref:`BBNode` **get_animation_player** **(** **)** + +Parameter that specifies the ``AnimationPlayer`` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTAwaitAnimation_property_max_time: + +.. rst-class:: classref-property + +float **max_time** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_time** **(** float value **)** +- float **get_max_time** **(** **)** + +The maximum duration to wait for the animation to complete (in seconds). If the animation doesn't finish within this time, BTAwaitAnimation will return ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcallmethod.rst b/doc/source/classes/class_btcallmethod.rst new file mode 100644 index 0000000..2ebd334 --- /dev/null +++ b/doc/source/classes/class_btcallmethod.rst @@ -0,0 +1,123 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTCallMethod.xml. + +.. _class_BTCallMethod: + +BTCallMethod +============ + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that calls a method on a specified ``Node`` or ``Object``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTCallMethod action calls a :ref:`method` on the specified ``Node`` or ``Object`` instance and returns ``SUCCESS``. + +Returns ``FAILURE`` if the action encounters an issue during the method execution. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------+-----------+ + | Array | :ref:`args` | ``[]`` | + +-----------------------------+---------------------------------------------------------------------------+-----------+ + | bool | :ref:`args_include_delta` | ``false`` | + +-----------------------------+---------------------------------------------------------------------------+-----------+ + | StringName | :ref:`method` | ``&""`` | + +-----------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`BBNode` | :ref:`node` | | + +-----------------------------+---------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTCallMethod_property_args: + +.. rst-class:: classref-property + +Array **args** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_args** **(** Array value **)** +- Array **get_args** **(** **)** + +The arguments to be passed when calling the method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCallMethod_property_args_include_delta: + +.. rst-class:: classref-property + +bool **args_include_delta** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_include_delta** **(** bool value **)** +- bool **is_delta_included** **(** **)** + +Include delta as a first parameter and shift the position of the rest of the arguments if any. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCallMethod_property_method: + +.. rst-class:: classref-property + +StringName **method** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_method** **(** StringName value **)** +- StringName **get_method** **(** **)** + +The name of the method to be called. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCallMethod_property_node: + +.. rst-class:: classref-property + +:ref:`BBNode` **node** + +.. rst-class:: classref-property-setget + +- void **set_node_param** **(** :ref:`BBNode` value **)** +- :ref:`BBNode` **get_node_param** **(** **)** + +Specifies the ``Node`` or ``Object`` instance containing the method to be called. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcheckagentproperty.rst b/doc/source/classes/class_btcheckagentproperty.rst new file mode 100644 index 0000000..c2ee2a5 --- /dev/null +++ b/doc/source/classes/class_btcheckagentproperty.rst @@ -0,0 +1,104 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTCheckAgentProperty.xml. + +.. _class_BTCheckAgentProperty: + +BTCheckAgentProperty +==================== + +**Inherits:** :ref:`BTCondition` **<** :ref:`BTTask` **<** :ref:`BT` + +BT condition that checks agent's property value. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTCheckAgentProperty examines the agent's property value and compares it to :ref:`value`. + +Returns ``SUCCESS`` or ``FAILURE`` based on the :ref:`check_type`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------+---------+ + | :ref:`CheckType` | :ref:`check_type` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------------+---------+ + | StringName | :ref:`property` | ``&""`` | + +-----------------------------------------------+-------------------------------------------------------------------+---------+ + | :ref:`BBVariant` | :ref:`value` | | + +-----------------------------------------------+-------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTCheckAgentProperty_property_check_type: + +.. rst-class:: classref-property + +:ref:`CheckType` **check_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_check_type** **(** :ref:`CheckType` value **)** +- :ref:`CheckType` **get_check_type** **(** **)** + +The type of check to be performed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCheckAgentProperty_property_property: + +.. rst-class:: classref-property + +StringName **property** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_property** **(** StringName value **)** +- StringName **get_property** **(** **)** + +Parameter that specifies the agent's property to be compared. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCheckAgentProperty_property_value: + +.. rst-class:: classref-property + +:ref:`BBVariant` **value** + +.. rst-class:: classref-property-setget + +- void **set_value** **(** :ref:`BBVariant` value **)** +- :ref:`BBVariant` **get_value** **(** **)** + +Parameter that specifies the value against which an agent's property will be compared. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btchecktrigger.rst b/doc/source/classes/class_btchecktrigger.rst new file mode 100644 index 0000000..24efade --- /dev/null +++ b/doc/source/classes/class_btchecktrigger.rst @@ -0,0 +1,70 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTCheckTrigger.xml. + +.. _class_BTCheckTrigger: + +BTCheckTrigger +============== + +**Inherits:** :ref:`BTCondition` **<** :ref:`BTTask` **<** :ref:`BT` + +BT condition that checks a trigger (a boolean variable). + +.. rst-class:: classref-introduction-group + +Description +----------- + +**BTCheckTrigger** verifies whether the :ref:`variable` is set to ``true``. If it is, the task switches it to ``false`` and returns ``SUCCESS``. Otherwise, it returns ``FAILURE``. + +\ **BTCheckTrigger** can function as a "gate" within a :ref:`BTSequence`: when the trigger variable is set to ``true``, it permits the execution of subsequent tasks and then changes the variable to ``false``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------+---------------------------------------------------------+--------+ + | String | :ref:`variable` | ``""`` | + +--------+---------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTCheckTrigger_property_variable: + +.. rst-class:: classref-property + +String **variable** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_variable** **(** String value **)** +- String **get_variable** **(** **)** + +A boolean variable on the blackboard used as a trigger. See also :ref:`BTTask.blackboard`. + +If variable's value is ``true``, **BTCheckTrigger** will switch it to ``false`` and return ``SUCCESS``. + +If variable's value is ``false``, **BTCheckTrigger** will return ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcheckvar.rst b/doc/source/classes/class_btcheckvar.rst new file mode 100644 index 0000000..17ec6f6 --- /dev/null +++ b/doc/source/classes/class_btcheckvar.rst @@ -0,0 +1,102 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTCheckVar.xml. + +.. _class_BTCheckVar: + +BTCheckVar +========== + +**Inherits:** :ref:`BTCondition` **<** :ref:`BTTask` **<** :ref:`BT` + +BT condition that checks a variable on the blackboard. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTCheckVar evaluates the :ref:`variable` against :ref:`value` and returns ``SUCCESS`` or ``FAILURE`` based on the :ref:`check_type`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------+--------+ + | :ref:`CheckType` | :ref:`check_type` | ``0`` | + +-----------------------------------------------+---------------------------------------------------------+--------+ + | :ref:`BBVariant` | :ref:`value` | | + +-----------------------------------------------+---------------------------------------------------------+--------+ + | String | :ref:`variable` | ``""`` | + +-----------------------------------------------+---------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTCheckVar_property_check_type: + +.. rst-class:: classref-property + +:ref:`CheckType` **check_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_check_type** **(** :ref:`CheckType` value **)** +- :ref:`CheckType` **get_check_type** **(** **)** + +The type of check to be performed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCheckVar_property_value: + +.. rst-class:: classref-property + +:ref:`BBVariant` **value** + +.. rst-class:: classref-property-setget + +- void **set_value** **(** :ref:`BBVariant` value **)** +- :ref:`BBVariant` **get_value** **(** **)** + +A parameter that specifies the value against which the :ref:`variable` will be compared. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCheckVar_property_variable: + +.. rst-class:: classref-property + +String **variable** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_variable** **(** String value **)** +- String **get_variable** **(** **)** + +The name of the variable to check its value. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcomment.rst b/doc/source/classes/class_btcomment.rst new file mode 100644 index 0000000..96b429d --- /dev/null +++ b/doc/source/classes/class_btcomment.rst @@ -0,0 +1,32 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTComment.xml. + +.. _class_BTComment: + +BTComment +========= + +**Inherits:** :ref:`BTTask` **<** :ref:`BT` + +BTComment adds annotations or explanatory notes to a :ref:`BehaviorTree`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTComment is used to add annotations or explanatory notes to a :ref:`BehaviorTree`. + +Comments are not executed as part of the tree and are removed from runtime instances of the :ref:`BehaviorTree`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcomposite.rst b/doc/source/classes/class_btcomposite.rst new file mode 100644 index 0000000..b000eab --- /dev/null +++ b/doc/source/classes/class_btcomposite.rst @@ -0,0 +1,34 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTComposite.xml. + +.. _class_BTComposite: + +BTComposite +=========== + +**Inherits:** :ref:`BTTask` **<** :ref:`BT` + +**Inherited By:** :ref:`BTDynamicSelector`, :ref:`BTDynamicSequence`, :ref:`BTParallel`, :ref:`BTProbabilitySelector`, :ref:`BTRandomSelector`, :ref:`BTRandomSequence`, :ref:`BTSelector`, :ref:`BTSequence` + +Base class for BT composite tasks. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for all :ref:`BehaviorTree` composite tasks. You can create your own composite tasks by extending the BTComposite class. + +Composite is a control task within a :ref:`BehaviorTree` that contains one or more child tasks. It defines the structure and flow of the :ref:`BehaviorTree` by specifying how child tasks are executed. Composites can be used to group related tasks into a single unit, making it easier to manage and maintain the :ref:`BehaviorTree`. Examples of :ref:`BehaviorTree` composites include :ref:`BTSelector`, :ref:`BTSequence`, and :ref:`BTParallel`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcondition.rst b/doc/source/classes/class_btcondition.rst new file mode 100644 index 0000000..eab3d5f --- /dev/null +++ b/doc/source/classes/class_btcondition.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTCondition.xml. + +.. _class_BTCondition: + +BTCondition +=========== + +**Inherits:** :ref:`BTTask` **<** :ref:`BT` + +**Inherited By:** :ref:`BTCheckAgentProperty`, :ref:`BTCheckTrigger`, :ref:`BTCheckVar` + +Base class for BT conditions. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for all :ref:`BehaviorTree` conditions. You can create your own conditions by extending the **BTCondition** class. + +Condition is a task within a :ref:`BehaviorTree` that checks for a specific condition before executing subsequent tasks. It is often used inside composite tasks to control the execution flow. Conditions are 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 condition tasks in a :ref:`BehaviorTree` can improve system efficiency and prevent unnecessary actions. However, they may not be suitable for complex decision-making processes, and too many condition tasks can make the :ref:`BehaviorTree` difficult to read. + +Conditions typically don't take multiple ticks to finish and return either ``SUCCESS`` or ``FAILURE`` immediately. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btconsoleprint.rst b/doc/source/classes/class_btconsoleprint.rst new file mode 100644 index 0000000..4a07eaa --- /dev/null +++ b/doc/source/classes/class_btconsoleprint.rst @@ -0,0 +1,83 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTConsolePrint.xml. + +.. _class_BTConsolePrint: + +BTConsolePrint +============== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action task that outputs text to the console. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTConsolePrint action outputs text to the console and returns ``SUCCESS``. It can include placeholders for format arguments similar to GDScript's % operator. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------+---------------------------------------------------------------------------------+-------------------------+ + | PackedStringArray | :ref:`bb_format_parameters` | ``PackedStringArray()`` | + +-------------------+---------------------------------------------------------------------------------+-------------------------+ + | String | :ref:`text` | ``""`` | + +-------------------+---------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTConsolePrint_property_bb_format_parameters: + +.. rst-class:: classref-property + +PackedStringArray **bb_format_parameters** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_bb_format_parameters** **(** PackedStringArray value **)** +- PackedStringArray **get_bb_format_parameters** **(** **)** + +The values of format parameters are used as format arguments for the text that will be printed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTConsolePrint_property_text: + +.. rst-class:: classref-property + +String **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** String value **)** +- String **get_text** **(** **)** + +The text to be printed, which can include multiple placeholders to be substituted with format arguments. These placeholders follow the same format as GDScript's % operator and typically start with '%' followed by a format specifier. For instance: %s for string, %d for integer, %f for real. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btcooldown.rst b/doc/source/classes/class_btcooldown.rst new file mode 100644 index 0000000..20cbcf5 --- /dev/null +++ b/doc/source/classes/class_btcooldown.rst @@ -0,0 +1,148 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTCooldown.xml. + +.. _class_BTCooldown: + +BTCooldown +========== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that executes its child task only if :ref:`duration` time has passed since the previous execution. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTCooldown runs its child task only if :ref:`duration` time has passed since the last successful child task execution. It will only consider successful executions unless :ref:`trigger_on_failure` is set to ``true``. + +Returns ``RUNNING``, if the child task results in ``RUNNING``. + +Returns ``SUCCESS``, if the child task results in ``SUCCESS``, and triggers the cooldown timer. + +Returns ``FAILURE``, if the child task results in ``FAILURE`` or if :ref:`duration` time didn't pass since the previous execution. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------+-------------------------------------------------------------------------+-----------+ + | String | :ref:`cooldown_state_var` | ``""`` | + +--------+-------------------------------------------------------------------------+-----------+ + | float | :ref:`duration` | ``10.0`` | + +--------+-------------------------------------------------------------------------+-----------+ + | bool | :ref:`process_pause` | ``false`` | + +--------+-------------------------------------------------------------------------+-----------+ + | bool | :ref:`start_cooled` | ``false`` | + +--------+-------------------------------------------------------------------------+-----------+ + | bool | :ref:`trigger_on_failure` | ``false`` | + +--------+-------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTCooldown_property_cooldown_state_var: + +.. rst-class:: classref-property + +String **cooldown_state_var** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_cooldown_state_var** **(** String value **)** +- String **get_cooldown_state_var** **(** **)** + +A boolean variable used to store the cooldown state in the :ref:`Blackboard`. If left empty, the variable will be automatically generated and assigned. + +If the variable's value is set to ``true``, it indicates that the cooldown is activated. This feature is useful for checking the cooldown state from other parts of the tree or sharing it among different sections of the :ref:`BehaviorTree`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCooldown_property_duration: + +.. rst-class:: classref-property + +float **duration** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_duration** **(** float value **)** +- float **get_duration** **(** **)** + +Time to wait before permitting another child's execution. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCooldown_property_process_pause: + +.. rst-class:: classref-property + +bool **process_pause** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_process_pause** **(** bool value **)** +- bool **get_process_pause** **(** **)** + +If ``true``, process cooldown when the ``SceneTree`` is paused. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCooldown_property_start_cooled: + +.. rst-class:: classref-property + +bool **start_cooled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_start_cooled** **(** bool value **)** +- bool **get_start_cooled** **(** **)** + +If ``true``, initiate a cooldown as if the child had been executed before the first BT tick. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTCooldown_property_trigger_on_failure: + +.. rst-class:: classref-property + +bool **trigger_on_failure** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_trigger_on_failure** **(** bool value **)** +- bool **get_trigger_on_failure** **(** **)** + +If ``true``, the cooldown will be activated if the child task also returns ``FAILURE``. Otherwise, the cooldown will only be triggered when the child task returns ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btdecorator.rst b/doc/source/classes/class_btdecorator.rst new file mode 100644 index 0000000..8c01588 --- /dev/null +++ b/doc/source/classes/class_btdecorator.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTDecorator.xml. + +.. _class_BTDecorator: + +BTDecorator +=========== + +**Inherits:** :ref:`BTTask` **<** :ref:`BT` + +**Inherited By:** :ref:`BTAlwaysFail`, :ref:`BTAlwaysSucceed`, :ref:`BTCooldown`, :ref:`BTDelay`, :ref:`BTForEach`, :ref:`BTInvert`, :ref:`BTNewScope`, :ref:`BTProbability`, :ref:`BTRepeat`, :ref:`BTRepeatUntilFailure`, :ref:`BTRepeatUntilSuccess`, :ref:`BTRunLimit`, :ref:`BTTimeLimit` + +Base class for BT decorators. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for all :ref:`BehaviorTree` decorators. You can create your own decorators by extending the BTDecorator class. + +A decorator is a task within a :ref:`BehaviorTree` that alters the behavior of its child task. Decorators can have only one child task. + +Decorators can be used to add conditions, limits, or other constraints to the execution of a task. Examples of :ref:`BehaviorTree` decorators include :ref:`BTInvert`, :ref:`BTRepeat`, and :ref:`BTCooldown`. The use of :ref:`BehaviorTree` decorators can simplify the design and implementation of complex behaviors by adding additional logic to existing tasks. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btdelay.rst b/doc/source/classes/class_btdelay.rst new file mode 100644 index 0000000..8b2e714 --- /dev/null +++ b/doc/source/classes/class_btdelay.rst @@ -0,0 +1,64 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTDelay.xml. + +.. _class_BTDelay: + +BTDelay +======= + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that introduces a delay before executing its child task. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTDelay introduces a delay of :ref:`seconds` before executing its child task. Returns ``RUNNING`` during the delay period. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------+------------------------------------------------+---------+ + | float | :ref:`seconds` | ``1.0`` | + +-------+------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTDelay_property_seconds: + +.. rst-class:: classref-property + +float **seconds** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_seconds** **(** float value **)** +- float **get_seconds** **(** **)** + +Delay duration in seconds. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btdynamicselector.rst b/doc/source/classes/class_btdynamicselector.rst new file mode 100644 index 0000000..318b2df --- /dev/null +++ b/doc/source/classes/class_btdynamicselector.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTDynamicSelector.xml. + +.. _class_BTDynamicSelector: + +BTDynamicSelector +================= + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that executes tasks from scratch every tick until first ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTDynamicSelector executes its child tasks sequentially, from first to last, until any child returns ``SUCCESS``. Unlike :ref:`BTSelector`, it will execute tasks from the beginning every tick, reevaluating their statuses. It is quite useful when you want to retry higher-priority behaviors in every tick. + +Returns ``RUNNING`` if a child task results in ``RUNNING``. BTDynamicSelector will remember the last ``RUNNING`` child, but, unlike :ref:`BTSequence`, on the next execution tick, it will reexecute preceding tasks and reevaluate their return statuses. If any of the preceding tasks doesn't result in ``FAILURE``, it will abort the remembered ``RUNNING`` task. + +Returns ``FAILURE`` if all child tasks result in ``FAILURE``. + +Returns ``SUCCESS`` if a child task results in ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btdynamicsequence.rst b/doc/source/classes/class_btdynamicsequence.rst new file mode 100644 index 0000000..f13fc69 --- /dev/null +++ b/doc/source/classes/class_btdynamicsequence.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTDynamicSequence.xml. + +.. _class_BTDynamicSequence: + +BTDynamicSequence +================= + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that executes tasks from scratch every tick as long as they return ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTDynamicSequence executes its child tasks sequentially, from first to last, for as long as they return ``SUCCESS``. Unlike :ref:`BTSequence`, it will execute tasks from the beginning every tick, reevaluating their statuses. It is quite useful when you want to recheck conditions preceding a long-running action during each tick and abort the ``RUNNING`` action when any condition results in ``FAILURE``. + +Returns ``RUNNING`` if a child task results in ``RUNNING``. BTDynamicSequence will remember the last ``RUNNING`` child, but, unlike :ref:`BTSequence`, on the next execution tick, it will reexecute preceding tasks and reevaluate their return statuses. If any of the preceding tasks doesn't result in ``SUCCESS``, it will abort the remembered ``RUNNING`` task. + +Returns ``FAILURE`` if a child task results in ``FAILURE``. + +Returns ``SUCCESS`` if all child tasks result in ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btfail.rst b/doc/source/classes/class_btfail.rst new file mode 100644 index 0000000..0b8837a --- /dev/null +++ b/doc/source/classes/class_btfail.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTFail.xml. + +.. _class_BTFail: + +BTFail +====== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that always returns ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btforeach.rst b/doc/source/classes/class_btforeach.rst new file mode 100644 index 0000000..f04bab6 --- /dev/null +++ b/doc/source/classes/class_btforeach.rst @@ -0,0 +1,89 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTForEach.xml. + +.. _class_BTForEach: + +BTForEach +========= + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that executes its child task for each element of an ``Array``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTForEach executes its child task for each element of an ``Array``. During each iteration, the next element is stored in the specified :ref:`Blackboard` variable. + +Returns ``RUNNING`` if the child task results in ``RUNNING`` or if the child task results in ``SUCCESS`` on a non-last iteration. + +Returns ``FAILURE`` if the child task results in ``FAILURE``. + +Returns ``SUCCESS`` if the child task results in ``SUCCESS`` on the last iteration. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------+------------------------------------------------------+--------+ + | String | :ref:`array_var` | ``""`` | + +--------+------------------------------------------------------+--------+ + | String | :ref:`save_var` | ``""`` | + +--------+------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTForEach_property_array_var: + +.. rst-class:: classref-property + +String **array_var** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_array_var** **(** String value **)** +- String **get_array_var** **(** **)** + +A variable within the :ref:`Blackboard` that holds an ``Array``, which is used for the iteration process. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTForEach_property_save_var: + +.. rst-class:: classref-property + +String **save_var** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_save_var** **(** String value **)** +- String **get_save_var** **(** **)** + +A :ref:`Blackboard` variable used to store an element of the array referenced by :ref:`array_var`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btinvert.rst b/doc/source/classes/class_btinvert.rst new file mode 100644 index 0000000..48d84a1 --- /dev/null +++ b/doc/source/classes/class_btinvert.rst @@ -0,0 +1,30 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTInvert.xml. + +.. _class_BTInvert: + +BTInvert +======== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that transforms ``FAILURE`` into ``SUCCESS`` and ``SUCCESS`` into ``FAILURE``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTInvert transforms ``FAILURE`` into ``SUCCESS`` and ``SUCCESS`` into ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btnewscope.rst b/doc/source/classes/class_btnewscope.rst new file mode 100644 index 0000000..8fe6a9a --- /dev/null +++ b/doc/source/classes/class_btnewscope.rst @@ -0,0 +1,63 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTNewScope.xml. + +.. _class_BTNewScope: + +BTNewScope +========== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +**Inherited By:** :ref:`BTSubtree` + +BT decorator that creates a new :ref:`Blackboard` scope. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTNewScope creates a new :ref:`Blackboard` scope during initialization and populates it with data. See :ref:`Blackboard`. + +Returns the status of the child task execution. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------------+---------------------------------------------------------------------+--------+ + | Dictionary | :ref:`_blackboard_data` | ``{}`` | + +------------+---------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTNewScope_property__blackboard_data: + +.. rst-class:: classref-property + +Dictionary **_blackboard_data** = ``{}`` + +Data that is used to populate a new scope of the :ref:`Blackboard`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btparallel.rst b/doc/source/classes/class_btparallel.rst new file mode 100644 index 0000000..e792fb9 --- /dev/null +++ b/doc/source/classes/class_btparallel.rst @@ -0,0 +1,112 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTParallel.xml. + +.. _class_BTParallel: + +BTParallel +========== + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that executes all of its child tasks simultaneously. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTParallel executes all of its child tasks simultaneously. Note that BTParallel doesn't involve multithreading. It processes each task sequentially, from first to last, in the same tick before returning a result. If one of the abort criterea is met, any tasks currently ``RUNNING`` will be terminated, and the result will be either ``FAILURE`` or ``SUCCESS``. The :ref:`num_failures_required` determines when BTParallel fails and :ref:`num_successes_required` when it succeeds. When both are fullfilled, it gives priority to :ref:`num_failures_required`. + +If set to :ref:`repeat`, all child tasks will be re-executed each tick, regardless of whether they previously resulted in ``SUCCESS`` or ``FAILURE``. + +Returns ``FAILURE`` when the required number of child tasks result in ``FAILURE``. When :ref:`repeat` is set to ``false``, if none of the criteria were met and all child tasks resulted in either ``SUCCESS`` or ``FAILURE``, BTParallel will return ``FAILURE``. + +Returns ``SUCCESS`` when the required number of child tasks result in ``SUCCESS``. + +Returns ``RUNNING`` if none of the criterea were fulfilled, and either :ref:`repeat` is set to ``true`` or a child task resulted in ``RUNNING``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------+---------------------------------------------------------------------------------+-----------+ + | int | :ref:`num_failures_required` | ``1`` | + +------+---------------------------------------------------------------------------------+-----------+ + | int | :ref:`num_successes_required` | ``1`` | + +------+---------------------------------------------------------------------------------+-----------+ + | bool | :ref:`repeat` | ``false`` | + +------+---------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTParallel_property_num_failures_required: + +.. rst-class:: classref-property + +int **num_failures_required** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_num_failures_required** **(** int value **)** +- int **get_num_failures_required** **(** **)** + +If the specified number of child tasks return ``SUCCESS``, BTParallel will also return ``SUCCESS``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTParallel_property_num_successes_required: + +.. rst-class:: classref-property + +int **num_successes_required** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_num_successes_required** **(** int value **)** +- int **get_num_successes_required** **(** **)** + +If the specified number of child tasks return ``FAILURE``, BTParallel will also return ``FAILURE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTParallel_property_repeat: + +.. rst-class:: classref-property + +bool **repeat** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_repeat** **(** bool value **)** +- bool **get_repeat** **(** **)** + +When ``true``, the child tasks will be executed again, regardless of whether they previously resulted in a ``SUCCESS`` or ``FAILURE``. + +When ``false``, if none of the criteria were met, and all child tasks resulted in a ``SUCCESS`` or ``FAILURE``, BTParallel will return ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btpauseanimation.rst b/doc/source/classes/class_btpauseanimation.rst new file mode 100644 index 0000000..ab6fee3 --- /dev/null +++ b/doc/source/classes/class_btpauseanimation.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTPauseAnimation.xml. + +.. _class_BTPauseAnimation: + +BTPauseAnimation +================ + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that pauses the playback of an animation on the specified ``AnimationPlayer`` node. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTPauseAnimation action pauses the playback of an animation on the specified ``AnimationPlayer`` node and returns ``SUCCESS``. + +Returns ``FAILURE`` if the action fails to get the ``AnimationPlayer`` node. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------+ + | :ref:`BBNode` | :ref:`animation_player` | + +-----------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTPauseAnimation_property_animation_player: + +.. rst-class:: classref-property + +:ref:`BBNode` **animation_player** + +.. rst-class:: classref-property-setget + +- void **set_animation_player** **(** :ref:`BBNode` value **)** +- :ref:`BBNode` **get_animation_player** **(** **)** + +Parameter that specifies the ``AnimationPlayer`` node. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btplayanimation.rst b/doc/source/classes/class_btplayanimation.rst new file mode 100644 index 0000000..e5b3c51 --- /dev/null +++ b/doc/source/classes/class_btplayanimation.rst @@ -0,0 +1,165 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTPlayAnimation.xml. + +.. _class_BTPlayAnimation: + +BTPlayAnimation +=============== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that plays an animation on the specified ``AnimationPlayer`` node. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTPlayAnimation action plays an animation on the specified ``AnimationPlayer`` node. If the :ref:`await_completion` is greater than ``0``, the action will wait for the animation to complete, with the maximum waiting time equal to :ref:`await_completion`. + +Returns ``SUCCESS`` if the animation finishes playing or if the elapsed time exceeds :ref:`await_completion`. When :ref:`await_completion` is set to ``0``, BTPlayAnimation doesn't wait for the animation to finish and immediately returns ``SUCCESS``. + +Returns ``RUNNING`` if the animation is still playing and the elapsed time is less than :ref:`await_completion`. + +Returns ``FAILURE`` if the action fails to play the requested animation. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | StringName | :ref:`animation_name` | ``&""`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`BBNode` | :ref:`animation_player` | | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | float | :ref:`await_completion` | ``0.0`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | float | :ref:`blend` | ``-1.0`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | bool | :ref:`from_end` | ``false`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | float | :ref:`speed` | ``1.0`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTPlayAnimation_property_animation_name: + +.. rst-class:: classref-property + +StringName **animation_name** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_animation_name** **(** StringName value **)** +- StringName **get_animation_name** **(** **)** + +Animation's key within the ``AnimationPlayer`` node. If empty, BTPlayAnimation will resume the last played animation if the ``AnimationPlayer`` was previously paused. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayAnimation_property_animation_player: + +.. rst-class:: classref-property + +:ref:`BBNode` **animation_player** + +.. rst-class:: classref-property-setget + +- void **set_animation_player** **(** :ref:`BBNode` value **)** +- :ref:`BBNode` **get_animation_player** **(** **)** + +Parameter that specifies the ``AnimationPlayer`` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayAnimation_property_await_completion: + +.. rst-class:: classref-property + +float **await_completion** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_await_completion** **(** float value **)** +- float **get_await_completion** **(** **)** + +The maximum duration to wait for the animation to complete (in seconds). If the animation doesn't finish within this time, BTAwaitAnimation will return ``FAILURE``. If set to ``0``, BTPlayAnimation doesn't wait for the animation to finish and immediately returns ``SUCCESS``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayAnimation_property_blend: + +.. rst-class:: classref-property + +float **blend** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_blend** **(** float value **)** +- float **get_blend** **(** **)** + +Custom blend time (in seconds). See :ref:`AnimationPlayer.play`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayAnimation_property_from_end: + +.. rst-class:: classref-property + +bool **from_end** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_from_end** **(** bool value **)** +- bool **get_from_end** **(** **)** + +Play animation from the end. Used in combination with negative :ref:`speed` to play animation in reverse. See :ref:`AnimationPlayer.play`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayAnimation_property_speed: + +.. rst-class:: classref-property + +float **speed** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed** **(** float value **)** +- float **get_speed** **(** **)** + +Custom playback speed scaling ratio. See :ref:`AnimationPlayer.play`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btplayer.rst b/doc/source/classes/class_btplayer.rst new file mode 100644 index 0000000..a8eea4c --- /dev/null +++ b/doc/source/classes/class_btplayer.rst @@ -0,0 +1,285 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTPlayer.xml. + +.. _class_BTPlayer: + +BTPlayer +======== + +**Inherits:** + +Player of :ref:`BehaviorTree` resources. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTPlayer node is used for the instantiation and playback of :ref:`BehaviorTree` resources at runtime. During instantiation, the behavior tree instance is initialized with a reference to the agent and the :ref:`blackboard`. Agent is the owner of the BTPlayer node (see :ref:`Node.owner`). + +For an introduction to behavior trees, see :ref:`BehaviorTree`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | bool | :ref:`active` | ``true`` | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`BehaviorTree` | :ref:`behavior_tree` | | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`Blackboard` | :ref:`blackboard` | | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | bool | :ref:`monitor_performance` | ``false`` | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | bool | :ref:`prefetch_nodepath_vars` | ``true`` | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`UpdateMode` | :ref:`update_mode` | ``1`` | + +---------------------------------------------+-------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +------+-----------------------------------------------------------------------------------+ + | int | :ref:`get_last_status` **(** **)** |const| | + +------+-----------------------------------------------------------------------------------+ + | void | :ref:`restart` **(** **)** | + +------+-----------------------------------------------------------------------------------+ + | void | :ref:`update` **(** float p_delta **)** | + +------+-----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_BTPlayer_signal_behavior_tree_finished: + +.. rst-class:: classref-signal + +**behavior_tree_finished** **(** int p_status **)** + +Emitted when the behavior tree has finished executing and returned ``SUCCESS`` or ``FAILURE``. + +Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`Status`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_signal_updated: + +.. rst-class:: classref-signal + +**updated** **(** int p_status **)** + +Emitted when BTPlayer has finished the behavior tree update. + +Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`Status`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_BTPlayer_UpdateMode: + +.. rst-class:: classref-enumeration + +enum **UpdateMode**: + +.. _class_BTPlayer_constant_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **IDLE** = ``0`` + +Execute behavior tree during the idle process. + +.. _class_BTPlayer_constant_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **PHYSICS** = ``1`` + +Execute behavior tree during the physics process. + +.. _class_BTPlayer_constant_MANUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **MANUAL** = ``2`` + +Behavior tree is executed manually by calling :ref:`update`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTPlayer_property_active: + +.. rst-class:: classref-property + +bool **active** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_active** **(** bool value **)** +- bool **get_active** **(** **)** + +If ``true``, the behavior tree will be executed during update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_property_behavior_tree: + +.. rst-class:: classref-property + +:ref:`BehaviorTree` **behavior_tree** + +.. rst-class:: classref-property-setget + +- void **set_behavior_tree** **(** :ref:`BehaviorTree` value **)** +- :ref:`BehaviorTree` **get_behavior_tree** **(** **)** + +:ref:`BehaviorTree` resource to instantiate and execute at runtime. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_property_blackboard: + +.. rst-class:: classref-property + +:ref:`Blackboard` **blackboard** + +.. rst-class:: classref-property-setget + +- void **set_blackboard** **(** :ref:`Blackboard` value **)** +- :ref:`Blackboard` **get_blackboard** **(** **)** + +Holds data shared by the behavior tree tasks. See :ref:`Blackboard`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_property_monitor_performance: + +.. rst-class:: classref-property + +bool **monitor_performance** = ``false`` + +If ``true``, adds a performance monitor to "Debugger->Monitors" for each instance of this **BTPlayer** node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_property_prefetch_nodepath_vars: + +.. rst-class:: classref-property + +bool **prefetch_nodepath_vars** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_prefetch_nodepath_vars** **(** bool value **)** +- bool **get_prefetch_nodepath_vars** **(** **)** + +If ``true``, any ``NodePath`` variables in the :ref:`Blackboard` are replaced with ``Node`` references when the tree is instantiated. References are retrieved by calling :ref:`Node.get_node` on the agent instance (agent is the owner of the BTPlayer node). + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_property_update_mode: + +.. rst-class:: classref-property + +:ref:`UpdateMode` **update_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_update_mode** **(** :ref:`UpdateMode` value **)** +- :ref:`UpdateMode` **get_update_mode** **(** **)** + +Determines when the behavior tree is executed. See :ref:`UpdateMode`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BTPlayer_method_get_last_status: + +.. rst-class:: classref-method + +int **get_last_status** **(** **)** |const| + +Returns the behavior tree's last execution status. See :ref:`Status`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_method_restart: + +.. rst-class:: classref-method + +void **restart** **(** **)** + +Resets the behavior tree's execution. Each running task will be aborted and the next tree execution will start anew. This method does not reset :ref:`Blackboard`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTPlayer_method_update: + +.. rst-class:: classref-method + +void **update** **(** float p_delta **)** + +Executes the root task of the behavior tree instance if :ref:`active` is ``true``. Call this method when :ref:`update_mode` is set to :ref:`MANUAL`. When :ref:`update_mode` is not :ref:`MANUAL`, the :ref:`update` will be called automatically. See :ref:`UpdateMode`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btprobability.rst b/doc/source/classes/class_btprobability.rst new file mode 100644 index 0000000..a2e29ea --- /dev/null +++ b/doc/source/classes/class_btprobability.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTProbability.xml. + +.. _class_BTProbability: + +BTProbability +============= + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that executes its child task with a given probability. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTProbability executes its child task with a given probability defined by :ref:`run_chance`. + +Returns the result of the child task if it was executed; otherwise, it returns ``FAILURE``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------+------------------------------------------------------------+---------+ + | float | :ref:`run_chance` | ``0.5`` | + +-------+------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTProbability_property_run_chance: + +.. rst-class:: classref-property + +float **run_chance** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_run_chance** **(** float value **)** +- float **get_run_chance** **(** **)** + +Probability that defines how likely the child task will be executed. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btprobabilityselector.rst b/doc/source/classes/class_btprobabilityselector.rst new file mode 100644 index 0000000..306920e --- /dev/null +++ b/doc/source/classes/class_btprobabilityselector.rst @@ -0,0 +1,173 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTProbabilitySelector.xml. + +.. _class_BTProbabilitySelector: + +BTProbabilitySelector +===================== + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that chooses a child task to execute based on attached probabilities. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTProbabilitySelector chooses a child task to execute based on attached probabilities. It is typically used for decision-making purposes. Probability distribution is calculated based on weights assigned to each child task. + +Returns ``SUCCESS`` when a child task results in ``SUCCESS``. + +Returns ``RUNNING`` when a child task results in ``RUNNING``. + +The behavior of BTProbabilitySelector when a child task results in ``FAILURE`` depends on the :ref:`abort_on_failure` value: + +- If :ref:`abort_on_failure` is ``false``, when a child task results in ``FAILURE``, BTProbabilitySelector will normalize the probability distribution over the remaining children and choose a new child task to be executed. If all child tasks fail, the composite will return ``FAILURE``. + +- If :ref:`abort_on_failure` is ``true``, when a child task results in ``FAILURE``, BTProbabilitySelector will not choose another child task to be executed and will immediately return ``FAILURE``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------------+-----------+ + | bool | :ref:`abort_on_failure` | ``false`` | + +------+--------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------+-------------------------------------------------------------------------------------------------------------------------+ + | float | :ref:`get_probability` **(** int p_index **)** |const| | + +-------+-------------------------------------------------------------------------------------------------------------------------+ + | float | :ref:`get_total_weight` **(** **)** |const| | + +-------+-------------------------------------------------------------------------------------------------------------------------+ + | float | :ref:`get_weight` **(** int p_index **)** |const| | + +-------+-------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`has_probability` **(** int p_index **)** |const| | + +-------+-------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_probability` **(** int p_index, float p_probability **)** | + +-------+-------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_weight` **(** int p_index, float p_weight **)** | + +-------+-------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTProbabilitySelector_property_abort_on_failure: + +.. rst-class:: classref-property + +bool **abort_on_failure** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_abort_on_failure** **(** bool value **)** +- bool **get_abort_on_failure** **(** **)** + +If ``true``, BTProbabilitySelector will not choose another child to execute and will return ``FAILURE`` when a child task results in ``FAILURE``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BTProbabilitySelector_method_get_probability: + +.. rst-class:: classref-method + +float **get_probability** **(** int p_index **)** |const| + +Returns the child task's selection probability. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTProbabilitySelector_method_get_total_weight: + +.. rst-class:: classref-method + +float **get_total_weight** **(** **)** |const| + +Returns the total weight of all child tasks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTProbabilitySelector_method_get_weight: + +.. rst-class:: classref-method + +float **get_weight** **(** int p_index **)** |const| + +Returns the child task's weight within the weighted probability selection algorithm. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTProbabilitySelector_method_has_probability: + +.. rst-class:: classref-method + +bool **has_probability** **(** int p_index **)** |const| + +Returns whether the child task at index ``p_index`` participates within the weighted probability selection algorithm and has a probability assigned to it. Returns ``false`` for :ref:`BTComment` tasks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTProbabilitySelector_method_set_probability: + +.. rst-class:: classref-method + +void **set_probability** **(** int p_index, float p_probability **)** + +Sets the child task's weight calculated based on the desired probability. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTProbabilitySelector_method_set_weight: + +.. rst-class:: classref-method + +void **set_weight** **(** int p_index, float p_weight **)** + +Sets the child task's weight for the weighted probability selection algorithm. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrandomselector.rst b/doc/source/classes/class_btrandomselector.rst new file mode 100644 index 0000000..0f1ef72 --- /dev/null +++ b/doc/source/classes/class_btrandomselector.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRandomSelector.xml. + +.. _class_BTRandomSelector: + +BTRandomSelector +================ + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that executes tasks in random order until first ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRandomSelector executes its child tasks in a random order until any child returns ``SUCCESS``. If a child task results in ``FAILURE``, BTRandomSelector will immediately execute another child task until one of them returns ``SUCCESS`` or all of them result in ``FAILURE``. + +Returns ``RUNNING`` if a child task results in ``RUNNING``. BTRandomSelector will remember the execution order and the last child task that returned ``RUNNING``, ensuring it resumes from that point in the next tick. + +Returns ``FAILURE`` if all child tasks result in ``FAILURE``. + +Returns ``SUCCESS`` if a child task results in ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrandomsequence.rst b/doc/source/classes/class_btrandomsequence.rst new file mode 100644 index 0000000..a80b5c6 --- /dev/null +++ b/doc/source/classes/class_btrandomsequence.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRandomSequence.xml. + +.. _class_BTRandomSequence: + +BTRandomSequence +================ + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that executes tasks in random order as long as they return ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRandomSequence executes its child tasks in a random order as long as they return ``SUCCESS``. If a child task results in ``SUCCESS``, BTRandomSequence will immediately execute the next child task until one of them returns ``FAILURE`` or all of them result in ``SUCCESS``. + +Returns ``RUNNING`` if a child task results in ``RUNNING``. BTRandomSequence will remember the execution order and the last child task that returned ``RUNNING``, ensuring it resumes from that point in the next tick. + +Returns ``FAILURE`` if a child task results in ``FAILURE``. + +Returns ``SUCCESS`` if all child tasks result in ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrandomwait.rst b/doc/source/classes/class_btrandomwait.rst new file mode 100644 index 0000000..c2da9e0 --- /dev/null +++ b/doc/source/classes/class_btrandomwait.rst @@ -0,0 +1,83 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRandomWait.xml. + +.. _class_BTRandomWait: + +BTRandomWait +============ + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that waits for a randomized duration to elapse and then returns ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRandomWait action waits for a randomized duration to elapse and then returns ``SUCCESS``. The duration is randomized within the specified range, defined by :ref:`min_duration` and :ref:`max_duration`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------+---------------------------------------------------------------+---------+ + | float | :ref:`max_duration` | ``2.0`` | + +-------+---------------------------------------------------------------+---------+ + | float | :ref:`min_duration` | ``1.0`` | + +-------+---------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTRandomWait_property_max_duration: + +.. rst-class:: classref-property + +float **max_duration** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_duration** **(** float value **)** +- float **get_max_duration** **(** **)** + +Maximum duration for the wait. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTRandomWait_property_min_duration: + +.. rst-class:: classref-property + +float **min_duration** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_min_duration** **(** float value **)** +- float **get_min_duration** **(** **)** + +Minimum duration for the wait. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrepeat.rst b/doc/source/classes/class_btrepeat.rst new file mode 100644 index 0000000..3a879e9 --- /dev/null +++ b/doc/source/classes/class_btrepeat.rst @@ -0,0 +1,108 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRepeat.xml. + +.. _class_BTRepeat: + +BTRepeat +======== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that repeats its child a specified number of :ref:`times`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRepeat iterates its child task a specified number of times, as defined by :ref:`times`. If :ref:`forever` is ``true``, the child's execution will be repeated indefinitely. + +Returns ``RUNNING`` if the child task results in ``RUNNING``. If :ref:`forever` is ``true``, BTRepeat will always return ``RUNNING``. + +Returns ``SUCCESS`` if the specified number of successful executions is reached. If :ref:`abort_on_failure` is ``false``, a ``FAILURE`` status returned by the child is also considered a successful execution. + +Returns ``FAILURE`` if the child task results in ``FAILURE`` when :ref:`abort_on_failure` is ``true``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------+-------------------------------------------------------------------+-----------+ + | bool | :ref:`abort_on_failure` | ``false`` | + +------+-------------------------------------------------------------------+-----------+ + | bool | :ref:`forever` | ``false`` | + +------+-------------------------------------------------------------------+-----------+ + | int | :ref:`times` | ``1`` | + +------+-------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTRepeat_property_abort_on_failure: + +.. rst-class:: classref-property + +bool **abort_on_failure** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_abort_on_failure** **(** bool value **)** +- bool **get_abort_on_failure** **(** **)** + +If ``false``, ``FAILURE`` status returned by the child task is also considered as a successful execution. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTRepeat_property_forever: + +.. rst-class:: classref-property + +bool **forever** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_forever** **(** bool value **)** +- bool **get_forever** **(** **)** + +If ``true``, the child's execution will be repeated indefinitely, always returning ``RUNNING``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTRepeat_property_times: + +.. rst-class:: classref-property + +int **times** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_times** **(** int value **)** +- int **get_times** **(** **)** + +The number of times to repeat execution of the child task. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrepeatuntilfailure.rst b/doc/source/classes/class_btrepeatuntilfailure.rst new file mode 100644 index 0000000..583cb56 --- /dev/null +++ b/doc/source/classes/class_btrepeatuntilfailure.rst @@ -0,0 +1,34 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRepeatUntilFailure.xml. + +.. _class_BTRepeatUntilFailure: + +BTRepeatUntilFailure +==================== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that repeats its child task until ``FAILURE``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRepeatUntilFailure repeats its child task until it results in ``FAILURE``. + +Returns ``RUNNING`` if the child task results in ``RUNNING`` or ``SUCCESS``. + +Returns ``SUCCESS`` if the child task results in ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrepeatuntilsuccess.rst b/doc/source/classes/class_btrepeatuntilsuccess.rst new file mode 100644 index 0000000..d2268b8 --- /dev/null +++ b/doc/source/classes/class_btrepeatuntilsuccess.rst @@ -0,0 +1,34 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRepeatUntilSuccess.xml. + +.. _class_BTRepeatUntilSuccess: + +BTRepeatUntilSuccess +==================== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that repeats its child task until ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRepeatUntilSuccess repeats its child task until it results in ``SUCCESS``. + +Returns ``RUNNING`` if the child task results in ``RUNNING`` or ``FAILURE``. + +Returns ``SUCCESS`` if the child task results in ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btrunlimit.rst b/doc/source/classes/class_btrunlimit.rst new file mode 100644 index 0000000..64e7762 --- /dev/null +++ b/doc/source/classes/class_btrunlimit.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTRunLimit.xml. + +.. _class_BTRunLimit: + +BTRunLimit +========== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that restricts the execution of its child a limited number of times. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTRunLimit restricts the execution of the child task to a maximum number of times, defined by :ref:`run_limit`. + +Returns ``FAILURE`` if the limit on executions is exceeded; otherwise, it returns the status of the child task. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----+-------------------------------------------------------+-------+ + | int | :ref:`run_limit` | ``1`` | + +-----+-------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTRunLimit_property_run_limit: + +.. rst-class:: classref-property + +int **run_limit** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_run_limit** **(** int value **)** +- int **get_run_limit** **(** **)** + +The maximum number of times the child is permitted to be executed. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btselector.rst b/doc/source/classes/class_btselector.rst new file mode 100644 index 0000000..eecda2e --- /dev/null +++ b/doc/source/classes/class_btselector.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTSelector.xml. + +.. _class_BTSelector: + +BTSelector +========== + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that sequentially executes tasks until first ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTSelector executes its child tasks sequentially, from first to last, until any child returns ``SUCCESS``. If a child task results in ``FAILURE``, BTSelector will immediately execute the next child task until one of them returns ``SUCCESS`` or all of them result in ``FAILURE``. BTSelector and :ref:`BTSequence` are two of the most common building blocks of behavior trees. Essentially, while :ref:`BTSequence` is similar to a boolean AND operation, BTSelector is similar to a boolean OR operation. Selectors enable the behavior tree to respond to changes in the environment and trigger transitions between various fallback behaviors. + +Returns ``RUNNING`` if a child task results in ``RUNNING``. BTSelector will remember the last child task that returned ``RUNNING``, ensuring it resumes from that point in the next execution tick. + +Returns ``SUCCESS`` if a child task results in ``SUCCESS``. + +Returns ``FAILURE`` if all child tasks result in ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btsequence.rst b/doc/source/classes/class_btsequence.rst new file mode 100644 index 0000000..56d6086 --- /dev/null +++ b/doc/source/classes/class_btsequence.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTSequence.xml. + +.. _class_BTSequence: + +BTSequence +========== + +**Inherits:** :ref:`BTComposite` **<** :ref:`BTTask` **<** :ref:`BT` + +BT composite that sequentially executes tasks as long as they return ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTSequence executes its child tasks sequentially, from first to last, as long as they return ``SUCCESS``. If a child task results in ``SUCCESS``, BTSequence will immediately execute the next child task until one of them returns ``FAILURE`` or all of them result in ``SUCCESS``. BTSequence and :ref:`BTSelector` are two of the most common building blocks of behavior trees. Essentially, while :ref:`BTSelector` is similar to a boolean OR operation, BTSequence is similar to a boolean AND operation. Sequences enable the behavior tree to compose complex behaviors from a chain of simpler tasks. + +Returns ``RUNNING`` if any child task results in ``RUNNING``. BTSequence will remember the last child task that returned ``RUNNING``, ensuring it resumes from that point in the next execution tick. + +Returns ``SUCCESS`` if all child tasks result in ``SUCCESS``. + +Returns ``FAILURE`` if a child task results in ``FAILURE``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btsetagentproperty.rst b/doc/source/classes/class_btsetagentproperty.rst new file mode 100644 index 0000000..2367619 --- /dev/null +++ b/doc/source/classes/class_btsetagentproperty.rst @@ -0,0 +1,106 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTSetAgentProperty.xml. + +.. _class_BTSetAgentProperty: + +BTSetAgentProperty +================== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that assigns a value to the specified agent's property. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTSetAgentProperty assigns the specified :ref:`value` to the agent's property identified by the :ref:`property` and returns ``SUCCESS``. Optionally, it can perform a specific :ref:`operation` before assignment. + +Returns ``FAILURE`` if it fails to set the property. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------------+---------+ + | :ref:`Operation` | :ref:`operation` | ``0`` | + +-----------------------------------------------+---------------------------------------------------------------+---------+ + | StringName | :ref:`property` | ``&""`` | + +-----------------------------------------------+---------------------------------------------------------------+---------+ + | :ref:`BBVariant` | :ref:`value` | | + +-----------------------------------------------+---------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTSetAgentProperty_property_operation: + +.. rst-class:: classref-property + +:ref:`Operation` **operation** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operation** **(** :ref:`Operation` value **)** +- :ref:`Operation` **get_operation** **(** **)** + +Specifies the operation to be performed before assignment. Operation is executed as follows: + +\ ``property = property OPERATION value`` + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTSetAgentProperty_property_property: + +.. rst-class:: classref-property + +StringName **property** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_property** **(** StringName value **)** +- StringName **get_property** **(** **)** + +Parameter that specifies the agent's property name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTSetAgentProperty_property_value: + +.. rst-class:: classref-property + +:ref:`BBVariant` **value** + +.. rst-class:: classref-property-setget + +- void **set_value** **(** :ref:`BBVariant` value **)** +- :ref:`BBVariant` **get_value** **(** **)** + +Parameter that specifies the value that will be assigned to agent's property. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btsetvar.rst b/doc/source/classes/class_btsetvar.rst new file mode 100644 index 0000000..7b27305 --- /dev/null +++ b/doc/source/classes/class_btsetvar.rst @@ -0,0 +1,106 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTSetVar.xml. + +.. _class_BTSetVar: + +BTSetVar +======== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that assigns :ref:`value` to the :ref:`variable` and then returns ``SUCCESS``. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTSetVar assigns :ref:`value` to the :ref:`variable` and then returns ``SUCCESS``. Optionally, it can perform a specific :ref:`operation` before assignment. + +Returns ``FAILURE`` if it fails to set the :ref:`variable`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------+--------+ + | :ref:`Operation` | :ref:`operation` | ``0`` | + +-----------------------------------------------+-----------------------------------------------------+--------+ + | :ref:`BBVariant` | :ref:`value` | | + +-----------------------------------------------+-----------------------------------------------------+--------+ + | String | :ref:`variable` | ``""`` | + +-----------------------------------------------+-----------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTSetVar_property_operation: + +.. rst-class:: classref-property + +:ref:`Operation` **operation** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operation** **(** :ref:`Operation` value **)** +- :ref:`Operation` **get_operation** **(** **)** + +Specifies the operation to be performed before assignment. Operation is executed as follows: + +\ ``variable = variable OPERATION value`` + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTSetVar_property_value: + +.. rst-class:: classref-property + +:ref:`BBVariant` **value** + +.. rst-class:: classref-property-setget + +- void **set_value** **(** :ref:`BBVariant` value **)** +- :ref:`BBVariant` **get_value** **(** **)** + +Parameter that specifies the value to be assigned to the variable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTSetVar_property_variable: + +.. rst-class:: classref-property + +String **variable** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_variable** **(** String value **)** +- String **get_variable** **(** **)** + +Name of the variable to which the value will be assigned. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btstate.rst b/doc/source/classes/class_btstate.rst new file mode 100644 index 0000000..686deec --- /dev/null +++ b/doc/source/classes/class_btstate.rst @@ -0,0 +1,102 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTState.xml. + +.. _class_BTState: + +BTState +======= + +**Inherits:** :ref:`LimboState` + +A state node for :ref:`LimboHSM` that hosts a :ref:`BehaviorTree`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTState is a :ref:`LimboState` node that manages a :ref:`BehaviorTree` to provide behavior logic for the state. It instantiates and runs the :ref:`BehaviorTree` resource, dispatching a state machine event upon ``SUCCESS`` or ``FAILURE``. Event names are customizable through :ref:`success_event` and :ref:`failure_event`. For further details on state machine events, see :ref:`LimboState.dispatch`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------+------------------------------------------------------------+---------------+ + | :ref:`BehaviorTree` | :ref:`behavior_tree` | | + +-----------------------------------------+------------------------------------------------------------+---------------+ + | String | :ref:`failure_event` | ``"failure"`` | + +-----------------------------------------+------------------------------------------------------------+---------------+ + | String | :ref:`success_event` | ``"success"`` | + +-----------------------------------------+------------------------------------------------------------+---------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTState_property_behavior_tree: + +.. rst-class:: classref-property + +:ref:`BehaviorTree` **behavior_tree** + +.. rst-class:: classref-property-setget + +- void **set_behavior_tree** **(** :ref:`BehaviorTree` value **)** +- :ref:`BehaviorTree` **get_behavior_tree** **(** **)** + +A :ref:`BehaviorTree` resource that defines state behavior. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTState_property_failure_event: + +.. rst-class:: classref-property + +String **failure_event** = ``"failure"`` + +.. rst-class:: classref-property-setget + +- void **set_failure_event** **(** String value **)** +- String **get_failure_event** **(** **)** + +HSM event that will be dispatched when the behavior tree results in ``FAILURE``. See :ref:`LimboState.dispatch`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTState_property_success_event: + +.. rst-class:: classref-property + +String **success_event** = ``"success"`` + +.. rst-class:: classref-property-setget + +- void **set_success_event** **(** String value **)** +- String **get_success_event** **(** **)** + +HSM event that will be dispatched when the behavior tree results in ``SUCCESS``. See :ref:`LimboState.dispatch`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btstopanimation.rst b/doc/source/classes/class_btstopanimation.rst new file mode 100644 index 0000000..5eafccc --- /dev/null +++ b/doc/source/classes/class_btstopanimation.rst @@ -0,0 +1,104 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTStopAnimation.xml. + +.. _class_BTStopAnimation: + +BTStopAnimation +=============== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that stops the playback of an animation on the specified ``AnimationPlayer`` node. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTStopAnimation action stops the playback of an animation on the specified ``AnimationPlayer`` node and returns ``SUCCESS``. If :ref:`animation_name` is set, it will only stop the playback if the specified animation is currently playing. + +Returns ``FAILURE`` if the action fails to get the ``AnimationPlayer`` node. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | StringName | :ref:`animation_name` | ``&""`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`BBNode` | :ref:`animation_player` | | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + | bool | :ref:`keep_state` | ``false`` | + +-----------------------------+--------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTStopAnimation_property_animation_name: + +.. rst-class:: classref-property + +StringName **animation_name** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_animation_name** **(** StringName value **)** +- StringName **get_animation_name** **(** **)** + +Animation's key within the ``AnimationPlayer`` node. If not empty, BTStopAnimation will only stop the playback if the specified animation is currently playing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTStopAnimation_property_animation_player: + +.. rst-class:: classref-property + +:ref:`BBNode` **animation_player** + +.. rst-class:: classref-property-setget + +- void **set_animation_player** **(** :ref:`BBNode` value **)** +- :ref:`BBNode` **get_animation_player** **(** **)** + +Parameter that specifies the ``AnimationPlayer`` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTStopAnimation_property_keep_state: + +.. rst-class:: classref-property + +bool **keep_state** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_keep_state** **(** bool value **)** +- bool **get_keep_state** **(** **)** + +If ``true``, the animation state is not updated visually. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btsubtree.rst b/doc/source/classes/class_btsubtree.rst new file mode 100644 index 0000000..a04ef1e --- /dev/null +++ b/doc/source/classes/class_btsubtree.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTSubtree.xml. + +.. _class_BTSubtree: + +BTSubtree +========= + +**Inherits:** :ref:`BTNewScope` **<** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that instantiates and runs a subtree within the larger tree. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTSubtree instantiates a :ref:`BehaviorTree` and includes its root task as a child during initialization, while also creating a new :ref:`Blackboard` scope. + +Returns the status of the subtree's execution. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------+--------------------------------------------------+ + | :ref:`BehaviorTree` | :ref:`subtree` | + +-----------------------------------------+--------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTSubtree_property_subtree: + +.. rst-class:: classref-property + +:ref:`BehaviorTree` **subtree** + +.. rst-class:: classref-property-setget + +- void **set_subtree** **(** :ref:`BehaviorTree` value **)** +- :ref:`BehaviorTree` **get_subtree** **(** **)** + +A :ref:`BehaviorTree` resource that will be instantiated as a subtree. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bttask.rst b/doc/source/classes/class_bttask.rst new file mode 100644 index 0000000..53c42c7 --- /dev/null +++ b/doc/source/classes/class_bttask.rst @@ -0,0 +1,546 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTTask.xml. + +.. _class_BTTask: + +BTTask +====== + +**Inherits:** :ref:`BT` + +**Inherited By:** :ref:`BTAction`, :ref:`BTComment`, :ref:`BTComposite`, :ref:`BTCondition`, :ref:`BTDecorator` + +Base class for all :ref:`BehaviorTree` tasks. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for all :ref:`BehaviorTree` tasks. A task is a basic building block in a :ref:`BehaviorTree` that represents a specific behavior or control flow. Tasks are used to create complex behaviors by combining and nesting them in a hierarchy. + +A task can be one of the following types: action, condition, composite, or decorator. Each type of task has its own corresponding subclass: :ref:`BTAction`, :ref:`BTCondition`, :ref:`BTDecorator`, :ref:`BTComposite`. + +Tasks perform their work and return their status using the :ref:`_tick` method. Status values are defined in :ref:`Status`. Tasks can be initialized using the :ref:`_setup` method. See also :ref:`_enter` & :ref:`_exit`. + +\ **Note:** Do not extend **BTTask** directly for your own tasks. Instead, extend one of the subtypes mentioned above. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+---------------------------------------------------------+--------+ + | Node | :ref:`agent` | | + +-------------------------------------+---------------------------------------------------------+--------+ + | :ref:`Blackboard` | :ref:`blackboard` | | + +-------------------------------------+---------------------------------------------------------+--------+ + | String | :ref:`custom_name` | ``""`` | + +-------------------------------------+---------------------------------------------------------+--------+ + | float | :ref:`elapsed_time` | | + +-------------------------------------+---------------------------------------------------------+--------+ + | :ref:`Status` | :ref:`status` | | + +-------------------------------------+---------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_enter` **(** **)** |virtual| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_exit` **(** **)** |virtual| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | String | :ref:`_generate_name` **(** **)** |virtual| |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | PackedStringArray | :ref:`_get_configuration_warning` **(** **)** |virtual| |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup` **(** **)** |virtual| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`_tick` **(** float p_delta **)** |virtual| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`abort` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_child` **(** :ref:`BTTask` p_child **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_child_at_index` **(** :ref:`BTTask` p_child, int p_idx **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`clone` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`execute` **(** float p_delta **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_child` **(** int p_idx **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | int | :ref:`get_child_count` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | int | :ref:`get_child_count_excluding_comments` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | int | :ref:`get_index` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_parent` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`get_root` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | String | :ref:`get_task_name` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`has_child` **(** :ref:`BTTask` p_child **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`initialize` **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`is_descendant_of` **(** :ref:`BTTask` p_task **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`is_root` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BTTask` | :ref:`next_sibling` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`print_tree` **(** int p_initial_tabs=0 **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_child` **(** :ref:`BTTask` p_child **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_child_at_index` **(** int p_idx **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTTask_property_agent: + +.. rst-class:: classref-property + +Node **agent** + +.. rst-class:: classref-property-setget + +- void **set_agent** **(** Node value **)** +- Node **get_agent** **(** **)** + +The agent is a contextual object for the task's :ref:`BehaviorTree` instance. Usually, agent is the owner of the :ref:`BTPlayer` node containing the :ref:`BehaviorTree` resource. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_property_blackboard: + +.. rst-class:: classref-property + +:ref:`Blackboard` **blackboard** + +.. rst-class:: classref-property-setget + +- :ref:`Blackboard` **get_blackboard** **(** **)** + +Provides access to the :ref:`Blackboard`. Blackboard is used to share data among tasks of the associated :ref:`BehaviorTree`. + +See :ref:`Blackboard` for additional info. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_property_custom_name: + +.. rst-class:: classref-property + +String **custom_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_custom_name** **(** String value **)** +- String **get_custom_name** **(** **)** + +User-provided name for the task. If not empty, it is used by the editor to represent the task. See :ref:`get_task_name`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_property_elapsed_time: + +.. rst-class:: classref-property + +float **elapsed_time** + +.. rst-class:: classref-property-setget + +- float **get_elapsed_time** **(** **)** + +Elapsed time since the task was "entered". See :ref:`_enter`. + +Returns ``0`` when task is not ``RUNNING``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_property_status: + +.. rst-class:: classref-property + +:ref:`Status` **status** + +.. rst-class:: classref-property-setget + +- :ref:`Status` **get_status** **(** **)** + +Last execution :ref:`Status` returned by :ref:`_tick`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BTTask_private_method__enter: + +.. rst-class:: classref-method + +void **_enter** **(** **)** |virtual| + +Called when task is "entered", i.e. when task is executed while not having a ``RUNNING`` :ref:`status`. + +It is called before :ref:`_tick` in the execution order. This method is used when preparation is needed before main work begins, usually when it takes more than one tick to finish the task. See also :ref:`execute`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_private_method__exit: + +.. rst-class:: classref-method + +void **_exit** **(** **)** |virtual| + +Called when task is "exited", i.e. after :ref:`_tick` returns ``SUCCESS`` or ``FAILURE`` status. See also :ref:`execute`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_private_method__generate_name: + +.. rst-class:: classref-method + +String **_generate_name** **(** **)** |virtual| |const| + +Called to generate a display name for the task unless :ref:`custom_name` is set. See :ref:`get_task_name`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_private_method__get_configuration_warning: + +.. rst-class:: classref-method + +PackedStringArray **_get_configuration_warning** **(** **)** |virtual| |const| + +The string returned by this method is shown as a warning message in the behavior tree editor. Any task script that overrides this method must include ``@tool`` annotation at the top of the file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_private_method__setup: + +.. rst-class:: classref-method + +void **_setup** **(** **)** |virtual| + +Called to initialize a task during initialization step. It is called only once before the task's first execution tick. This method allows you to set up any necessary state or configurations for the task before it begins executing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_private_method__tick: + +.. rst-class:: classref-method + +:ref:`Status` **_tick** **(** float p_delta **)** |virtual| + +Called when task is "ticked", i.e. executed by :ref:`BTPlayer` or :ref:`BTState` during an update. + +Returns execution status as defined in :ref:`Status`. + +\ **Note:** Tasks perform their main function by implementing this method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_abort: + +.. rst-class:: classref-method + +void **abort** **(** **)** + +Resets the task and its children recursively. If a task is in the ``RUNNING`` state, it is exited and its status is reset to ``FRESH``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_add_child: + +.. rst-class:: classref-method + +void **add_child** **(** :ref:`BTTask` p_child **)** + +Adds a child task. The ``p_child`` is placed at the end of the children list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_add_child_at_index: + +.. rst-class:: classref-method + +void **add_child_at_index** **(** :ref:`BTTask` p_child, int p_idx **)** + +Adds a child task. The ``p_child`` is placed at ``p_idx`` position in the children list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_clone: + +.. rst-class:: classref-method + +:ref:`BTTask` **clone** **(** **)** |const| + +Duplicates the task and its children, copying the exported members. Sub-resources are shared for efficiency, except for :ref:`BBParam` subtypes, which are always copied. Used by the editor to instantiate :ref:`BehaviorTree` and copy-paste tasks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_execute: + +.. rst-class:: classref-method + +:ref:`Status` **execute** **(** float p_delta **)** + +Performs task's execution. The execution follows a specific sequence: + +- If task's current :ref:`status` is not ``RUNNING``, the :ref:`_enter` method is called first. + +- Next, the :ref:`_tick` method is called next to perform the task's work. + +- If the :ref:`_tick` method returns ``SUCCESS`` or ``FAILURE`` status, the :ref:`_exit` method will be called next as part of the execution cleanup. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_child: + +.. rst-class:: classref-method + +:ref:`BTTask` **get_child** **(** int p_idx **)** |const| + +Returns a child task by specifying its index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_child_count: + +.. rst-class:: classref-method + +int **get_child_count** **(** **)** |const| + +Returns the number of child tasks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_child_count_excluding_comments: + +.. rst-class:: classref-method + +int **get_child_count_excluding_comments** **(** **)** |const| + +Returns the number of child tasks not counting :ref:`BTComment` tasks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_index: + +.. rst-class:: classref-method + +int **get_index** **(** **)** |const| + +Returns the task's position in the behavior tree branch. Returns ``-1`` if the task doesn't belong to a task tree, i.e. doesn't have a parent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_parent: + +.. rst-class:: classref-method + +:ref:`BTTask` **get_parent** **(** **)** |const| + +Returns the task's parent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_root: + +.. rst-class:: classref-method + +:ref:`BTTask` **get_root** **(** **)** |const| + +Returns the root task of the behavior tree. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_get_task_name: + +.. rst-class:: classref-method + +String **get_task_name** **(** **)** + +The string returned by this method is used to represent the task in the editor. + +Method :ref:`_generate_name` is called to generate a display name for the task unless :ref:`custom_name` is set. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_has_child: + +.. rst-class:: classref-method + +bool **has_child** **(** :ref:`BTTask` p_child **)** |const| + +Returns ``true`` if ``p_child`` is a child of this task. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_initialize: + +.. rst-class:: classref-method + +void **initialize** **(** Node p_agent, :ref:`Blackboard` p_blackboard **)** + +Initilizes the task. Assigns :ref:`agent` and :ref:`blackboard`, and calls :ref:`_setup` for the task and its children. + +The method is called recursively for each child task. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_is_descendant_of: + +.. rst-class:: classref-method + +bool **is_descendant_of** **(** :ref:`BTTask` p_task **)** |const| + +Returns ``true`` if this task is a descendant of ``p_task``. In other words, this task must be a child of ``p_task`` or one of its children or grandchildren. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_is_root: + +.. rst-class:: classref-method + +bool **is_root** **(** **)** |const| + +Returns ``true`` if this task is the root task of its behavior tree. A behavior tree can have only one root task. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_next_sibling: + +.. rst-class:: classref-method + +:ref:`BTTask` **next_sibling** **(** **)** |const| + +Returns the next task after this task in the parent's children list. + +Returns ``null`` if this task has no parent or it is the last child in the parent's children list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_print_tree: + +.. rst-class:: classref-method + +void **print_tree** **(** int p_initial_tabs=0 **)** + +Prints the subtree that starts with this task to the console. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_remove_child: + +.. rst-class:: classref-method + +void **remove_child** **(** :ref:`BTTask` p_child **)** + +Removes ``p_child`` task from children. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BTTask_method_remove_child_at_index: + +.. rst-class:: classref-method + +void **remove_child_at_index** **(** int p_idx **)** + +Removes a child task at a specified index from children. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_bttimelimit.rst b/doc/source/classes/class_bttimelimit.rst new file mode 100644 index 0000000..e092aa2 --- /dev/null +++ b/doc/source/classes/class_bttimelimit.rst @@ -0,0 +1,66 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTTimeLimit.xml. + +.. _class_BTTimeLimit: + +BTTimeLimit +=========== + +**Inherits:** :ref:`BTDecorator` **<** :ref:`BTTask` **<** :ref:`BT` + +BT decorator that sets a time limit for its child's execution. + +.. rst-class:: classref-introduction-group + +Description +----------- + +BTTimeLimit allocates a limited time for the child's execution and aborts it, returning ``FAILURE`` if the :ref:`time_limit` is exceeded. + +Returns ``FAILURE`` if the :ref:`time_limit` is exceeded; otherwise, it returns the status of the child task. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------+----------------------------------------------------------+---------+ + | float | :ref:`time_limit` | ``5.0`` | + +-------+----------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTTimeLimit_property_time_limit: + +.. rst-class:: classref-property + +float **time_limit** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_limit** **(** float value **)** +- float **get_time_limit** **(** **)** + +Time allocated for the child task's execution. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btwait.rst b/doc/source/classes/class_btwait.rst new file mode 100644 index 0000000..1f9a202 --- /dev/null +++ b/doc/source/classes/class_btwait.rst @@ -0,0 +1,59 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTWait.xml. + +.. _class_BTWait: + +BTWait +====== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that waits for a specified :ref:`duration` to elapse and then returns ``SUCCESS``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------+-------------------------------------------------+---------+ + | float | :ref:`duration` | ``1.0`` | + +-------+-------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTWait_property_duration: + +.. rst-class:: classref-property + +float **duration** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_duration** **(** float value **)** +- float **get_duration** **(** **)** + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_btwaitticks.rst b/doc/source/classes/class_btwaitticks.rst new file mode 100644 index 0000000..e6f5cd3 --- /dev/null +++ b/doc/source/classes/class_btwaitticks.rst @@ -0,0 +1,57 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTWaitTicks.xml. + +.. _class_BTWaitTicks: + +BTWaitTicks +=========== + +**Inherits:** :ref:`BTAction` **<** :ref:`BTTask` **<** :ref:`BT` + +BT action that waits for a specified number of ticks to elapse and then returns ``SUCCESS``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----+--------------------------------------------------------+-------+ + | int | :ref:`num_ticks` | ``1`` | + +-----+--------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BTWaitTicks_property_num_ticks: + +.. rst-class:: classref-property + +int **num_ticks** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_num_ticks** **(** int value **)** +- int **get_num_ticks** **(** **)** + +The number of ticks to wait before returning ``SUCCESS``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_limbohsm.rst b/doc/source/classes/class_limbohsm.rst new file mode 100644 index 0000000..6ceab9a --- /dev/null +++ b/doc/source/classes/class_limbohsm.rst @@ -0,0 +1,256 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/LimboHSM.xml. + +.. _class_LimboHSM: + +LimboHSM +======== + +**Inherits:** :ref:`LimboState` + +Event-based Hierarchical State Machine (HSM). + +.. rst-class:: classref-introduction-group + +Description +----------- + +Event-based Hierarchical State Machine (HSM) that manages :ref:`LimboState` instances and facilitates transitions between them. LimboHSM is a :ref:`LimboState` in itself and can also serve as a child of another LimboHSM node. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`LimboState` | :ref:`ANYSTATE` | | + +---------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`LimboState` | :ref:`initial_state` | | + +---------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`UpdateMode` | :ref:`update_mode` | ``1`` | + +---------------------------------------------+-------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_transition` **(** Node p_from_state, Node p_to_state, String p_event **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`get_active_state` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`get_leaf_state` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`initialize` **(** Node p_agent, :ref:`Blackboard` p_parent_scope=null **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_active` **(** bool p_active **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update` **(** float p_delta **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_LimboHSM_signal_state_changed: + +.. rst-class:: classref-signal + +**state_changed** **(** :ref:`LimboState` p_state **)** + +Emitted when the currently active substate is switched to a different substate. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_LimboHSM_UpdateMode: + +.. rst-class:: classref-enumeration + +enum **UpdateMode**: + +.. _class_LimboHSM_constant_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **IDLE** = ``0`` + +Update the state machine during the idle process. + +.. _class_LimboHSM_constant_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **PHYSICS** = ``1`` + +Update the state machine during the physics process. + +.. _class_LimboHSM_constant_MANUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **MANUAL** = ``2`` + +Manually update the state machine by calling :ref:`update` from a script. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_LimboHSM_property_ANYSTATE: + +.. rst-class:: classref-property + +:ref:`LimboState` **ANYSTATE** + +.. rst-class:: classref-property-setget + +- :ref:`LimboState` **anystate** **(** **)** + +Useful for defining a transition from any state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_property_initial_state: + +.. rst-class:: classref-property + +:ref:`LimboState` **initial_state** + +.. rst-class:: classref-property-setget + +- void **set_initial_state** **(** :ref:`LimboState` value **)** +- :ref:`LimboState` **get_initial_state** **(** **)** + +The substate that becomes active when the state machine is activated using the :ref:`set_active` method. If not explicitly set, the first child of the LimboHSM will be considered the initial state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_property_update_mode: + +.. rst-class:: classref-property + +:ref:`UpdateMode` **update_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_update_mode** **(** :ref:`UpdateMode` value **)** +- :ref:`UpdateMode` **get_update_mode** **(** **)** + +Specifies when the state machine should be updated. See :ref:`UpdateMode`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_LimboHSM_method_add_transition: + +.. rst-class:: classref-method + +void **add_transition** **(** Node p_from_state, Node p_to_state, String p_event **)** + +Establishes a transition from one state to another when ``p_event`` is dispatched. Both ``p_from_state`` and ``p_to_state`` must be immediate children of this state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_method_get_active_state: + +.. rst-class:: classref-method + +:ref:`LimboState` **get_active_state** **(** **)** |const| + +Returns the currently active substate. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_method_get_leaf_state: + +.. rst-class:: classref-method + +:ref:`LimboState` **get_leaf_state** **(** **)** |const| + +Returns the currently active leaf state within the state machine. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_method_initialize: + +.. rst-class:: classref-method + +void **initialize** **(** Node p_agent, :ref:`Blackboard` p_parent_scope=null **)** + +Initiates the state and calls :ref:`LimboState._setup` for both itself and all substates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_method_set_active: + +.. rst-class:: classref-method + +void **set_active** **(** bool p_active **)** + +When set to ``true``, switches the state to :ref:`initial_state` and activates state processing according to :ref:`update_mode`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboHSM_method_update: + +.. rst-class:: classref-method + +void **update** **(** float p_delta **)** + +Calls :ref:`LimboState._update` on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if :ref:`update_mode` is not set to :ref:`MANUAL`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_limbostate.rst b/doc/source/classes/class_limbostate.rst new file mode 100644 index 0000000..d289989 --- /dev/null +++ b/doc/source/classes/class_limbostate.rst @@ -0,0 +1,372 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/LimboState.xml. + +.. _class_LimboState: + +LimboState +========== + +**Inherits:** + +**Inherited By:** :ref:`BTState`, :ref:`LimboHSM` + +A state node for Hierarchical State Machines (HSM). + +.. rst-class:: classref-introduction-group + +Description +----------- + +A LimboAI state node for Hierarchical State Machines (HSM). + +You can create your state behavior by extending this class. To implement your state logic, you can override :ref:`_enter`, :ref:`_exit`, :ref:`_setup`, and :ref:`_update`. Alternatively, you can delegate state implementation to external methods using the ``call_on_*`` methods. + +For additional details on state machines, refer to :ref:`LimboHSM`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------------------+ + | String | :ref:`EVENT_FINISHED` | + +-------------------------------------+-----------------------------------------------------------------+ + | Node | :ref:`agent` | + +-------------------------------------+-----------------------------------------------------------------+ + | :ref:`Blackboard` | :ref:`blackboard` | + +-------------------------------------+-----------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_enter` **(** **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_exit` **(** **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup` **(** **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update` **(** float p_delta **)** |virtual| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_event_handler` **(** String p_event, Callable p_handler **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`call_on_enter` **(** Callable p_callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`call_on_exit` **(** Callable p_callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`call_on_update` **(** Callable p_callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_guard` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`dispatch` **(** String p_event, Variant p_cargo=null **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`get_root` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | bool | :ref:`is_active` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`LimboState` | :ref:`named` **(** String p_name **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_guard` **(** Callable p_guard_callable **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_LimboState_signal_entered: + +.. rst-class:: classref-signal + +**entered** **(** **)** + +Emitted when the state is entered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_signal_exited: + +.. rst-class:: classref-signal + +**exited** **(** **)** + +Emitted when the state is exited. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_signal_setup: + +.. rst-class:: classref-signal + +**setup** **(** **)** + +Emitted when the state is initialized. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_signal_updated: + +.. rst-class:: classref-signal + +**updated** **(** float p_delta **)** + +Emitted when the state is updated. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_LimboState_property_EVENT_FINISHED: + +.. rst-class:: classref-property + +String **EVENT_FINISHED** + +.. rst-class:: classref-property-setget + +- String **event_finished** **(** **)** + +A commonly used event that indicates that the state has finished its work. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_property_agent: + +.. rst-class:: classref-property + +Node **agent** + +.. rst-class:: classref-property-setget + +- void **set_agent** **(** Node value **)** +- Node **get_agent** **(** **)** + +An agent associated with the state, assigned during initialization. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_property_blackboard: + +.. rst-class:: classref-property + +:ref:`Blackboard` **blackboard** + +.. rst-class:: classref-property-setget + +- :ref:`Blackboard` **get_blackboard** **(** **)** + +A key/value data store shared by states within the state machine to which this state belongs. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_LimboState_private_method__enter: + +.. rst-class:: classref-method + +void **_enter** **(** **)** |virtual| + +Called when the state is entered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_private_method__exit: + +.. rst-class:: classref-method + +void **_exit** **(** **)** |virtual| + +Called when the state is exited. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_private_method__setup: + +.. rst-class:: classref-method + +void **_setup** **(** **)** |virtual| + +Called once during initialization. Use this method to initialize your state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_private_method__update: + +.. rst-class:: classref-method + +void **_update** **(** float p_delta **)** |virtual| + +Called during the update. Implement your state's behavior with this method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_add_event_handler: + +.. rst-class:: classref-method + +void **add_event_handler** **(** String p_event, Callable p_handler **)** + +Registers a ``p_handler`` to be called when ``p_event`` is dispatched. The method must belong to the state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_call_on_enter: + +.. rst-class:: classref-method + +:ref:`LimboState` **call_on_enter** **(** Callable p_callable **)** + +A chained method that connects the :ref:`entered` signal to a ``p_callable``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_call_on_exit: + +.. rst-class:: classref-method + +:ref:`LimboState` **call_on_exit** **(** Callable p_callable **)** + +A chained method that connects the :ref:`exited` signal to a ``p_callable``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_call_on_update: + +.. rst-class:: classref-method + +:ref:`LimboState` **call_on_update** **(** Callable p_callable **)** + +A chained method that connects the :ref:`updated` signal to a ``p_callable``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_clear_guard: + +.. rst-class:: classref-method + +void **clear_guard** **(** **)** + +Clears the guard function, removing the ``Callable`` previously set by :ref:`set_guard`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_dispatch: + +.. rst-class:: classref-method + +bool **dispatch** **(** String p_event, Variant p_cargo=null **)** + +Recursively dispatches a state machine event named ``p_event`` with an optional argument ``p_cargo``. Returns ``true`` if the event was consumed. + +Events propagate from the leaf state to the root state, and propagation stops as soon as any state consumes the event. States will consume the event if they have a related transition or event handler. For more information on event handlers, see :ref:`add_event_handler`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_get_root: + +.. rst-class:: classref-method + +:ref:`LimboState` **get_root** **(** **)** |const| + +Returns the root **LimboState**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_is_active: + +.. rst-class:: classref-method + +bool **is_active** **(** **)** |const| + +Returns ``true`` if it is currently active, meaning it is the active substate of the parent :ref:`LimboHSM`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_named: + +.. rst-class:: classref-method + +:ref:`LimboState` **named** **(** String p_name **)** + +A chained method for setting the name of this state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboState_method_set_guard: + +.. rst-class:: classref-method + +void **set_guard** **(** Callable p_guard_callable **)** + +Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns ``false``, the transition will be disallowed. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/class_limboutility.rst b/doc/source/classes/class_limboutility.rst new file mode 100644 index 0000000..2ecbfa9 --- /dev/null +++ b/doc/source/classes/class_limboutility.rst @@ -0,0 +1,249 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/LimboUtility.xml. + +.. _class_LimboUtility: + +LimboUtility +============ + +**Inherits:** + +Helper functions for LimboAI. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------+-----------------------------------------------------------------------------------------------------------------+ + | String | :ref:`decorate_var` **(** String p_variable **)** |const| | + +-----------+-----------------------------------------------------------------------------------------------------------------+ + | String | :ref:`get_status_name` **(** int p_status **)** |const| | + +-----------+-----------------------------------------------------------------------------------------------------------------+ + | Texture2D | :ref:`get_task_icon` **(** String p_class_or_script_path **)** |const| | + +-----------+-----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_LimboUtility_CheckType: + +.. rst-class:: classref-enumeration + +enum **CheckType**: + +.. _class_LimboUtility_constant_CHECK_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CheckType` **CHECK_EQUAL** = ``0`` + +Equality Check. + +.. _class_LimboUtility_constant_CHECK_LESS_THAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CheckType` **CHECK_LESS_THAN** = ``1`` + +Less Than Check. + +.. _class_LimboUtility_constant_CHECK_LESS_THAN_OR_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CheckType` **CHECK_LESS_THAN_OR_EQUAL** = ``2`` + +Less Than or Equal To Check. + +.. _class_LimboUtility_constant_CHECK_GREATER_THAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CheckType` **CHECK_GREATER_THAN** = ``3`` + +Greater Than Check. + +.. _class_LimboUtility_constant_CHECK_GREATER_THAN_OR_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CheckType` **CHECK_GREATER_THAN_OR_EQUAL** = ``4`` + +Greater Than or Equal To Check + +.. _class_LimboUtility_constant_CHECK_NOT_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CheckType` **CHECK_NOT_EQUAL** = ``5`` + +Inequality Check. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_LimboUtility_Operation: + +.. rst-class:: classref-enumeration + +enum **Operation**: + +.. _class_LimboUtility_constant_OPERATION_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_NONE** = ``0`` + +No operation. + +.. _class_LimboUtility_constant_OPERATION_ADDITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_ADDITION** = ``1`` + +Arithmetic addition. + +.. _class_LimboUtility_constant_OPERATION_SUBTRACTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_SUBTRACTION** = ``2`` + +Arithmetic subtraction. + +.. _class_LimboUtility_constant_OPERATION_MULTIPLICATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_MULTIPLICATION** = ``3`` + +Arithmetic multiplication. + +.. _class_LimboUtility_constant_OPERATION_DIVISION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_DIVISION** = ``4`` + +Arithmetic division. + +.. _class_LimboUtility_constant_OPERATION_MODULO: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_MODULO** = ``5`` + +Produces the remainder of an integer division. + +.. _class_LimboUtility_constant_OPERATION_POWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_POWER** = ``6`` + +Multiply ``a`` by itself ``b`` times. + +.. _class_LimboUtility_constant_OPERATION_BIT_SHIFT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_BIT_SHIFT_LEFT** = ``7`` + +Bitwise left shift. + +.. _class_LimboUtility_constant_OPERATION_BIT_SHIFT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_BIT_SHIFT_RIGHT** = ``8`` + +Bitwise right shift. + +.. _class_LimboUtility_constant_OPERATION_BIT_AND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_BIT_AND** = ``9`` + +Bitwise AND. + +.. _class_LimboUtility_constant_OPERATION_BIT_OR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_BIT_OR** = ``10`` + +Bitwise OR. + +.. _class_LimboUtility_constant_OPERATION_BIT_XOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_BIT_XOR** = ``11`` + +Bitwise XOR. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_LimboUtility_method_decorate_var: + +.. rst-class:: classref-method + +String **decorate_var** **(** String p_variable **)** |const| + +Produces a string with a :ref:`Blackboard` variable name that is formatted for display or console output. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboUtility_method_get_status_name: + +.. rst-class:: classref-method + +String **get_status_name** **(** int p_status **)** |const| + +Returns a name of a :ref:`BTTask` status code. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimboUtility_method_get_task_icon: + +.. rst-class:: classref-method + +Texture2D **get_task_icon** **(** String p_class_or_script_path **)** |const| + +Returns the icon texture associated with a task based on its class name or script resource path. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/doc/source/classes/index.rst b/doc/source/classes/index.rst new file mode 100644 index 0000000..42d0654 --- /dev/null +++ b/doc/source/classes/index.rst @@ -0,0 +1,96 @@ +:github_url: hide +:allow_comments: False + +.. _doc_class_reference: + +All Classes +=========== + +.. toctree:: + :maxdepth: 1 + :name: toc-class-ref-variants + + class_bbaabb + class_bbarray + class_bbbasis + class_bbbool + class_bbbytearray + class_bbcolor + class_bbcolorarray + class_bbdictionary + class_bbfloat + class_bbfloatarray + class_bbint + class_bbintarray + class_bbnode + class_bbparam + class_bbplane + class_bbquaternion + class_bbrect2 + class_bbrect2i + class_bbstring + class_bbstringarray + class_bbstringname + class_bbtransform2d + class_bbtransform3d + class_bbvariant + class_bbvector2 + class_bbvector2array + class_bbvector2i + class_bbvector3 + class_bbvector3array + class_bbvector3i + class_bbvector4 + class_bbvector4i + class_behaviortree + class_blackboard + class_bt + class_btaction + class_btalwaysfail + class_btalwayssucceed + class_btawaitanimation + class_btcallmethod + class_btcheckagentproperty + class_btchecktrigger + class_btcheckvar + class_btcomment + class_btcomposite + class_btcondition + class_btconsoleprint + class_btcooldown + class_btdecorator + class_btdelay + class_btdynamicselector + class_btdynamicsequence + class_btfail + class_btforeach + class_btinvert + class_btnewscope + class_btparallel + class_btpauseanimation + class_btplayanimation + class_btplayer + class_btprobability + class_btprobabilityselector + class_btrandomselector + class_btrandomsequence + class_btrandomwait + class_btrepeat + class_btrepeatuntilfailure + class_btrepeatuntilsuccess + class_btrunlimit + class_btselector + class_btsequence + class_btsetagentproperty + class_btsetvar + class_btstate + class_btstopanimation + class_btsubtree + class_bttask + class_bttimelimit + class_btwait + class_btwaitticks + class_limbohsm + class_limbostate + class_limboutility + diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..13047d4 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,35 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'LimboAI' +copyright = 'Copyright 2021-present Serhii Snitsaruk and the LimboAI contributors' +author = 'Serhii Snitsaruk' +release = '1.0' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ['sphinx_markdown_builder'] + +templates_path = ['_templates'] +exclude_patterns = ['_build'] + + +# -- Markdown configuration (sphinx_markdown_builder). +# markdown_anchor_sections = True +# markdown_anchor_signatures = True +# markdown_docinfo = "" +# markdown_http_base = "https://your-domain.com/docs" +# markdown_uri_doc_suffix = ".html" + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'sphinx_rtd_theme' +html_static_path = ['_static'] diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..f2bd1a0 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,24 @@ +LimboAI's Class Reference +========================== + +Highlights +---------- +.. toctree:: + :maxdepth: 1 + + BehaviorTree + BTTask: Foundation for all behavior tree tasks + BTPlayer: A node that executes BehaviorTree resources + LimboState: A state node for hierarchical state machine + LimboHSM: Event-based hierarchical state machine + BTState: A state node for LimboHSM that hosts a BehaviorTree + +.. * :ref:`search` + +Class Reference +--------------- +.. toctree:: + :maxdepth: 2 + + classes/index +