Creating DialogueTrees at Runtime

Forums 💬 NodeCanvas ⚙️ Support Creating DialogueTrees at Runtime

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17400
    axdragonxg
    Participant

      Is there a way to create DialogueTrees at runtime like you can with BehaviorTrees like shown in the documentation here? There doesn’t appear to be a way set the necessary fields for DT nodes at runtime like you can with behavior tree nodes

      #17403
      Gavalakis
      Keymaster

        Hello,

        While there exists the API for creating a dialogue tree, adding and connecting nodes, unfortunately because creating dialogue trees in runtime was not taken into consideration (since it defies the need of a node editor 🙂 ), most of the fields (like for example in StatementNode) are private. With that said, I could make them public in a future version though if that is something required.

        Here is how you would create a dialogue tree controller, a simple dialogue tree with two nodes, and assigning it to the controller.
        As mentioned earlier though, the StatementNode.statement field is private, thus not much of a use, unless it is made public, so that it is possible to set the statement (the dialogue to be displayed, which is called a “statement” in NodeCanvas).

        Please let me know if making the fields public is something you would like in a future version.
        Thank you.

        #17402
        lootdrive
        Participant

          Hello,

          When would it be possible to implement this?

          Thanks.

          #17401
          Gavalakis
          Keymaster

            Hello,

            Do you mean the possibility to make dialogue tree graphs purely from code?
            I really think that doing so defies the purpose of using a visual graph representation, but if it is requested I can make the necessary changes.
            Can you please elaborate on a use case please?

            Thank you.

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