User Tools

Site Tools


AI Editor

  • A brand new editor for editing creatures behaviors - Behavior Tree Editor. Allows developers to customize creature behavior and make the behavior of creatures no longer rigid, but more flexible and controllable.
  • This is a graphical programming tool used to describe the behavior of entities. It is a tool similar to a flow chart.
  • Behavior trees consist of Nodes and Connections. Different nodes represent different behaviors or conditions, and the connections between nodes represent the order in which the nodes are executed.

  • Entrance: Creature Plug-in→Edit Creature >Advanced>Behavior Tree

Note: If behavior tree editing is used, the old version of creatures (traditional creature card abilities) will be invalid, so developers must control all movement, attack, walk, sleep, etc.

The behavior tree consists of the following points:

1. Root node: the starting point of the behavior tree. The program will start from here to execute the behavior of the creature in every frame.

2. Event node: used to monitor special events in the game. (hit, audio-triggered, etc.)

3. Decorator node: hung on any node except the root node, playing a logical supplementary role to the mounted node. (Initialization, node return value, etc.)

4. Combined node: a bridge connecting nodes. It does not execute specific functional logic, but only handles the access sequence of child nodes and the interruption relationship of nodes. (Sequential execution, selective execution, simultaneous execution, etc.)

5. Condition node: only performs conditional judgment and does not perform actual actions. (Health volume judgment, target judgment, etc.)

6. Action node: perform a specific behavior. (Move, attack, set attribution, etc.)

7. Value node: only performs numerical logic and does not perform actual behavior. (Get blood volume, find targets, etc.)

8. Connection line: connects nodes to nodes and is used to control the actual execution sequence of nodes.

9. Variables: store and read information when the node is executed. This is common to trigger variables.
The behavior tree logic can be reused in different creatures within the map. Debugging function: Provides a debugging interface that can view biological running behavior trees in real time, making it easier for developers to discover problems in behavior tree production on time.


How to use the AI editor to create a creature that actively attacks the player and turns into a firefly when it's HP ⇐ 50:

  • We need to first customize a creature.
  • Then change the Advanced Editing Method to Advanced Editing for Behavior Tree in the creature editing panel;

  • Create the node to determine whether there are players nearby. If there are players, attack.

  • Create another node to determine to change to Firefly when its current hp is lower than 60.

  • The final result is as follows:

developer_center/ai_editor_tutorials.txt · Last modified: 2024/04/10 06:59 by junnie