Saving/Loading Behaviour Trees

NodeCanvas Forums Support Saving/Loading Behaviour Trees

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15477
    therasven
    Participant

    Hello there,

    I was wondering if there is any built in support for saving and loading Behaviour Trees.

    Is it possible to save the current state of a Behaviour Tree (the current Node, the current ActionTask, and the state of that ActionTask) and reload the Behaviour Tree to continue from that point?

    If not, what would be the recommended way of achieving this behaviour?

    I am aware that it is possible to save and load Blackboards, however, in our use cases, Blackboards do not contain much (or any) state information.

     

    Any help is greatly appreciated.

    #15478
    Gavalakis
    Keymaster

    Hello there,

    There is no support for saving the exact state of the behaviour tree, as this would require a lot of data to be obtained in order to restore it back exactly as it was. It is something I have looked at implementing over and over, but it always comes to the conclusion that it is very complex and in most cases not really required because either:

    A) Saving games is usually done at specific “checkpoints” (exactly for the purposes of avoiding complex saving systems), rather than at any time.

    B) Depending on how the behaviour tree is designed, it may be able to restore its state, based purely only on the conditions it uses/checks. This of course does not take into account running actions or sequences.

    So, unfortunately saving the exact state of a behaviour tree is not supported, at least right now.

    Let me know what you think.

    Thanks 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #15482
    therasven
    Participant

    Thank you for your quick response.

    I was afraid this would be your answer. Unfortunately, checkpoints are not a viable option for us and trying to store the state in the Blackboard would require us to redesign every Behaviour Tree, while still being left with the problem of saving and loading the state of ActionsLists and ActionTasks.

    We’ll have to figure out something else. Thanks again for your support.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.