Merge branch 'gdextension-doc'

This commit is contained in:
Serhii Snitsaruk 2024-01-14 16:24:51 +01:00
commit 3fa6d58b01
103 changed files with 6680 additions and 147 deletions

View File

@ -5,23 +5,21 @@
</p> </p>
[![🔎 Unit Tests](https://github.com/limbonaut/limboai/actions/workflows/test_builds.yml/badge.svg)](https://github.com/limbonaut/limboai/actions/workflows/test_builds.yml) [![🔎 Unit Tests](https://github.com/limbonaut/limboai/actions/workflows/test_builds.yml/badge.svg)](https://github.com/limbonaut/limboai/actions/workflows/test_builds.yml)
[![Documentation Status](https://readthedocs.org/projects/limboai/badge/?version=latest)](https://limboai.readthedocs.io/en/latest/?badge=latest)
**LimboAI** is a C++ module for **Godot Engine 4** that provides an implementation of Behavior Trees and State Machines, which can be used together to create complex AI behaviors. **LimboAI** is an open-source C++ module for **Godot Engine 4** providing a combination of
**Behavior Trees** and **State Machines**, which can be used together to create complex AI behaviors.
It comes with a behavior tree editor, built-in documentation, visual debugger, and more!
While it is implemented in C++, it fully supports GDScript for [creating your own tasks](https://limboai.readthedocs.io/en/latest/getting-started/custom-tasks.html) and states.
>**🛈 Supported Godot Engine: 4.2** >**🛈 Supported Godot Engine: 4.2**
>**🛈 Previously supported:** [godot-4.1](https://github.com/limbonaut/limboai/tree/godot-4.1)
>**🛈 License**: Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT. >**🛈 License**: Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
A Behavior Tree (BT) is a powerful hierarchical structure used to model and control the behavior of agents in a game. It comprises tasks that represent specific actions or decision-making rules. When executed, the Behavior Tree starts from the root task and traverses down to the leaf tasks, which correspond to the actual actions or behaviors that the agent should perform. For detailed information on how various BT tasks function, please refer to the class documentation. The BehaviorTree class serves as a good starting point. Behavior Trees are powerful 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. To learn more about behavior trees, check out [Introduction to Behavior Trees](https://limboai.readthedocs.io/en/latest/getting-started/introduction.html).
> 🛈 See also: [Introduction to Behavior Trees](./doc/getting-started.md).
![Textured screenshot](doc/images/behavior-tree-editor-debugger.png) ![Textured screenshot](doc/images/behavior-tree-editor-debugger.png)
<!-- ![Textured screenshot](doc/images/behavior-tree-debugger.png) -->
## Features ## Features
- **Behavior Trees (BT):** - **Behavior Trees (BT):**
@ -29,7 +27,7 @@ A Behavior Tree (BT) is a powerful hierarchical structure used to model and cont
- Execute `BehaviorTree` resources using the `BTPlayer` node. - Execute `BehaviorTree` resources using the `BTPlayer` node.
- Create complex behaviors by combining and nesting tasks in a hierarchy. - Create complex behaviors by combining and nesting tasks in a hierarchy.
- Control execution flow using composite, decorator, and condition tasks. - Control execution flow using composite, decorator, and condition tasks.
- [Create custom tasks](./doc/getting-started.md#creating-custom-tasks-in-gdscript) by extending core classes: `BTAction`, `BTCondition`, `BTDecorator`, and `BTComposite`. - [Create custom tasks](https://limboai.readthedocs.io/en/latest/getting-started/custom-tasks.html) by extending core classes: `BTAction`, `BTCondition`, `BTDecorator`, and `BTComposite`.
- Built-in class documentation. Check out the `BehaviorTree` class documentation to get started. - Built-in class documentation. Check out the `BehaviorTree` class documentation to get started.
- Share data seamlessly between tasks using the `Blackboard`. - Share data seamlessly between tasks using the `Blackboard`.
- Blackboard scopes isolate variable namespaces and enable advanced techniques like sharing data between agents in a group. - Blackboard scopes isolate variable namespaces and enable advanced techniques like sharing data between agents in a group.
@ -48,8 +46,12 @@ A Behavior Tree (BT) is a powerful hierarchical structure used to model and cont
- **Tested:** Behavior tree tasks and HSM are covered by unit tests. - **Tested:** Behavior tree tasks and HSM are covered by unit tests.
- **GDExtension:** LimboAI can be [used as extension](https://limboai.readthedocs.io/en/latest/getting-started/gdextension.html). Custom engine builds are not necessary.
## Getting LimboAI ## Getting LimboAI
LimboAI can be used as either a C++ module or as a GDExtension shared library. GDExtension version is more convenient to use but somewhat limited in features. Whichever you choose to use, your project will stay compatible with both and you can switch from one to the other any time. See [Using GDExtension](https://limboai.readthedocs.io/en/latest/getting-started/gdextension.html).
### Precompiled builds ### Precompiled builds
- For the most recent builds, navigate to **Actions** → [**All Builds**](https://github.com/limbonaut/limboai/actions/workflows/all_builds.yml), select a build from the list, and scroll down until you find the **Artifacts** section. - For the most recent builds, navigate to **Actions** → [**All Builds**](https://github.com/limbonaut/limboai/actions/workflows/all_builds.yml), select a build from the list, and scroll down until you find the **Artifacts** section.
@ -62,21 +64,24 @@ A Behavior Tree (BT) is a powerful hierarchical structure used to model and cont
- If you plan to export a game utilizing the LimboAI module, you'll also need to build export templates. - If you plan to export a game utilizing the LimboAI module, you'll also need to build export templates.
- To execute unit tests, compile the engine with `tests=yes` and run it with `--test --tc="*[LimboAI]*"`. - To execute unit tests, compile the engine with `tests=yes` and run it with `--test --tc="*[LimboAI]*"`.
## Using the module ## Using the plugin
<!-- - [Getting Started](./doc/getting-started.md#getting-started) --> - [Online Documentation](https://limboai.readthedocs.io/en/latest/index.html)
- [Introduction to Behavior Trees](./doc/getting-started.md#introduction-to-behavior-trees) - [Introduction to Behavior Trees](https://limboai.readthedocs.io/en/latest/getting-started/introduction.html)
- [Creating custom tasks in GDScript](./doc/getting-started.md#creating-custom-tasks-in-gdscript) - [Creating custom tasks in GDScript](https://limboai.readthedocs.io/en/latest/getting-started/custom-tasks.html)
- [Task anatomy](./doc/getting-started.md#task-anatomy) - [Using GDExtension](https://limboai.readthedocs.io/en/latest/getting-started/gdextension.html)
- [Custom task example](./doc/getting-started.md#custom-task-example) - [Class reference](https://limboai.readthedocs.io/en/latest/getting-started/featured-classes.html)
## Contributing ## Contributing
All contributions are welcome! Feel free to open issues with bug reports and feature requests, and submit PRs. All contributions are welcome! Feel free to open issues with bug reports and feature requests, and submit PRs.
Got an idea for a behavior tree task that you think would be useful on a variety of projects?
Feel free to open an issue and describe your concept.
## Social ## Social
We have a Discord server: https://discord.gg/N5MGC95GpP We have a fresh new Discord server: https://discord.gg/N5MGC95GpP
I also write about LimboAI development on the Mastodon: https://mastodon.gamedev.place/@limbo. I also write about LimboAI development on the Mastodon: https://mastodon.gamedev.place/@limbo.
@ -90,4 +95,4 @@ Features and improvements that may be implemented in the future:
- Exploring the execution history of behavior trees in the visual debugger. - Exploring the execution history of behavior trees in the visual debugger.
- Per-project ignore list for tasks that users may want to hide in the task palette. - Per-project ignore list for tasks that users may want to hide in the task palette.
- GUI editor for state machines. - GUI editor for state machines.
- Supporting GDExtension in the future, once it matures. ~~- Supporting GDExtension in the future, once it matures.~~ 🗸

View File

@ -1,118 +0,0 @@
# Getting Started
> **🛈 See also:** [**How to get LimboAI**](../README.md#getting-limboai).
- [Getting Started](#getting-started)
- [TL;DR](#tldr)
- [Introduction to Behavior Trees](#introduction-to-behavior-trees)
- [Creating custom tasks in GDScript](#creating-custom-tasks-in-gdscript)
- [Task anatomy](#task-anatomy)
- [Custom task example](#custom-task-example)
## TL;DR
- Next section gives a brief explanation of behavior trees.
- To create your own actions, extend the `BTAction` class.
- To create your own conditions, extend the `BTCondition` class.
- In-editor class documentation is available. Try searching `BTTask` and `BehaviorTree`.
- Add a script template with "Misc → Create script template".
## Introduction to Behavior Trees
**Behavior Trees (BT)** 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 `BTSequence`, `BTSelector`, and `BTInvert`. Leaf tasks represent specific actions to perform, like moving or attacking, or conditions that need to be checked. The `BTTask` class provides the foundation for various building blocks of the Behavior Trees. BT tasks can share data with the help of `Blackboard`.
> **🛈 Note:** To create your own actions, extend the `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 `BT.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 `BTSequence` and `BTSelector` to craft your decision-making logic.
>**🛈 Note:** To create your own conditions, extend the `BTCondition` class.
Check out the `BTTask` class documentation in the editor, which provides the foundation for various building blocks of Behavior Trees.
## Creating custom tasks in GDScript
By default, user tasks should be placed in the `res://ai/tasks` folder. You can set an alternative location for user tasks in the `Project Settings → Limbo AI` (To see those options, `Advanced Settings` should be enabled in the Project Settings). Each subfolder within the user tasks folder is treated as a category. Therefore, if you create a subfolder named "motion_and_physics," your custom tasks in that folder will automatically be categorized under "Motion And Physics."
>**🛈 Note:** You can add a script template to your project with "Misc → Create script template" menu option.
### Task anatomy
```gdscript
@tool
extends BTAction
# Task parameters.
@export var parameter1: float
@export var parameter2: Vector2
## Note: Each method declaration is optional.
## At minimum, you only need to define the "_tick" method.
# Called to generate a display name for the task (requires @tool).
func _generate_name() -> String:
return "MyTask"
# Called to initialize the task.
func _setup() -> void:
pass
# Called when the task is entered.
func _enter() -> void:
pass
# Called when the task is exited.
func _exit() -> void:
pass
# Called each time this task is ticked (aka executed).
func _tick(delta: float) -> Status:
return SUCCESS
```
### Custom task example
```gdscript
@tool
extends BTCondition
## InRange condition checks if the agent is within a range of target, defined by
## distance_min and distance_max.
## Returns SUCCESS if agent is within the defined range;
## otherwise, returns FAILURE.
@export var distance_min: float
@export var distance_max: float
@export var target_var := "target"
var _min_distance_squared: float
var _max_distance_squared: float
# Called to generate a display name for the task.
func _generate_name() -> String:
return "InRange (%d, %d) of %s" % [distance_min, distance_max,
LimboUtility.decorate_var(target_var)]
# Called to initialize the task.
func _setup() -> void:
_min_distance_squared = distance_min * distance_min
_max_distance_squared = distance_max * distance_max
# Called when the task is executed.
func _tick(_delta: float) -> Status:
var target: Node2D = blackboard.get_var(target_var, null)
if not is_instance_valid(target):
return FAILURE
var dist_sq: float = agent.global_position.distance_squared_to(target.global_position)
if dist_sq >= _min_distance_squared and dist_sq <= _max_distance_squared:
return SUCCESS
else:
return FAILURE
```

View File

@ -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: doc/source/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: doc/source/requirements.txt

20
doc/source/Makefile Normal file
View File

@ -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)

View File

@ -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<class_BBParam>`
AABB-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Array-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Basis-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Bool-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
ByteArray-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Color-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
ColorArray-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Dictionary-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Float-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
FloatArray-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Integer-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
IntArray-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Node-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_BBParam>`.
.. rst-class:: classref-introduction-group
Description
-----------
Node-type parameter intended for use with :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBAabb>`, :ref:`BBArray<class_BBArray>`, :ref:`BBBasis<class_BBBasis>`, :ref:`BBBool<class_BBBool>`, :ref:`BBByteArray<class_BBByteArray>`, :ref:`BBColor<class_BBColor>`, :ref:`BBColorArray<class_BBColorArray>`, :ref:`BBDictionary<class_BBDictionary>`, :ref:`BBFloat<class_BBFloat>`, :ref:`BBFloatArray<class_BBFloatArray>`, :ref:`BBInt<class_BBInt>`, :ref:`BBIntArray<class_BBIntArray>`, :ref:`BBNode<class_BBNode>`, :ref:`BBPlane<class_BBPlane>`, :ref:`BBQuaternion<class_BBQuaternion>`, :ref:`BBRect2<class_BBRect2>`, :ref:`BBRect2i<class_BBRect2i>`, :ref:`BBString<class_BBString>`, :ref:`BBStringArray<class_BBStringArray>`, :ref:`BBStringName<class_BBStringName>`, :ref:`BBTransform2D<class_BBTransform2D>`, :ref:`BBTransform3D<class_BBTransform3D>`, :ref:`BBVariant<class_BBVariant>`, :ref:`BBVector2<class_BBVector2>`, :ref:`BBVector2Array<class_BBVector2Array>`, :ref:`BBVector2i<class_BBVector2i>`, :ref:`BBVector3<class_BBVector3>`, :ref:`BBVector3Array<class_BBVector3Array>`, :ref:`BBVector3i<class_BBVector3i>`, :ref:`BBVector4<class_BBVector4>`, :ref:`BBVector4i<class_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<class_Blackboard>` variable or hold a raw value of a specific :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`.
\ **Note**: Don't instantiate. Use specific subtypes instead.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+----------------------------------------------+----------------------------------------------------------+----------+
| Variant | :ref:`saved_value<class_BBParam_property_saved_value>` | ``null`` |
+----------------------------------------------+----------------------------------------------------------+----------+
| :ref:`ValueSource<enum_BBParam_ValueSource>` | :ref:`value_source<class_BBParam_property_value_source>` | ``0`` |
+----------------------------------------------+----------------------------------------------------------+----------+
| String | :ref:`variable<class_BBParam_property_variable>` | |
+----------------------------------------------+----------------------------------------------------------+----------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_type<class_BBParam_method_get_type>` **(** **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| Variant | :ref:`get_value<class_BBParam_method_get_value>` **(** Object p_agent, :ref:`Blackboard<class_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<enum_BBParam_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<enum_BBParam_ValueSource>` **BLACKBOARD_VAR** = ``1``
The value is referenced by a variable name and retrieved from the :ref:`Blackboard<class_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<class_BBParam_property_value_source>` is set to :ref:`SAVED_VALUE<class_BBParam_constant_SAVED_VALUE>`. The data type of the value is determined by :ref:`get_type<class_BBParam_method_get_type>`.
.. rst-class:: classref-item-separator
----
.. _class_BBParam_property_value_source:
.. rst-class:: classref-property
:ref:`ValueSource<enum_BBParam_ValueSource>` **value_source** = ``0``
.. rst-class:: classref-property-setget
- void **set_value_source** **(** :ref:`ValueSource<enum_BBParam_ValueSource>` value **)**
- :ref:`ValueSource<enum_BBParam_ValueSource>` **get_value_source** **(** **)**
Specifies the source of the value for BBParam. See :ref:`ValueSource<enum_BBParam_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<class_Blackboard>` variable when :ref:`value_source<class_BBParam_property_value_source>` is set to :ref:`BLACKBOARD_VAR<class_BBParam_constant_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<enum_@GlobalScope_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<class_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.)`

View File

@ -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<class_BBParam>`
Plane-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Quaternion-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Rect2-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Rect2i-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
String-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
StringArray-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
StringName-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Transform2D-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Transform3D-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Variant-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_BBParam>`.
.. rst-class:: classref-introduction-group
Description
-----------
Variant-type parameter intended for use with :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_BBParam>`.
The data type is specified by :ref:`type<class_BBVariant_property_type>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------------------+--------------------------------------------+-------+
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`type<class_BBVariant_property_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<enum_@GlobalScope_Variant.Type>` **type** = ``0``
.. rst-class:: classref-property-setget
- void **set_type** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` value **)**
- :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_type** **(** **)**
Specified :ref:`Variant.Type<enum_@GlobalScope_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.)`

View File

@ -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<class_BBParam>`
Vector2-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector2Array-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector2i-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector3-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector3Array-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector3i-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector4-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BBParam>`
Vector4i-type parameter for :ref:`BehaviorTree<class_BehaviorTree>` tasks. See :ref:`BBParam<class_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.)`

View File

@ -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<class_BTSequence>`, :ref:`BTSelector<class_BTSelector>`, and :ref:`BTInvert<class_BTInvert>`. Leaf tasks represent specific actions to perform, like moving or attacking, or conditions that need to be checked. The :ref:`BTTask<class_BTTask>` class provides the foundation for various building blocks of the Behavior Trees. BT tasks can share data with the help of :ref:`Blackboard<class_Blackboard>`. See :ref:`BTTask.blackboard<class_BTTask_property_blackboard>` and :ref:`Blackboard<class_Blackboard>`.
\ **Note:** To create your own actions, extend the :ref:`BTAction<class_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<enum_BT_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<class_BTSequence>` and :ref:`BTSelector<class_BTSelector>` to craft your decision-making logic.
\ **Note**: To create your own conditions, extend the :ref:`BTCondition<class_BTCondition>` class.
Check out the :ref:`BTTask<class_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<class_BehaviorTree_property_description>` | ``""`` |
+--------+-------------------------------------------------------------+--------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BehaviorTree<class_BehaviorTree>` | :ref:`clone<class_BehaviorTree_method_clone>` **(** **)** |const| |
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`copy_other<class_BehaviorTree_method_copy_other>` **(** :ref:`BehaviorTree<class_BehaviorTree>` p_other **)** |
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`get_root_task<class_BehaviorTree_method_get_root_task>` **(** **)** |const| |
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`instantiate<class_BehaviorTree_method_instantiate>` **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |const| |
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_root_task<class_BehaviorTree_method_set_root_task>` **(** :ref:`BTTask<class_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<class_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<class_BehaviorTree>` p_other **)**
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator
----
.. _class_BehaviorTree_method_get_root_task:
.. rst-class:: classref-method
:ref:`BTTask<class_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<class_BTTask>` **instantiate** **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |const|
Instantiates the Behavior Tree and returns the root :ref:`BTTask<class_BTTask>`.
.. rst-class:: classref-item-separator
----
.. _class_BehaviorTree_method_set_root_task:
.. rst-class:: classref-method
void **set_root_task** **(** :ref:`BTTask<class_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.)`

View File

@ -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<class_LimboHSM>` states and :ref:`BehaviorTree<class_BehaviorTree>` tasks.
.. rst-class:: classref-introduction-group
Description
-----------
Blackboard is where data is stored and shared between states in the :ref:`LimboHSM<class_LimboHSM>` system and tasks in a :ref:`BehaviorTree<class_BehaviorTree>`. Each state and task in the :ref:`BehaviorTree<class_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<class_BTNewScope>` and :ref:`BTSubtree<class_BTSubtree>` decorators. Additionally, a new scope is automatically created for any :ref:`LimboState<class_LimboState>` that has defined non-empty Blackboard data or for any root-level :ref:`LimboHSM<class_LimboHSM>` node.
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`erase_var<class_Blackboard_method_erase_var>` **(** Variant p_key **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| Dictionary | :ref:`get_data<class_Blackboard_method_get_data>` **(** **)** |const| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Blackboard<class_Blackboard>` | :ref:`get_parent_scope<class_Blackboard_method_get_parent_scope>` **(** **)** |const| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| Variant | :ref:`get_var<class_Blackboard_method_get_var>` **(** Variant p_key, Variant p_default=null **)** |const| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`has_var<class_Blackboard_method_has_var>` **(** Variant p_key **)** |const| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`prefetch_nodepath_vars<class_Blackboard_method_prefetch_nodepath_vars>` **(** Node p_node **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_data<class_Blackboard_method_set_data>` **(** Dictionary p_data **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_parent_scope<class_Blackboard_method_set_parent_scope>` **(** :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_var<class_Blackboard_method_set_var>` **(** Variant p_key, Variant p_value **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Blackboard<class_Blackboard>` | :ref:`top<class_Blackboard_method_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<class_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<class_Node_method_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<class_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<class_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.)`

View File

@ -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<class_BTTask>`
Base of :ref:`BTTask<class_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<enum_BT_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<enum_BT_Status>` **RUNNING** = ``1``
Task is being performed and hasn't finished yet.
.. _class_BT_constant_FAILURE:
.. rst-class:: classref-enumeration-constant
:ref:`Status<enum_BT_Status>` **FAILURE** = ``2``
Task has finished with failure.
.. _class_BT_constant_SUCCESS:
.. rst-class:: classref-enumeration-constant
:ref:`Status<enum_BT_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.)`

View File

@ -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<class_BTTask>` **<** :ref:`BT<class_BT>`
**Inherited By:** :ref:`BTAwaitAnimation<class_BTAwaitAnimation>`, :ref:`BTCallMethod<class_BTCallMethod>`, :ref:`BTConsolePrint<class_BTConsolePrint>`, :ref:`BTFail<class_BTFail>`, :ref:`BTPauseAnimation<class_BTPauseAnimation>`, :ref:`BTPlayAnimation<class_BTPlayAnimation>`, :ref:`BTRandomWait<class_BTRandomWait>`, :ref:`BTSetAgentProperty<class_BTSetAgentProperty>`, :ref:`BTSetVar<class_BTSetVar>`, :ref:`BTStopAnimation<class_BTStopAnimation>`, :ref:`BTWait<class_BTWait>`, :ref:`BTWaitTicks<class_BTWaitTicks>`
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` actions.
.. rst-class:: classref-introduction-group
Description
-----------
Base class for all actions within a :ref:`BehaviorTree<class_BehaviorTree>`. You can create your own actions by extending the **BTAction** class.
Represents a specific behavior or action in a :ref:`BehaviorTree<class_BehaviorTree>` that an agent should execute. Actions are the lowest level of the :ref:`BehaviorTree<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTAwaitAnimation_property_animation_name>` | ``&""`` |
+-----------------------------+---------------------------------------------------------------------------+---------+
| :ref:`BBNode<class_BBNode>` | :ref:`animation_player<class_BTAwaitAnimation_property_animation_player>` | |
+-----------------------------+---------------------------------------------------------------------------+---------+
| float | :ref:`max_time<class_BTAwaitAnimation_property_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<class_BBNode>` **animation_player**
.. rst-class:: classref-property-setget
- void **set_animation_player** **(** :ref:`BBNode<class_BBNode>` value **)**
- :ref:`BBNode<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTCallMethod_property_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<class_BTCallMethod_property_args>` | ``[]`` |
+-----------------------------+---------------------------------------------------------------------------+-----------+
| bool | :ref:`args_include_delta<class_BTCallMethod_property_args_include_delta>` | ``false`` |
+-----------------------------+---------------------------------------------------------------------------+-----------+
| StringName | :ref:`method<class_BTCallMethod_property_method>` | ``&""`` |
+-----------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`BBNode<class_BBNode>` | :ref:`node<class_BTCallMethod_property_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<class_BBNode>` **node**
.. rst-class:: classref-property-setget
- void **set_node_param** **(** :ref:`BBNode<class_BBNode>` value **)**
- :ref:`BBNode<class_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.)`

View File

@ -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<class_BTCondition>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTCheckAgentProperty_property_value>`.
Returns ``SUCCESS`` or ``FAILURE`` based on the :ref:`check_type<class_BTCheckAgentProperty_property_check_type>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------------+-------------------------------------------------------------------+---------+
| :ref:`CheckType<enum_LimboUtility_CheckType>` | :ref:`check_type<class_BTCheckAgentProperty_property_check_type>` | ``0`` |
+-----------------------------------------------+-------------------------------------------------------------------+---------+
| StringName | :ref:`property<class_BTCheckAgentProperty_property_property>` | ``&""`` |
+-----------------------------------------------+-------------------------------------------------------------------+---------+
| :ref:`BBVariant<class_BBVariant>` | :ref:`value<class_BTCheckAgentProperty_property_value>` | |
+-----------------------------------------------+-------------------------------------------------------------------+---------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTCheckAgentProperty_property_check_type:
.. rst-class:: classref-property
:ref:`CheckType<enum_LimboUtility_CheckType>` **check_type** = ``0``
.. rst-class:: classref-property-setget
- void **set_check_type** **(** :ref:`CheckType<enum_LimboUtility_CheckType>` value **)**
- :ref:`CheckType<enum_LimboUtility_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<class_BBVariant>` **value**
.. rst-class:: classref-property-setget
- void **set_value** **(** :ref:`BBVariant<class_BBVariant>` value **)**
- :ref:`BBVariant<class_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.)`

View File

@ -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<class_BTCondition>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT condition that checks a trigger (a boolean variable).
.. rst-class:: classref-introduction-group
Description
-----------
**BTCheckTrigger** verifies whether the :ref:`variable<class_BTCheckTrigger_property_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<class_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<class_BTCheckTrigger_property_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<class_BTTask_property_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.)`

View File

@ -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<class_BTCondition>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT condition that checks a variable on the blackboard.
.. rst-class:: classref-introduction-group
Description
-----------
BTCheckVar evaluates the :ref:`variable<class_BTCheckVar_property_variable>` against :ref:`value<class_BTCheckVar_property_value>` and returns ``SUCCESS`` or ``FAILURE`` based on the :ref:`check_type<class_BTCheckVar_property_check_type>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------------+---------------------------------------------------------+--------+
| :ref:`CheckType<enum_LimboUtility_CheckType>` | :ref:`check_type<class_BTCheckVar_property_check_type>` | ``0`` |
+-----------------------------------------------+---------------------------------------------------------+--------+
| :ref:`BBVariant<class_BBVariant>` | :ref:`value<class_BTCheckVar_property_value>` | |
+-----------------------------------------------+---------------------------------------------------------+--------+
| String | :ref:`variable<class_BTCheckVar_property_variable>` | ``""`` |
+-----------------------------------------------+---------------------------------------------------------+--------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTCheckVar_property_check_type:
.. rst-class:: classref-property
:ref:`CheckType<enum_LimboUtility_CheckType>` **check_type** = ``0``
.. rst-class:: classref-property-setget
- void **set_check_type** **(** :ref:`CheckType<enum_LimboUtility_CheckType>` value **)**
- :ref:`CheckType<enum_LimboUtility_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<class_BBVariant>` **value**
.. rst-class:: classref-property-setget
- void **set_value** **(** :ref:`BBVariant<class_BBVariant>` value **)**
- :ref:`BBVariant<class_BBVariant>` **get_value** **(** **)**
A parameter that specifies the value against which the :ref:`variable<class_BTCheckVar_property_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.)`

View File

@ -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<class_BTTask>` **<** :ref:`BT<class_BT>`
BTComment adds annotations or explanatory notes to a :ref:`BehaviorTree<class_BehaviorTree>`.
.. rst-class:: classref-introduction-group
Description
-----------
BTComment is used to add annotations or explanatory notes to a :ref:`BehaviorTree<class_BehaviorTree>`.
Comments are not executed as part of the tree and are removed from runtime instances of the :ref:`BehaviorTree<class_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.)`

View File

@ -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<class_BTTask>` **<** :ref:`BT<class_BT>`
**Inherited By:** :ref:`BTDynamicSelector<class_BTDynamicSelector>`, :ref:`BTDynamicSequence<class_BTDynamicSequence>`, :ref:`BTParallel<class_BTParallel>`, :ref:`BTProbabilitySelector<class_BTProbabilitySelector>`, :ref:`BTRandomSelector<class_BTRandomSelector>`, :ref:`BTRandomSequence<class_BTRandomSequence>`, :ref:`BTSelector<class_BTSelector>`, :ref:`BTSequence<class_BTSequence>`
Base class for BT composite tasks.
.. rst-class:: classref-introduction-group
Description
-----------
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` composite tasks. You can create your own composite tasks by extending the BTComposite class.
Composite is a control task within a :ref:`BehaviorTree<class_BehaviorTree>` that contains one or more child tasks. It defines the structure and flow of the :ref:`BehaviorTree<class_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<class_BehaviorTree>`. Examples of :ref:`BehaviorTree<class_BehaviorTree>` composites include :ref:`BTSelector<class_BTSelector>`, :ref:`BTSequence<class_BTSequence>`, and :ref:`BTParallel<class_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.)`

View File

@ -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<class_BTTask>` **<** :ref:`BT<class_BT>`
**Inherited By:** :ref:`BTCheckAgentProperty<class_BTCheckAgentProperty>`, :ref:`BTCheckTrigger<class_BTCheckTrigger>`, :ref:`BTCheckVar<class_BTCheckVar>`
Base class for BT conditions.
.. rst-class:: classref-introduction-group
Description
-----------
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` conditions. You can create your own conditions by extending the **BTCondition** class.
Condition is a task within a :ref:`BehaviorTree<class_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<class_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<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTConsolePrint_property_bb_format_parameters>` | ``PackedStringArray()`` |
+-------------------+---------------------------------------------------------------------------------+-------------------------+
| String | :ref:`text<class_BTConsolePrint_property_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT decorator that executes its child task only if :ref:`duration<class_BTCooldown_property_duration>` time has passed since the previous execution.
.. rst-class:: classref-introduction-group
Description
-----------
BTCooldown runs its child task only if :ref:`duration<class_BTCooldown_property_duration>` time has passed since the last successful child task execution. It will only consider successful executions unless :ref:`trigger_on_failure<class_BTCooldown_property_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<class_BTCooldown_property_duration>` time didn't pass since the previous execution.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+--------+-------------------------------------------------------------------------+-----------+
| String | :ref:`cooldown_state_var<class_BTCooldown_property_cooldown_state_var>` | ``""`` |
+--------+-------------------------------------------------------------------------+-----------+
| float | :ref:`duration<class_BTCooldown_property_duration>` | ``10.0`` |
+--------+-------------------------------------------------------------------------+-----------+
| bool | :ref:`process_pause<class_BTCooldown_property_process_pause>` | ``false`` |
+--------+-------------------------------------------------------------------------+-----------+
| bool | :ref:`start_cooled<class_BTCooldown_property_start_cooled>` | ``false`` |
+--------+-------------------------------------------------------------------------+-----------+
| bool | :ref:`trigger_on_failure<class_BTCooldown_property_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<class_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<class_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.)`

View File

@ -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<class_BTTask>` **<** :ref:`BT<class_BT>`
**Inherited By:** :ref:`BTAlwaysFail<class_BTAlwaysFail>`, :ref:`BTAlwaysSucceed<class_BTAlwaysSucceed>`, :ref:`BTCooldown<class_BTCooldown>`, :ref:`BTDelay<class_BTDelay>`, :ref:`BTForEach<class_BTForEach>`, :ref:`BTInvert<class_BTInvert>`, :ref:`BTNewScope<class_BTNewScope>`, :ref:`BTProbability<class_BTProbability>`, :ref:`BTRepeat<class_BTRepeat>`, :ref:`BTRepeatUntilFailure<class_BTRepeatUntilFailure>`, :ref:`BTRepeatUntilSuccess<class_BTRepeatUntilSuccess>`, :ref:`BTRunLimit<class_BTRunLimit>`, :ref:`BTTimeLimit<class_BTTimeLimit>`
Base class for BT decorators.
.. rst-class:: classref-introduction-group
Description
-----------
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` decorators. You can create your own decorators by extending the BTDecorator class.
A decorator is a task within a :ref:`BehaviorTree<class_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<class_BehaviorTree>` decorators include :ref:`BTInvert<class_BTInvert>`, :ref:`BTRepeat<class_BTRepeat>`, and :ref:`BTCooldown<class_BTCooldown>`. The use of :ref:`BehaviorTree<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTDelay_property_seconds>` before executing its child task. Returns ``RUNNING`` during the delay period.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------+------------------------------------------------+---------+
| float | :ref:`seconds<class_BTDelay_property_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_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<class_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_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<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_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<class_BTForEach_property_array_var>` | ``""`` |
+--------+------------------------------------------------------+--------+
| String | :ref:`save_var<class_BTForEach_property_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<class_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<class_Blackboard>` variable used to store an element of the array referenced by :ref:`array_var<class_BTForEach_property_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
**Inherited By:** :ref:`BTSubtree<class_BTSubtree>`
BT decorator that creates a new :ref:`Blackboard<class_Blackboard>` scope.
.. rst-class:: classref-introduction-group
Description
-----------
BTNewScope creates a new :ref:`Blackboard<class_Blackboard>` scope during initialization and populates it with data. See :ref:`Blackboard<class_Blackboard>`.
Returns the status of the child task execution.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+------------+---------------------------------------------------------------------+--------+
| Dictionary | :ref:`_blackboard_data<class_BTNewScope_property__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<class_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTParallel_property_num_failures_required>` determines when BTParallel fails and :ref:`num_successes_required<class_BTParallel_property_num_successes_required>` when it succeeds. When both are fullfilled, it gives priority to :ref:`num_failures_required<class_BTParallel_property_num_failures_required>`.
If set to :ref:`repeat<class_BTParallel_property_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<class_BTParallel_property_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<class_BTParallel_property_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<class_BTParallel_property_num_failures_required>` | ``1`` |
+------+---------------------------------------------------------------------------------+-----------+
| int | :ref:`num_successes_required<class_BTParallel_property_num_successes_required>` | ``1`` |
+------+---------------------------------------------------------------------------------+-----------+
| bool | :ref:`repeat<class_BTParallel_property_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BBNode>` | :ref:`animation_player<class_BTPauseAnimation_property_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<class_BBNode>` **animation_player**
.. rst-class:: classref-property-setget
- void **set_animation_player** **(** :ref:`BBNode<class_BBNode>` value **)**
- :ref:`BBNode<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTPlayAnimation_property_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<class_BTPlayAnimation_property_await_completion>`.
Returns ``SUCCESS`` if the animation finishes playing or if the elapsed time exceeds :ref:`await_completion<class_BTPlayAnimation_property_await_completion>`. When :ref:`await_completion<class_BTPlayAnimation_property_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<class_BTPlayAnimation_property_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<class_BTPlayAnimation_property_animation_name>` | ``&""`` |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| :ref:`BBNode<class_BBNode>` | :ref:`animation_player<class_BTPlayAnimation_property_animation_player>` | |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| float | :ref:`await_completion<class_BTPlayAnimation_property_await_completion>` | ``0.0`` |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| float | :ref:`blend<class_BTPlayAnimation_property_blend>` | ``-1.0`` |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| bool | :ref:`from_end<class_BTPlayAnimation_property_from_end>` | ``false`` |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| float | :ref:`speed<class_BTPlayAnimation_property_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<class_BBNode>` **animation_player**
.. rst-class:: classref-property-setget
- void **set_animation_player** **(** :ref:`BBNode<class_BBNode>` value **)**
- :ref:`BBNode<class_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<class_AnimationPlayer_method_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<class_BTPlayAnimation_property_speed>` to play animation in reverse. See :ref:`AnimationPlayer.play<class_AnimationPlayer_method_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<class_AnimationPlayer_method_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.)`

View File

@ -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<class_BehaviorTree>` resources.
.. rst-class:: classref-introduction-group
Description
-----------
BTPlayer node is used for the instantiation and playback of :ref:`BehaviorTree<class_BehaviorTree>` resources at runtime. During instantiation, the behavior tree instance is initialized with a reference to the agent and the :ref:`blackboard<class_BTPlayer_property_blackboard>`. Agent is the owner of the BTPlayer node (see :ref:`Node.owner<class_Node_member_owner>`).
For an introduction to behavior trees, see :ref:`BehaviorTree<class_BehaviorTree>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
| bool | :ref:`active<class_BTPlayer_property_active>` | ``true`` |
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
| :ref:`BehaviorTree<class_BehaviorTree>` | :ref:`behavior_tree<class_BTPlayer_property_behavior_tree>` | |
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
| :ref:`Blackboard<class_Blackboard>` | :ref:`blackboard<class_BTPlayer_property_blackboard>` | |
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
| bool | :ref:`monitor_performance<class_BTPlayer_property_monitor_performance>` | ``false`` |
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
| bool | :ref:`prefetch_nodepath_vars<class_BTPlayer_property_prefetch_nodepath_vars>` | ``true`` |
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
| :ref:`UpdateMode<enum_BTPlayer_UpdateMode>` | :ref:`update_mode<class_BTPlayer_property_update_mode>` | ``1`` |
+---------------------------------------------+-------------------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+------+-----------------------------------------------------------------------------------+
| int | :ref:`get_last_status<class_BTPlayer_method_get_last_status>` **(** **)** |const| |
+------+-----------------------------------------------------------------------------------+
| void | :ref:`restart<class_BTPlayer_method_restart>` **(** **)** |
+------+-----------------------------------------------------------------------------------+
| void | :ref:`update<class_BTPlayer_method_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<enum_BT_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<enum_BT_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<enum_BTPlayer_UpdateMode>` **IDLE** = ``0``
Execute behavior tree during the idle process.
.. _class_BTPlayer_constant_PHYSICS:
.. rst-class:: classref-enumeration-constant
:ref:`UpdateMode<enum_BTPlayer_UpdateMode>` **PHYSICS** = ``1``
Execute behavior tree during the physics process.
.. _class_BTPlayer_constant_MANUAL:
.. rst-class:: classref-enumeration-constant
:ref:`UpdateMode<enum_BTPlayer_UpdateMode>` **MANUAL** = ``2``
Behavior tree is executed manually by calling :ref:`update<class_BTPlayer_method_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<class_BehaviorTree>` **behavior_tree**
.. rst-class:: classref-property-setget
- void **set_behavior_tree** **(** :ref:`BehaviorTree<class_BehaviorTree>` value **)**
- :ref:`BehaviorTree<class_BehaviorTree>` **get_behavior_tree** **(** **)**
:ref:`BehaviorTree<class_BehaviorTree>` resource to instantiate and execute at runtime.
.. rst-class:: classref-item-separator
----
.. _class_BTPlayer_property_blackboard:
.. rst-class:: classref-property
:ref:`Blackboard<class_Blackboard>` **blackboard**
.. rst-class:: classref-property-setget
- void **set_blackboard** **(** :ref:`Blackboard<class_Blackboard>` value **)**
- :ref:`Blackboard<class_Blackboard>` **get_blackboard** **(** **)**
Holds data shared by the behavior tree tasks. See :ref:`Blackboard<class_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<class_Blackboard>` are replaced with ``Node`` references when the tree is instantiated. References are retrieved by calling :ref:`Node.get_node<class_Node_method_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<enum_BTPlayer_UpdateMode>` **update_mode** = ``1``
.. rst-class:: classref-property-setget
- void **set_update_mode** **(** :ref:`UpdateMode<enum_BTPlayer_UpdateMode>` value **)**
- :ref:`UpdateMode<enum_BTPlayer_UpdateMode>` **get_update_mode** **(** **)**
Determines when the behavior tree is executed. See :ref:`UpdateMode<enum_BTPlayer_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<enum_BT_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<class_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<class_BTPlayer_property_active>` is ``true``. Call this method when :ref:`update_mode<class_BTPlayer_property_update_mode>` is set to :ref:`MANUAL<class_BTPlayer_constant_MANUAL>`. When :ref:`update_mode<class_BTPlayer_property_update_mode>` is not :ref:`MANUAL<class_BTPlayer_constant_MANUAL>`, the :ref:`update<class_BTPlayer_method_update>` will be called automatically. See :ref:`UpdateMode<enum_BTPlayer_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTProbability_property_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<class_BTProbability_property_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTProbabilitySelector_property_abort_on_failure>` value:
- If :ref:`abort_on_failure<class_BTProbabilitySelector_property_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<class_BTProbabilitySelector_property_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<class_BTProbabilitySelector_property_abort_on_failure>` | ``false`` |
+------+--------------------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-------+-------------------------------------------------------------------------------------------------------------------------+
| float | :ref:`get_probability<class_BTProbabilitySelector_method_get_probability>` **(** int p_index **)** |const| |
+-------+-------------------------------------------------------------------------------------------------------------------------+
| float | :ref:`get_total_weight<class_BTProbabilitySelector_method_get_total_weight>` **(** **)** |const| |
+-------+-------------------------------------------------------------------------------------------------------------------------+
| float | :ref:`get_weight<class_BTProbabilitySelector_method_get_weight>` **(** int p_index **)** |const| |
+-------+-------------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`has_probability<class_BTProbabilitySelector_method_has_probability>` **(** int p_index **)** |const| |
+-------+-------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_probability<class_BTProbabilitySelector_method_set_probability>` **(** int p_index, float p_probability **)** |
+-------+-------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_weight<class_BTProbabilitySelector_method_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<class_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTRandomWait_property_min_duration>` and :ref:`max_duration<class_BTRandomWait_property_max_duration>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------+---------------------------------------------------------------+---------+
| float | :ref:`max_duration<class_BTRandomWait_property_max_duration>` | ``2.0`` |
+-------+---------------------------------------------------------------+---------+
| float | :ref:`min_duration<class_BTRandomWait_property_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT decorator that repeats its child a specified number of :ref:`times<class_BTRepeat_property_times>`.
.. rst-class:: classref-introduction-group
Description
-----------
BTRepeat iterates its child task a specified number of times, as defined by :ref:`times<class_BTRepeat_property_times>`. If :ref:`forever<class_BTRepeat_property_forever>` is ``true``, the child's execution will be repeated indefinitely.
Returns ``RUNNING`` if the child task results in ``RUNNING``. If :ref:`forever<class_BTRepeat_property_forever>` is ``true``, BTRepeat will always return ``RUNNING``.
Returns ``SUCCESS`` if the specified number of successful executions is reached. If :ref:`abort_on_failure<class_BTRepeat_property_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<class_BTRepeat_property_abort_on_failure>` is ``true``.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+------+-------------------------------------------------------------------+-----------+
| bool | :ref:`abort_on_failure<class_BTRepeat_property_abort_on_failure>` | ``false`` |
+------+-------------------------------------------------------------------+-----------+
| bool | :ref:`forever<class_BTRepeat_property_forever>` | ``false`` |
+------+-------------------------------------------------------------------+-----------+
| int | :ref:`times<class_BTRepeat_property_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTRunLimit_property_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<class_BTRunLimit_property_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTSequence>` are two of the most common building blocks of behavior trees. Essentially, while :ref:`BTSequence<class_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.)`

View File

@ -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<class_BTComposite>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTSelector>` are two of the most common building blocks of behavior trees. Essentially, while :ref:`BTSelector<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTSetAgentProperty_property_value>` to the agent's property identified by the :ref:`property<class_BTSetAgentProperty_property_property>` and returns ``SUCCESS``. Optionally, it can perform a specific :ref:`operation<class_BTSetAgentProperty_property_operation>` before assignment.
Returns ``FAILURE`` if it fails to set the property.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------------+---------------------------------------------------------------+---------+
| :ref:`Operation<enum_LimboUtility_Operation>` | :ref:`operation<class_BTSetAgentProperty_property_operation>` | ``0`` |
+-----------------------------------------------+---------------------------------------------------------------+---------+
| StringName | :ref:`property<class_BTSetAgentProperty_property_property>` | ``&""`` |
+-----------------------------------------------+---------------------------------------------------------------+---------+
| :ref:`BBVariant<class_BBVariant>` | :ref:`value<class_BTSetAgentProperty_property_value>` | |
+-----------------------------------------------+---------------------------------------------------------------+---------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTSetAgentProperty_property_operation:
.. rst-class:: classref-property
:ref:`Operation<enum_LimboUtility_Operation>` **operation** = ``0``
.. rst-class:: classref-property-setget
- void **set_operation** **(** :ref:`Operation<enum_LimboUtility_Operation>` value **)**
- :ref:`Operation<enum_LimboUtility_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<class_BBVariant>` **value**
.. rst-class:: classref-property-setget
- void **set_value** **(** :ref:`BBVariant<class_BBVariant>` value **)**
- :ref:`BBVariant<class_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT action that assigns :ref:`value<class_BTSetVar_property_value>` to the :ref:`variable<class_BTSetVar_property_variable>` and then returns ``SUCCESS``.
.. rst-class:: classref-introduction-group
Description
-----------
BTSetVar assigns :ref:`value<class_BTSetVar_property_value>` to the :ref:`variable<class_BTSetVar_property_variable>` and then returns ``SUCCESS``. Optionally, it can perform a specific :ref:`operation<class_BTSetVar_property_operation>` before assignment.
Returns ``FAILURE`` if it fails to set the :ref:`variable<class_BTSetVar_property_variable>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------------+-----------------------------------------------------+--------+
| :ref:`Operation<enum_LimboUtility_Operation>` | :ref:`operation<class_BTSetVar_property_operation>` | ``0`` |
+-----------------------------------------------+-----------------------------------------------------+--------+
| :ref:`BBVariant<class_BBVariant>` | :ref:`value<class_BTSetVar_property_value>` | |
+-----------------------------------------------+-----------------------------------------------------+--------+
| String | :ref:`variable<class_BTSetVar_property_variable>` | ``""`` |
+-----------------------------------------------+-----------------------------------------------------+--------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTSetVar_property_operation:
.. rst-class:: classref-property
:ref:`Operation<enum_LimboUtility_Operation>` **operation** = ``0``
.. rst-class:: classref-property-setget
- void **set_operation** **(** :ref:`Operation<enum_LimboUtility_Operation>` value **)**
- :ref:`Operation<enum_LimboUtility_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<class_BBVariant>` **value**
.. rst-class:: classref-property-setget
- void **set_value** **(** :ref:`BBVariant<class_BBVariant>` value **)**
- :ref:`BBVariant<class_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.)`

View File

@ -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<class_LimboState>`
A state node for :ref:`LimboHSM<class_LimboHSM>` that hosts a :ref:`BehaviorTree<class_BehaviorTree>`.
.. rst-class:: classref-introduction-group
Description
-----------
BTState is a :ref:`LimboState<class_LimboState>` node that manages a :ref:`BehaviorTree<class_BehaviorTree>` to provide behavior logic for the state. It instantiates and runs the :ref:`BehaviorTree<class_BehaviorTree>` resource, dispatching a state machine event upon ``SUCCESS`` or ``FAILURE``. Event names are customizable through :ref:`success_event<class_BTState_property_success_event>` and :ref:`failure_event<class_BTState_property_failure_event>`. For further details on state machine events, see :ref:`LimboState.dispatch<class_LimboState_method_dispatch>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------+------------------------------------------------------------+---------------+
| :ref:`BehaviorTree<class_BehaviorTree>` | :ref:`behavior_tree<class_BTState_property_behavior_tree>` | |
+-----------------------------------------+------------------------------------------------------------+---------------+
| String | :ref:`failure_event<class_BTState_property_failure_event>` | ``"failure"`` |
+-----------------------------------------+------------------------------------------------------------+---------------+
| String | :ref:`success_event<class_BTState_property_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<class_BehaviorTree>` **behavior_tree**
.. rst-class:: classref-property-setget
- void **set_behavior_tree** **(** :ref:`BehaviorTree<class_BehaviorTree>` value **)**
- :ref:`BehaviorTree<class_BehaviorTree>` **get_behavior_tree** **(** **)**
A :ref:`BehaviorTree<class_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<class_LimboState_method_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<class_LimboState_method_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTStopAnimation_property_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<class_BTStopAnimation_property_animation_name>` | ``&""`` |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| :ref:`BBNode<class_BBNode>` | :ref:`animation_player<class_BTStopAnimation_property_animation_player>` | |
+-----------------------------+--------------------------------------------------------------------------+-----------+
| bool | :ref:`keep_state<class_BTStopAnimation_property_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<class_BBNode>` **animation_player**
.. rst-class:: classref-property-setget
- void **set_animation_player** **(** :ref:`BBNode<class_BBNode>` value **)**
- :ref:`BBNode<class_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.)`

View File

@ -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<class_BTNewScope>` **<** :ref:`BTDecorator<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT decorator that instantiates and runs a subtree within the larger tree.
.. rst-class:: classref-introduction-group
Description
-----------
BTSubtree instantiates a :ref:`BehaviorTree<class_BehaviorTree>` and includes its root task as a child during initialization, while also creating a new :ref:`Blackboard<class_Blackboard>` scope.
Returns the status of the subtree's execution.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-----------------------------------------+--------------------------------------------------+
| :ref:`BehaviorTree<class_BehaviorTree>` | :ref:`subtree<class_BTSubtree_property_subtree>` |
+-----------------------------------------+--------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTSubtree_property_subtree:
.. rst-class:: classref-property
:ref:`BehaviorTree<class_BehaviorTree>` **subtree**
.. rst-class:: classref-property-setget
- void **set_subtree** **(** :ref:`BehaviorTree<class_BehaviorTree>` value **)**
- :ref:`BehaviorTree<class_BehaviorTree>` **get_subtree** **(** **)**
A :ref:`BehaviorTree<class_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.)`

View File

@ -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<class_BT>`
**Inherited By:** :ref:`BTAction<class_BTAction>`, :ref:`BTComment<class_BTComment>`, :ref:`BTComposite<class_BTComposite>`, :ref:`BTCondition<class_BTCondition>`, :ref:`BTDecorator<class_BTDecorator>`
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` tasks.
.. rst-class:: classref-introduction-group
Description
-----------
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` tasks. A task is a basic building block in a :ref:`BehaviorTree<class_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<class_BTAction>`, :ref:`BTCondition<class_BTCondition>`, :ref:`BTDecorator<class_BTDecorator>`, :ref:`BTComposite<class_BTComposite>`.
Tasks perform their work and return their status using the :ref:`_tick<class_BTTask_private_method__tick>` method. Status values are defined in :ref:`Status<enum_BT_Status>`. Tasks can be initialized using the :ref:`_setup<class_BTTask_private_method__setup>` method. See also :ref:`_enter<class_BTTask_private_method__enter>` & :ref:`_exit<class_BTTask_private_method__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<class_BTTask_property_agent>` | |
+-------------------------------------+---------------------------------------------------------+--------+
| :ref:`Blackboard<class_Blackboard>` | :ref:`blackboard<class_BTTask_property_blackboard>` | |
+-------------------------------------+---------------------------------------------------------+--------+
| String | :ref:`custom_name<class_BTTask_property_custom_name>` | ``""`` |
+-------------------------------------+---------------------------------------------------------+--------+
| float | :ref:`elapsed_time<class_BTTask_property_elapsed_time>` | |
+-------------------------------------+---------------------------------------------------------+--------+
| :ref:`Status<enum_BT_Status>` | :ref:`status<class_BTTask_property_status>` | |
+-------------------------------------+---------------------------------------------------------+--------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_enter<class_BTTask_private_method__enter>` **(** **)** |virtual| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_exit<class_BTTask_private_method__exit>` **(** **)** |virtual| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| String | :ref:`_generate_name<class_BTTask_private_method__generate_name>` **(** **)** |virtual| |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| PackedStringArray | :ref:`_get_configuration_warning<class_BTTask_private_method__get_configuration_warning>` **(** **)** |virtual| |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_setup<class_BTTask_private_method__setup>` **(** **)** |virtual| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Status<enum_BT_Status>` | :ref:`_tick<class_BTTask_private_method__tick>` **(** float p_delta **)** |virtual| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`abort<class_BTTask_method_abort>` **(** **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_child<class_BTTask_method_add_child>` **(** :ref:`BTTask<class_BTTask>` p_child **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_child_at_index<class_BTTask_method_add_child_at_index>` **(** :ref:`BTTask<class_BTTask>` p_child, int p_idx **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`clone<class_BTTask_method_clone>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Status<enum_BT_Status>` | :ref:`execute<class_BTTask_method_execute>` **(** float p_delta **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`get_child<class_BTTask_method_get_child>` **(** int p_idx **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| int | :ref:`get_child_count<class_BTTask_method_get_child_count>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| int | :ref:`get_child_count_excluding_comments<class_BTTask_method_get_child_count_excluding_comments>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| int | :ref:`get_index<class_BTTask_method_get_index>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`get_parent<class_BTTask_method_get_parent>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`get_root<class_BTTask_method_get_root>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| String | :ref:`get_task_name<class_BTTask_method_get_task_name>` **(** **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`has_child<class_BTTask_method_has_child>` **(** :ref:`BTTask<class_BTTask>` p_child **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`initialize<class_BTTask_method_initialize>` **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`is_descendant_of<class_BTTask_method_is_descendant_of>` **(** :ref:`BTTask<class_BTTask>` p_task **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`is_root<class_BTTask_method_is_root>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BTTask<class_BTTask>` | :ref:`next_sibling<class_BTTask_method_next_sibling>` **(** **)** |const| |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`print_tree<class_BTTask_method_print_tree>` **(** int p_initial_tabs=0 **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_child<class_BTTask_method_remove_child>` **(** :ref:`BTTask<class_BTTask>` p_child **)** |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_child_at_index<class_BTTask_method_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<class_BehaviorTree>` instance. Usually, agent is the owner of the :ref:`BTPlayer<class_BTPlayer>` node containing the :ref:`BehaviorTree<class_BehaviorTree>` resource.
.. rst-class:: classref-item-separator
----
.. _class_BTTask_property_blackboard:
.. rst-class:: classref-property
:ref:`Blackboard<class_Blackboard>` **blackboard**
.. rst-class:: classref-property-setget
- :ref:`Blackboard<class_Blackboard>` **get_blackboard** **(** **)**
Provides access to the :ref:`Blackboard<class_Blackboard>`. Blackboard is used to share data among tasks of the associated :ref:`BehaviorTree<class_BehaviorTree>`.
See :ref:`Blackboard<class_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<class_BTTask_method_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<class_BTTask_private_method__enter>`.
Returns ``0`` when task is not ``RUNNING``.
.. rst-class:: classref-item-separator
----
.. _class_BTTask_property_status:
.. rst-class:: classref-property
:ref:`Status<enum_BT_Status>` **status**
.. rst-class:: classref-property-setget
- :ref:`Status<enum_BT_Status>` **get_status** **(** **)**
Last execution :ref:`Status<enum_BT_Status>` returned by :ref:`_tick<class_BTTask_private_method__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<class_BTTask_property_status>`.
It is called before :ref:`_tick<class_BTTask_private_method__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<class_BTTask_method_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<class_BTTask_private_method__tick>` returns ``SUCCESS`` or ``FAILURE`` status. See also :ref:`execute<class_BTTask_method_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<class_BTTask_property_custom_name>` is set. See :ref:`get_task_name<class_BTTask_method_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<enum_BT_Status>` **_tick** **(** float p_delta **)** |virtual|
Called when task is "ticked", i.e. executed by :ref:`BTPlayer<class_BTPlayer>` or :ref:`BTState<class_BTState>` during an update.
Returns execution status as defined in :ref:`Status<enum_BT_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<class_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<class_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<class_BTTask>` **clone** **(** **)** |const|
Duplicates the task and its children, copying the exported members. Sub-resources are shared for efficiency, except for :ref:`BBParam<class_BBParam>` subtypes, which are always copied. Used by the editor to instantiate :ref:`BehaviorTree<class_BehaviorTree>` and copy-paste tasks.
.. rst-class:: classref-item-separator
----
.. _class_BTTask_method_execute:
.. rst-class:: classref-method
:ref:`Status<enum_BT_Status>` **execute** **(** float p_delta **)**
Performs task's execution. The execution follows a specific sequence:
- If task's current :ref:`status<class_BTTask_property_status>` is not ``RUNNING``, the :ref:`_enter<class_BTTask_private_method__enter>` method is called first.
- Next, the :ref:`_tick<class_BTTask_private_method__tick>` method is called next to perform the task's work.
- If the :ref:`_tick<class_BTTask_private_method__tick>` method returns ``SUCCESS`` or ``FAILURE`` status, the :ref:`_exit<class_BTTask_private_method__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<class_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<class_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<class_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<class_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<class_BTTask_private_method__generate_name>` is called to generate a display name for the task unless :ref:`custom_name<class_BTTask_property_custom_name>` is set.
.. rst-class:: classref-item-separator
----
.. _class_BTTask_method_has_child:
.. rst-class:: classref-method
bool **has_child** **(** :ref:`BTTask<class_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<class_Blackboard>` p_blackboard **)**
Initilizes the task. Assigns :ref:`agent<class_BTTask_property_agent>` and :ref:`blackboard<class_BTTask_property_blackboard>`, and calls :ref:`_setup<class_BTTask_private_method__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<class_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<class_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<class_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.)`

View File

@ -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<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTTimeLimit_property_time_limit>` is exceeded.
Returns ``FAILURE`` if the :ref:`time_limit<class_BTTimeLimit_property_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<class_BTTimeLimit_property_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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT action that waits for a specified :ref:`duration<class_BTWait_property_duration>` to elapse and then returns ``SUCCESS``.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------+-------------------------------------------------+---------+
| float | :ref:`duration<class_BTWait_property_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 <doc_updating_the_class_reference>`!
.. |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.)`

View File

@ -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<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_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<class_BTWaitTicks_property_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.)`

View File

@ -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<class_LimboState>`
Event-based Hierarchical State Machine (HSM).
.. rst-class:: classref-introduction-group
Description
-----------
Event-based Hierarchical State Machine (HSM) that manages :ref:`LimboState<class_LimboState>` instances and facilitates transitions between them. LimboHSM is a :ref:`LimboState<class_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<class_LimboState>` | :ref:`ANYSTATE<class_LimboHSM_property_ANYSTATE>` | |
+---------------------------------------------+-------------------------------------------------------------+-------+
| :ref:`LimboState<class_LimboState>` | :ref:`initial_state<class_LimboHSM_property_initial_state>` | |
+---------------------------------------------+-------------------------------------------------------------+-------+
| :ref:`UpdateMode<enum_LimboHSM_UpdateMode>` | :ref:`update_mode<class_LimboHSM_property_update_mode>` | ``1`` |
+---------------------------------------------+-------------------------------------------------------------+-------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_transition<class_LimboHSM_method_add_transition>` **(** Node p_from_state, Node p_to_state, String p_event **)** |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`get_active_state<class_LimboHSM_method_get_active_state>` **(** **)** |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`get_leaf_state<class_LimboHSM_method_get_leaf_state>` **(** **)** |const| |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`initialize<class_LimboHSM_method_initialize>` **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_parent_scope=null **)** |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_active<class_LimboHSM_method_set_active>` **(** bool p_active **)** |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`update<class_LimboHSM_method_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<class_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<enum_LimboHSM_UpdateMode>` **IDLE** = ``0``
Update the state machine during the idle process.
.. _class_LimboHSM_constant_PHYSICS:
.. rst-class:: classref-enumeration-constant
:ref:`UpdateMode<enum_LimboHSM_UpdateMode>` **PHYSICS** = ``1``
Update the state machine during the physics process.
.. _class_LimboHSM_constant_MANUAL:
.. rst-class:: classref-enumeration-constant
:ref:`UpdateMode<enum_LimboHSM_UpdateMode>` **MANUAL** = ``2``
Manually update the state machine by calling :ref:`update<class_LimboHSM_method_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<class_LimboState>` **ANYSTATE**
.. rst-class:: classref-property-setget
- :ref:`LimboState<class_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<class_LimboState>` **initial_state**
.. rst-class:: classref-property-setget
- void **set_initial_state** **(** :ref:`LimboState<class_LimboState>` value **)**
- :ref:`LimboState<class_LimboState>` **get_initial_state** **(** **)**
The substate that becomes active when the state machine is activated using the :ref:`set_active<class_LimboHSM_method_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<enum_LimboHSM_UpdateMode>` **update_mode** = ``1``
.. rst-class:: classref-property-setget
- void **set_update_mode** **(** :ref:`UpdateMode<enum_LimboHSM_UpdateMode>` value **)**
- :ref:`UpdateMode<enum_LimboHSM_UpdateMode>` **get_update_mode** **(** **)**
Specifies when the state machine should be updated. See :ref:`UpdateMode<enum_LimboHSM_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<class_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<class_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<class_Blackboard>` p_parent_scope=null **)**
Initiates the state and calls :ref:`LimboState._setup<class_LimboState_private_method__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<class_LimboHSM_property_initial_state>` and activates state processing according to :ref:`update_mode<class_LimboHSM_property_update_mode>`.
.. rst-class:: classref-item-separator
----
.. _class_LimboHSM_method_update:
.. rst-class:: classref-method
void **update** **(** float p_delta **)**
Calls :ref:`LimboState._update<class_LimboState_private_method__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<class_LimboHSM_property_update_mode>` is not set to :ref:`MANUAL<class_LimboHSM_constant_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.)`

View File

@ -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<class_BTState>`, :ref:`LimboHSM<class_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<class_LimboState_private_method__enter>`, :ref:`_exit<class_LimboState_private_method__exit>`, :ref:`_setup<class_LimboState_private_method__setup>`, and :ref:`_update<class_LimboState_private_method__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<class_LimboHSM>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------------------------------------+-----------------------------------------------------------------+
| String | :ref:`EVENT_FINISHED<class_LimboState_property_EVENT_FINISHED>` |
+-------------------------------------+-----------------------------------------------------------------+
| Node | :ref:`agent<class_LimboState_property_agent>` |
+-------------------------------------+-----------------------------------------------------------------+
| :ref:`Blackboard<class_Blackboard>` | :ref:`blackboard<class_LimboState_property_blackboard>` |
+-------------------------------------+-----------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_enter<class_LimboState_private_method__enter>` **(** **)** |virtual| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_exit<class_LimboState_private_method__exit>` **(** **)** |virtual| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_setup<class_LimboState_private_method__setup>` **(** **)** |virtual| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_update<class_LimboState_private_method__update>` **(** float p_delta **)** |virtual| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_event_handler<class_LimboState_method_add_event_handler>` **(** String p_event, Callable p_handler **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_enter<class_LimboState_method_call_on_enter>` **(** Callable p_callable **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_exit<class_LimboState_method_call_on_exit>` **(** Callable p_callable **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_update<class_LimboState_method_call_on_update>` **(** Callable p_callable **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_guard<class_LimboState_method_clear_guard>` **(** **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`dispatch<class_LimboState_method_dispatch>` **(** String p_event, Variant p_cargo=null **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`get_root<class_LimboState_method_get_root>` **(** **)** |const| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| bool | :ref:`is_active<class_LimboState_method_is_active>` **(** **)** |const| |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| :ref:`LimboState<class_LimboState>` | :ref:`named<class_LimboState_method_named>` **(** String p_name **)** |
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_guard<class_LimboState_method_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<class_Blackboard>` **blackboard**
.. rst-class:: classref-property-setget
- :ref:`Blackboard<class_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<class_LimboState>` **call_on_enter** **(** Callable p_callable **)**
A chained method that connects the :ref:`entered<class_LimboState_signal_entered>` signal to a ``p_callable``.
.. rst-class:: classref-item-separator
----
.. _class_LimboState_method_call_on_exit:
.. rst-class:: classref-method
:ref:`LimboState<class_LimboState>` **call_on_exit** **(** Callable p_callable **)**
A chained method that connects the :ref:`exited<class_LimboState_signal_exited>` signal to a ``p_callable``.
.. rst-class:: classref-item-separator
----
.. _class_LimboState_method_call_on_update:
.. rst-class:: classref-method
:ref:`LimboState<class_LimboState>` **call_on_update** **(** Callable p_callable **)**
A chained method that connects the :ref:`updated<class_LimboState_signal_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<class_LimboState_method_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<class_LimboState_method_add_event_handler>`.
.. rst-class:: classref-item-separator
----
.. _class_LimboState_method_get_root:
.. rst-class:: classref-method
:ref:`LimboState<class_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<class_LimboHSM>`.
.. rst-class:: classref-item-separator
----
.. _class_LimboState_method_named:
.. rst-class:: classref-method
:ref:`LimboState<class_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.)`

View File

@ -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<class_LimboUtility_method_decorate_var>` **(** String p_variable **)** |const| |
+-----------+-----------------------------------------------------------------------------------------------------------------+
| String | :ref:`get_status_name<class_LimboUtility_method_get_status_name>` **(** int p_status **)** |const| |
+-----------+-----------------------------------------------------------------------------------------------------------------+
| Texture2D | :ref:`get_task_icon<class_LimboUtility_method_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<enum_LimboUtility_CheckType>` **CHECK_EQUAL** = ``0``
Equality Check.
.. _class_LimboUtility_constant_CHECK_LESS_THAN:
.. rst-class:: classref-enumeration-constant
:ref:`CheckType<enum_LimboUtility_CheckType>` **CHECK_LESS_THAN** = ``1``
Less Than Check.
.. _class_LimboUtility_constant_CHECK_LESS_THAN_OR_EQUAL:
.. rst-class:: classref-enumeration-constant
:ref:`CheckType<enum_LimboUtility_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<enum_LimboUtility_CheckType>` **CHECK_GREATER_THAN** = ``3``
Greater Than Check.
.. _class_LimboUtility_constant_CHECK_GREATER_THAN_OR_EQUAL:
.. rst-class:: classref-enumeration-constant
:ref:`CheckType<enum_LimboUtility_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<enum_LimboUtility_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<enum_LimboUtility_Operation>` **OPERATION_NONE** = ``0``
No operation.
.. _class_LimboUtility_constant_OPERATION_ADDITION:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_ADDITION** = ``1``
Arithmetic addition.
.. _class_LimboUtility_constant_OPERATION_SUBTRACTION:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_SUBTRACTION** = ``2``
Arithmetic subtraction.
.. _class_LimboUtility_constant_OPERATION_MULTIPLICATION:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_MULTIPLICATION** = ``3``
Arithmetic multiplication.
.. _class_LimboUtility_constant_OPERATION_DIVISION:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_DIVISION** = ``4``
Arithmetic division.
.. _class_LimboUtility_constant_OPERATION_MODULO:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_MODULO** = ``5``
Produces the remainder of an integer division.
.. _class_LimboUtility_constant_OPERATION_POWER:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_POWER** = ``6``
Multiply ``a`` by itself ``b`` times.
.. _class_LimboUtility_constant_OPERATION_BIT_SHIFT_LEFT:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_BIT_SHIFT_LEFT** = ``7``
Bitwise left shift.
.. _class_LimboUtility_constant_OPERATION_BIT_SHIFT_RIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_BIT_SHIFT_RIGHT** = ``8``
Bitwise right shift.
.. _class_LimboUtility_constant_OPERATION_BIT_AND:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_BIT_AND** = ``9``
Bitwise AND.
.. _class_LimboUtility_constant_OPERATION_BIT_OR:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_Operation>` **OPERATION_BIT_OR** = ``10``
Bitwise OR.
.. _class_LimboUtility_constant_OPERATION_BIT_XOR:
.. rst-class:: classref-enumeration-constant
:ref:`Operation<enum_LimboUtility_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<class_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<class_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.)`

View File

@ -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

42
doc/source/conf.py Normal file
View File

@ -0,0 +1,42 @@
# 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 = '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 = ['myst_parser', 'sphinx_markdown_builder', 'sphinx_rtd_dark_mode']
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"
# -- Dark-mode configuration.
default_dark_mode = False
# -- 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']
html_logo = "logo.png"
html_theme_options = {
'logo_only': True,
'display_version': True,
}

View File

@ -0,0 +1,139 @@
.. _custom_tasks:
Creating custom tasks in GDScript
=================================
By default, user tasks should be placed in the ``res://ai/tasks``
directory. You can set an alternative location for user tasks in the
``Project Settings → Limbo AI`` (To see those options,
``Advanced Settings`` should be enabled in the Project Settings).
Each subdirectory within the user tasks directory is treated as a category.
Therefore, if you create a subdirectory named “motion_and_physics,” your
custom tasks in that directory will automatically be categorized under
“Motion And Physics.”
**🛈 Note:** To help you write new tasks, you can add a script template to
your project using “Misc → Create script template” menu option.
Task anatomy
------------
.. code:: gdscript
@tool
extends BTAction
# Task parameters.
@export var parameter1: float
@export var parameter2: Vector2
## Note: Each method declaration is optional.
## At minimum, you only need to define the "_tick" method.
# Called to generate a display name for the task (requires @tool).
func _generate_name() -> String:
return "MyTask"
# Called to initialize the task.
func _setup() -> void:
pass
# Called when the task is entered.
func _enter() -> void:
pass
# Called when the task is exited.
func _exit() -> void:
pass
# Called each time this task is ticked (aka executed).
func _tick(delta: float) -> Status:
return SUCCESS
# Strings returned from this method are displayed as warnings in the editor.
func _get_configuration_warnings() -> PackedStringArray:
var warnings := PackedStringArray()
return warnings
Example 1: A simple action
--------------------------
.. code:: gdscript
@tool
extends BTAction
## Shows or hides a node and returns SUCCESS.
## Returns FAILURE if the node is not found.
# Task parameters.
@export var node_path: NodePath
@export var visible := true
# Called to generate a display name for the task (requires @tool).
func _generate_name() -> String:
return "SetVisible %s node_path: \"%s\"" % [visible, node_path]
# Called each time this task is ticked (aka executed).
func _tick(p_delta: float) -> Status:
var n: CanvasItem = agent.get_node_or_null(node_path)
if is_instance_valid(n):
n.visible = visible
return SUCCESS
return FAILURE
Example 2: InRange condition
----------------------------
.. code:: gdscript
@tool
extends BTCondition
## InRange condition checks if the agent is within a range of target,
## defined by distance_min and distance_max.
## Returns SUCCESS if the agent is within the defined range;
## otherwise, returns FAILURE.
@export var distance_min: float
@export var distance_max: float
@export var target_var := "target"
var _min_distance_squared: float
var _max_distance_squared: float
# Called to generate a display name for the task.
func _generate_name() -> String:
return "InRange (%d, %d) of %s" % [distance_min, distance_max,
LimboUtility.decorate_var(target_var)]
# Called to initialize the task.
func _setup() -> void:
_min_distance_squared = distance_min * distance_min
_max_distance_squared = distance_max * distance_max
# Called when the task is executed.
func _tick(_delta: float) -> Status:
var target: Node2D = blackboard.get_var(target_var, null)
if not is_instance_valid(target):
return FAILURE
var dist_sq: float = agent.global_position.distance_squared_to(target.global_position)
if dist_sq >= _min_distance_squared and dist_sq <= _max_distance_squared:
return SUCCESS
else:
return FAILURE

View File

@ -0,0 +1,17 @@
Important classes
=================
There are a lot of classes introduced in LimboAI. Here is a list of the most important ones you should know about:
.. toctree::
:maxdepth: 1
BTTask: Foundation for all behavior tree tasks <../classes/class_bttask>
BTPlayer: A node that executes BehaviorTree resources <../classes/class_btplayer>
Blackboard: Sharing data between tasks <../classes/class_blackboard>
BBParam: Parametrization helper for your tasks <../classes/class_bbparam>
LimboState: A state node for hierarchical state machine <../classes/class_limbostate>
LimboHSM: Event-based hierarchical state machine <../classes/class_limbohsm>
BTState: A state node for LimboHSM that hosts a BehaviorTree <../classes/class_btstate>
Full class reference is available in the side bar.

View File

@ -0,0 +1,59 @@
.. _gdextension:
Using GDExtension
=================
**🛈 See also:** `What is GDExtension? <https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/what_is_gdextension.html#what-is-gdextension>`_
LimboAI can be used as either a C++ module or as a GDExtension shared library.
The module version is the most feature-full and slightly more performant, but
it requires using custom engine builds including the export templates.
**🛈 Note:** Precompiled builds are available on the official
`LimboAI GitHub <https://github.com/limbonaut/limboai#getting-limboai>`_ page.
GDExtension version is more convenient to use, as you don't need a custom engine
build. You can simply download the extension and put it inside your project.
However, it has certain limitations, described in detail in the next section.
Whichever you choose to use, remember, your project will stay compatible with
both and you can transition from one to the other any time.
Limitations of the GDExtension version
--------------------------------------
GDExtension is the most convenient way of using the LimboAI plugin, but it comes
with certain limitations.
The biggest one is that marking methods as virtual for scripting is not
currently possible in godot-cpp. We use these methods to allow creating custom
behavior tree tasks in GDScript.
Due to a workaround we employ, the editor will complain about native
methods being overridden. And by default, such warnings are treated as errors.
You have two options...
In your Project Settings, you can edit ``Debug -> GDScript -> Warnings -> Native Methods Override``
and set it to either ``Warn`` or ``Ignore``.
Those settings are hidden, unless ``Advanced Settings`` toggle is switched on!
Alternatively, in your custom tasks, you can add specific instructions for
the parser to ignore the warning. For example:
.. code:: gdscript
# The following line instructs parser to ignore the warning:
@warning_ignore("native_method_override")
func _tick(p_delta: float) -> Status:
return SUCCESS
You would have to do that for each overridden method in your custom tasks.
It's up to you which option you prefer. Personally, I'd set it to ``Warn`` and
add ignores only if it gets overwhelming. Hopefully, this will be fixed in the
future releases of Godot!
**Other GDExtension limitations**
* Built-in documentation is not available. The plugin will open online documentation instead when requested.
* Documentation tooltips are not available.
* Handy :ref:`class_BBParam` property editor is not available in the extension due to dependencies on the engine classes that are not available in the Godot API.

View File

@ -0,0 +1,45 @@
.. _introduction:
Introduction to Behavior Trees
==============================
**Behavior Trees (BT)** 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:`Sequence<class_BTSequence>`,
:ref:`Selector<class_BTSelector>`, and
:ref:`Invert<class_BTInvert>`. Leaf tasks represent specific actions
to perform, like moving or attacking, or conditions that need to be
checked. The :ref:`BTTask<class_BTTask>` class provides the foundation for various
building blocks of the Behavior Trees. BT tasks can share data with the
help of the :ref:`Blackboard<class_Blackboard>`.
**🛈 Note:** To create your own actions, extend the :ref:`BTAction<class_BTAction>`
class.
The Behavior Tree 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:`BT.Status <enum_BT_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:`Sequence<class_BTSequence>` and :ref:`Selector<class_BTSelector>`
to craft your decision-making logic.
**🛈 Note:** To create your own conditions, extend the :ref:`BTCondition<class_BTCondition>`
class.
Check out the :ref:`BTTask<class_BTTask>` class documentation, which
provides the foundation for various building blocks of Behavior Trees.

53
doc/source/index.rst Normal file
View File

@ -0,0 +1,53 @@
LimboAI Documentation
=====================
About
-----
**LimboAI** is an open-source C++ module for **Godot Engine 4** providing a combination of
**Behavior Trees** and **State Machines** for crafting your games AI. It comes with a
behavior tree editor, built-in documentation, visual debugger, and more! While
it is implemented in C++, it fully supports GDScript for :ref:`creating your own tasks <custom_tasks>`
and states. The full list of features is available on the
`LimboAI GitHub <https://github.com/limbonaut/limboai#features>`_ page.
.. SCREENSHOT
**Behavior Trees** are powerful 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.
To learn more about behavior trees, check out :ref:`introduction`.
Getting LimboAI
---------------
Precompiled builds are available on the official
`LimboAI GitHub <https://github.com/limbonaut/limboai#getting-limboai>`_ page,
and in the Asset Library (coming soon!).
LimboAI can be used as either a C++ module or as a GDExtension shared library.
There are some differences between the two. In short, GDExtension version is more
convenient to use but somewhat limited in features. Whichever you choose to use,
your project will stay compatible with both and you can switch from one to
the other any time. For more information on this topic, see :ref:`gdextension`.
**🛈 Note:** Class reference is available in the side bar.
.. toctree::
:hidden:
:maxdepth: 1
:caption: Getting started
getting-started/introduction
getting-started/custom-tasks
getting-started/gdextension
getting-started/featured-classes
.. toctree::
:hidden:
:maxdepth: 1
:caption: Class reference
:glob:
classes/class_*

BIN
doc/source/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -0,0 +1,5 @@
sphinx
sphinx-rtd-theme
sphinx-rtd-dark-mode
myst-parser
sphinx_markdown_builder

View File

@ -373,7 +373,7 @@ void LimboAIEditor::_on_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(theme_cache.rename_task_icon, LW_GET_SHORTCUT("limbo_ai/rename_task"), ACTION_RENAME); menu->add_icon_shortcut(theme_cache.rename_task_icon, LW_GET_SHORTCUT("limbo_ai/rename_task"), ACTION_RENAME);
menu->add_icon_item(theme_cache.change_type_icon, TTR("Change Type"), ACTION_CHANGE_TYPE); menu->add_icon_item(theme_cache.change_type_icon, TTR("Change Type"), ACTION_CHANGE_TYPE);
menu->add_icon_item(theme_cache.edit_script_icon, TTR("Edit Script"), ACTION_EDIT_SCRIPT); menu->add_icon_item(theme_cache.edit_script_icon, TTR("Edit Script"), ACTION_EDIT_SCRIPT);
menu->add_icon_item(theme_cache.open_doc_icon, TTR("Open Documentation"), ACTION_OPEN_DOC); menu->add_icon_item(theme_cache.doc_icon, TTR("Open Documentation"), ACTION_OPEN_DOC);
menu->set_item_disabled(menu->get_item_index(ACTION_EDIT_SCRIPT), task->get_script() == Variant()); menu->set_item_disabled(menu->get_item_index(ACTION_EDIT_SCRIPT), task->get_script() == Variant());
menu->add_separator(); menu->add_separator();
@ -436,14 +436,17 @@ void LimboAIEditor::_action_selected(int p_id) {
Ref<BTTask> task = task_tree->get_selected(); Ref<BTTask> task = task_tree->get_selected();
ERR_FAIL_COND(task.is_null()); ERR_FAIL_COND(task.is_null());
String help_class; String help_class;
String res_path = task->get_path();
if (res_path.begins_with("res://")) { Ref<Script> sc = GET_SCRIPT(task);
help_class = "\"" + res_path.get_basename().to_pascal_case() + "\""; if (sc.is_valid() && sc->get_path().is_absolute_path()) {
} else { help_class = sc->get_path();
}
if (help_class.is_empty()) {
// Assuming context task is core class. // Assuming context task is core class.
help_class = task->get_class(); help_class = task->get_class();
} }
SHOW_DOC("class_name:" + help_class);
LimboUtility::get_singleton()->open_doc_class(help_class);
} break; } break;
case ACTION_MOVE_UP: { case ACTION_MOVE_UP: {
Ref<BTTask> sel = task_tree->get_selected(); Ref<BTTask> sel = task_tree->get_selected();
@ -590,7 +593,10 @@ void LimboAIEditor::_probability_popup_closed() {
void LimboAIEditor::_misc_option_selected(int p_id) { void LimboAIEditor::_misc_option_selected(int p_id) {
switch (p_id) { switch (p_id) {
case MISC_INTRODUCTION: { case MISC_INTRODUCTION: {
SHOW_DOC("class_name:BehaviorTree"); LimboUtility::get_singleton()->open_doc_introduction();
} break;
case MISC_ONLINE_DOCUMENTATION: {
LimboUtility::get_singleton()->open_doc_online();
} break; } break;
case MISC_OPEN_DEBUGGER: { case MISC_OPEN_DEBUGGER: {
ERR_FAIL_COND(LimboDebuggerPlugin::get_singleton() == nullptr); ERR_FAIL_COND(LimboDebuggerPlugin::get_singleton() == nullptr);
@ -938,7 +944,8 @@ void LimboAIEditor::_update_misc_menu() {
misc_menu->clear(); misc_menu->clear();
misc_menu->add_icon_item(theme_cache.open_doc_icon, TTR("Introduction"), MISC_INTRODUCTION); misc_menu->add_icon_item(theme_cache.introduction_icon, TTR("Introduction"), MISC_INTRODUCTION);
misc_menu->add_icon_item(theme_cache.doc_icon, TTR("Online Documentation"), MISC_ONLINE_DOCUMENTATION);
misc_menu->add_separator(); misc_menu->add_separator();
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
@ -994,7 +1001,8 @@ void LimboAIEditor::_do_update_theme_item_cache() {
theme_cache.move_task_down_icon = get_theme_icon(LW_NAME(MoveDown), LW_NAME(EditorIcons)); theme_cache.move_task_down_icon = get_theme_icon(LW_NAME(MoveDown), LW_NAME(EditorIcons));
theme_cache.move_task_up_icon = get_theme_icon(LW_NAME(MoveUp), LW_NAME(EditorIcons)); theme_cache.move_task_up_icon = get_theme_icon(LW_NAME(MoveUp), LW_NAME(EditorIcons));
theme_cache.open_debugger_icon = get_theme_icon(LW_NAME(Debug), LW_NAME(EditorIcons)); theme_cache.open_debugger_icon = get_theme_icon(LW_NAME(Debug), LW_NAME(EditorIcons));
theme_cache.open_doc_icon = get_theme_icon(LW_NAME(Help), LW_NAME(EditorIcons)); theme_cache.doc_icon = get_theme_icon(LW_NAME(Help), LW_NAME(EditorIcons));
theme_cache.introduction_icon = get_theme_icon(LW_NAME(Info), LW_NAME(EditorIcons));
theme_cache.remove_task_icon = get_theme_icon(LW_NAME(Remove), LW_NAME(EditorIcons)); theme_cache.remove_task_icon = get_theme_icon(LW_NAME(Remove), LW_NAME(EditorIcons));
theme_cache.rename_task_icon = get_theme_icon(LW_NAME(Rename), LW_NAME(EditorIcons)); theme_cache.rename_task_icon = get_theme_icon(LW_NAME(Rename), LW_NAME(EditorIcons));
theme_cache.change_type_icon = get_theme_icon(LW_NAME(Reload), LW_NAME(EditorIcons)); theme_cache.change_type_icon = get_theme_icon(LW_NAME(Reload), LW_NAME(EditorIcons));

View File

@ -84,6 +84,7 @@ private:
enum MiscMenu { enum MiscMenu {
MISC_INTRODUCTION, MISC_INTRODUCTION,
MISC_ONLINE_DOCUMENTATION,
MISC_OPEN_DEBUGGER, MISC_OPEN_DEBUGGER,
MISC_PROJECT_SETTINGS, MISC_PROJECT_SETTINGS,
MISC_CREATE_SCRIPT_TEMPLATE, MISC_CREATE_SCRIPT_TEMPLATE,
@ -96,7 +97,8 @@ private:
Ref<Texture2D> move_task_down_icon; Ref<Texture2D> move_task_down_icon;
Ref<Texture2D> move_task_up_icon; Ref<Texture2D> move_task_up_icon;
Ref<Texture2D> open_debugger_icon; Ref<Texture2D> open_debugger_icon;
Ref<Texture2D> open_doc_icon; Ref<Texture2D> doc_icon;
Ref<Texture2D> introduction_icon;
Ref<Texture2D> percent_icon; Ref<Texture2D> percent_icon;
Ref<Texture2D> remove_task_icon; Ref<Texture2D> remove_task_icon;
Ref<Texture2D> rename_task_icon; Ref<Texture2D> rename_task_icon;

View File

@ -190,12 +190,12 @@ void TaskPalette::_menu_action_selected(int p_id) {
case MENU_OPEN_DOC: { case MENU_OPEN_DOC: {
String help_class; String help_class;
if (context_task.begins_with("res://")) { if (context_task.begins_with("res://")) {
help_class = "\"" + context_task.get_basename().to_pascal_case() + "\""; help_class = context_task;
} else { } else {
// Assuming context task is core class. // Assuming context task is core class.
help_class = context_task; help_class = context_task;
} }
SHOW_DOC("class_name:" + help_class); LimboUtility::get_singleton()->open_doc_class(help_class);
} break; } break;
case MENU_EDIT_SCRIPT: { case MENU_EDIT_SCRIPT: {
ERR_FAIL_COND(!context_task.begins_with("res://")); ERR_FAIL_COND(!context_task.begins_with("res://"));

View File

@ -79,6 +79,7 @@ LimboStringNames::LimboStringNames() {
Help = SN("Help"); Help = SN("Help");
icon_max_width = SN("icon_max_width"); icon_max_width = SN("icon_max_width");
id_pressed = SN("id_pressed"); id_pressed = SN("id_pressed");
Info = SN("Info");
item_collapsed = SN("item_collapsed"); item_collapsed = SN("item_collapsed");
item_selected = SN("item_selected"); item_selected = SN("item_selected");
LimboDeselectAll = SN("LimboDeselectAll"); LimboDeselectAll = SN("LimboDeselectAll");

Some files were not shown because too many files have changed in this diff Show More