Skip to content

Conversation

@csprance
Copy link
Contributor

Repositioned all class-level docstrings to appear before @tool, @ICON, and class_name annotations across all behavior tree node files, and added missing docstring to
RandomizedComposite.

Why this change was needed

In Godot 4.x, the "Create Node" dialog window displays class documentation to help developers understand what each node does before adding it to their scene. However, Godot's
documentation parser only recognizes docstrings that appear before the class annotations, not after them.

What was changed

  • 23+ node files had their docstrings moved from after the annotations to before them
  • 1 file (randomized_composite.gd) had a missing docstring added
  • 1 file (selector.gd) had single # comments converted to proper ## docstrings

Example of the change

Before:

  @tool
  @icon("../../icons/sequence_reactive.svg")
  class_name SequenceReactiveComposite extends Composite

  ## Reactive Sequence nodes will attempt to execute all of its children and report
  ## `SUCCESS` in case all of the children report a `SUCCESS` status code.

After:

  ## Reactive Sequence nodes will attempt to execute all of its children and report
  ## `SUCCESS` in case all of the children report a `SUCCESS` status code.
  @tool
  @icon("../../icons/sequence_reactive.svg")
  class_name SequenceReactiveComposite extends Composite

User benefit

Now when developers use Godot's "Create Node" dialog (Ctrl+A), they'll see helpful descriptions for each Beehave node type, making it much easier to understand what each node does
before adding it to their behavior tree. This significantly improves the developer experience and reduces the need to look up documentation separately.

Files affected

All node files in addons/beehave/nodes/ including composites (selectors, sequences, parallel), decorators (cooldown, limiter, inverter, etc.), and leaves (actions, conditions,
blackboard operations).

…e Window picks them up and shows them. This gives you a nice little preview and explaination of what each node does in the Editor before you add it to your scene tree.
Copy link
Owner

@bitbrain bitbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@bitbrain bitbrain merged commit f94f692 into bitbrain:godot-4.x Jul 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants