Atherys / AtherysQuests

A questing plugin for the A'therys Horizons server
GNU General Public License v3.0
3 stars 2 forks source link

Improve Scripting API for creating DialogTrees #33

Closed HaedHutner closed 5 years ago

HaedHutner commented 5 years ago

Currently what happens is the functions requires a string representing a serialized DialogTree object and simply deserializes it. This has obvious flaws. Instead, do something like:

dialogTree(
    "Dialog_Tree_ID", // dialog tree id
    dialogNode(
        0, // dialog node id
        [ // dialog node requirements
            moneyRequirement(), 
            questRequirement()
        ],
        textOf("Something something player dialog"), // player text
        [ // npc text
            textOf("Something something npc dialog 1"),
            textOf("Something something npc dialog 2")
        ],
        null, // attached quest?
        [ // responses
            dialogNode(),
            dialogNode(),
            dialogNode()
        ]
    )
);