Good day everypony !

Today I’ll introduce you to the first bits of the Game Editor, along with the dialog system.

Our dialogs are composed of a dialog file in JSON and a script giving him life. It uses a very simple system using dialog nodes and hooks, behaving like this :
1. A init hook let the script define which node should be used to start the dialog.
2. The possible answers are gathered from the node. Each of them have a Available Hook that determines if the player can use them or not.
3. The player select an answer :
— if the answer has a HookExecute, the corresponding script function is executed and define the next node.
— else, if the answer has a DefaultAnswer, it is used to define the next node.
4. If a next node has been defined, back to step 2. Else, the dialog is over.

The script and nodes can be edited from the Game Editor, and this behaviour is already supported in the game itself. Have a few screenshots :

The dialog editor from the Game Editor. On the left, you can create dialog, and on the right, you can add node to them, and add answers to each node. Changes are saved on the fly.

The script editor. On the left, scripts are sorted by types (dialogs, quests and AI). On the right, the editor allows you to edit the script, save it, close it. It supports every feature expected from an IDE (except for syntax check and auto-completion).

Last but not least, the in-game result of the dialog shown in the two previous screenshots.  Just as specified, the two first answers appear, and the last one, who had a HookAvailable returning false, doesn’t.
Once internationalization support will be ready, the “key” values used here to point to nodes and answers will be replaced by a text in the language selected by the player.

That’s it for today !


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s