Coder Social home page Coder Social logo

addons-btree's Introduction

addons-btree

Read the wiki for usage information

addons-btree's People

Contributors

beroso avatar dwarfninja avatar fian46 avatar rcubdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

addons-btree's Issues

Asset Library version still has a save bug

Hi fian46,i tested the asset library addon,and there its not updated with the save fix,github version works just fine.
slika
slika
This is downloaded when i press Download button on Asset Library.
slika

Priority Condition param turns from Number to Text

While I edit BTree, I add param with type Number to Priority Condition node. From time to time, the param automatically turns into Text type and breaks the tree logic.

For now, I just convert the param into int in task_xxx function. But, this is still annoying. It'd better to have this fixed.

   var succeed_if_has_los = task.get_param(0) as int

My environment: MacOS Big Big Sur 11.6 + Godot Engine v3.3.3.

image

Invalid range checking causes unreachable code in runtime.gd

if idx < 0 and idx >= params.size():

This is found in each of the three get_params function in runtime.gd. The dependent code never runs because if idx = -1 (or lower) then it cannot also be >= 0 (or higher).

I believe the line should be:

if idx < 0 or idx >= params.size():

Thanks for the addon :D

Hello friends,
I have created this issue because I would like to thank you for creating this addon. It's really good especially for a guy who comea from Unreal Engine world.

I know obviously that this addon is still in beta but I would like to provide some feedback.

The biggest problem currently is that the documentation doesn't cover all of the btree nodes, which limits how much a user can do with them.

For example I want to use a selector in my behavior tree to switch between different states but I have no idea how to call the selector to switch states.

I have been able to work around the issue by switching trees based on state but it would be nicer to have selector working. Other than that, I like the addon and I hope that you will continue developing it.

Thank you and have a nice day :D

Update for Godot 4.x

Hello,
Do you have any plans to update this wonderful plugin for the new version of Godot?
Yesterday I tried to adapt it for Godot 4.1, but I couldn't get a working version.

Script Error

I wanted to try your addon but get the following Error while opening the godot project:
SCRIPT ERROR: _process: Invalid call. Nonexistent function 'is_playing_scene' in base 'EditorInterface'.
At: res://addons/btree/init.gd:144
I use Godot v3.2.2 stable_win64 and Version 1.1.8 of your plugin.

Using variables as parameters of a task.

Currently BTree node should must be set as a child of a node with script. I hope we can assign any accessible variables in that script to the parameters list of a task node in BTEditor.

Visualise the BTree activity while the game is running

I'd like to work on having the btree show the current state of the current node (by colour) for ease of debugging and experimentation.

Do you have any thoughts on how best to send updates from the running game code (runtime.gd) to the tool graphnodes, in order to update the colors? Apparently add_autoload_singleton() can work, but I've not had any luck.

*Great add-on, by the way. It's working nicely for my project.

is_init() hasn't been re-called if disable and enable a tree at runtime

when I use "enable" property to disable/enable a tree at runtime. the re-actived tree didn't restart its traverse. and continue to evaluate the task func when its disable happen, and the is_init() hasn't been called at this time.

need an option to decide whether to restart a tree completely if it's recovered from disable status.

add an "init" callback for a task node.

The usage of this feature could be summarized as following quotation.
https://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php

init - Called the first time a node is visited by its parent during its parents execution. For example a sequence will call this when its the node’s turn to be processed. It will not be called again until the next time the parent node is fired after the parent has finished processing and returned a result to its parent. This function is used to initialise the node and start the action the node represents. Using our walk example, it will retrieve the parameters and perhaps initiate the pathfinding job.

process - This is called every tick of the behaviour tree while the node is processing. If this function returns Success or Failure, then its processing will end and the result passed to its parent. If it returns Running it will be reprocessed next tick, and again and again until it returns a Success or Failure. In the Walk example, it will return Running until the pathfinding either succeeds or fails.

Add option for Search Node Next and Search Node Previous

Hey fian46.
Could you add for Search Node bar to have arrows or something to go to next/previous node with the same function name?
Cant seem to find how to do it now. Just a little speed to the workflow like you did for jump to source.

Nodes dissapear when changing panels in Godot,in version 1.1.0

Hey fian46,love your addon! My nodes seem to disappear when i move to a different panel like Script or 2d.
This was before fixed with saving while i was in the Tree Editor,but since this new version 1.1.0 this does not seem to work.
Did you change the way saving was done or is this a bug?
image
image

I will be using the old version until this issue is fixed,but am excited to test out debugger when its working.

Latest save functionality commit broke save again.

Hey fian46,i tested your new commits,and it seems that saving is broken again.Nodes dissapear even when saved in the editor.Or in further inspection they dissapear only when saved,if not saved only not saved ones dissapear.
slika
slika
I see you are planning to release it on Asset Library.Hope you can fix that bug before than.

Hard to connect nodes

I really appreciate the work, but I found it is hard to connect nodes by drag and drop.

It looks I have to point my mouse cursor to the top edge of each connector node to drag out out of the line. And it is really hard to drop the line to other node.

If the drag-and-drop areas could be bigger and more obvious, it would be great.

My environment: MacOS Big Big Sur 11.6 + Godot Engine v3.3.3.

rename task.failed to task.fail

Hi! Thank you for this awesome plugin! This is a small recommendation of renaming task.failed to task.fail. The tenses of these verbs are not consistent. The past tense of fail is failed. The past tense of succeed is succeeded. If you like the proposal and would like me to make a PR I would be happy to!

GOAP integration

Hi fian46.
I was wondering,could there be a way to integrate Goal Oriented Action Planning into this addon.
I know there is one made for Godot but it does not have ease of use like this addon does. If you dont want to integrated with this,could you base a different addon that uses GOAP?It would be a killer AI combination.

Just asking,big fan of this addon and what you have done.

Feature request, label for decorators.

Hello! I would like to be able to add a description of sorts for general decorators.
Something akin to this.
image
I find when the trees sequences gets big/nested it would be nice to have a quick way to know what each sequence does.

I started to work on adding one, but somewhere in loading the data back in the editor my trees got corrupted haha so I reverted it all back.

support "Succeeder" Node

A succeeder will always return success, irrespective of what the child node actually returned. These are useful in cases where you want to process a branch of a tree where a failure is expected or anticipated, but you don’t want to abandon processing of a sequence that branch sits on. The opposite of this type of node is not required, as an inverter will turn a succeeder into a ‘failer’ if a failure is required for the parent.

Realtime editing not working?

Hi fian46,i was testing version 1.1.5 and i thought you added realtime tree editing.
If you haven't than my mistake for not understanding.But if you have it does not work when i change transition between nodes during runtime.
image

Task only prints the parameter 0 and returns success.

Redo does not work

Hi fian46.
Nice job on the undo feature.
image
image
That one works great,but when i try to redo with CTRL+Y it does not work.

Ctrl Z inside of BTREE editor and node function linking

Hi fian46.
I was wondering if you can make undo work inside of the editor,cause now it kind of returns you to the last edited tree and if its not a hassle could you maybe link the node with a script when pressed (with CTRL+some combination) to send you to the scripting tab and shows you the function that its using? That would be a nice quality of life feature,would save much time.

buggy with external code editor

I just added this and find it buggy with external code editor. I am using vs code and the function in task did not update when i change the function name or add new function. Works well with internal code editor though.

Blackboard?

First off, congrats on a great library. The one in the assetlib leaves a little to be desired (Its got hardcoded paths to the authors D: drive, doh) but this works just great. The question I have is twofold, does this support a blackboard, or some sort of backing store for state. The secondly, is it possible to instantiate a behavior tree such that its not part of the scene graph?

Missing documentation

It would be really helpful.

The basic nodes like selector, sequence, task and inverter are self explanatory but what about the other nodes?
The range, count, while, priority selector and priority condition nodes are not obvious. Count node, does it count for ticks or seconds? Does while only return success of failed? Why does priority need a condition and how is it different from using a while node?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.