Before we start designing our first dialogues, lets have a look behind the concept of the dialogue engine. Understanding the basics will allow you to use the Dialogue Editor more efficiently and prevent you from trying to accomplish the impossible.
Understanding the Dialogue Engine
First of all, what exactly is a dialogue? In our case, a dialogue is the conversation between the player and at least one NPC. The NPCâ€™s speech is usually followed by a number of replies for the player to chose from. The NPC will then react according to the choice. After that it is the playerâ€™s turn again, and so on. Apart from player and NPC there is a third entity: the Narrator. Technically, it behaves like a NPC, but it has a completely different role. Usually it will describe matters that are of importance to the player, but which cannot be depicted by the game engine.
Now that weâ€™ve seen who may take part in a dialogue, weâ€™ll have a look at its organization. It will usually start with NPC or Narrator speech, to give the player something to react to. However, there is no need for a player reaction. Instead, the Narrator or various NPCs could go on and on (in which case the dialogue would either degenerate into a monologue or into a conversation between different NPCs). Player speech however must always be followed immediately by either NPC or Narrator text, unless it should end the dialogue. Dialogues following the scheme above will remain rather static. The player may chose from a list of replies whenever it is his turn, but other than that everything remains the same in all circumstances. Therefore, the dialogue engine provides a few mechanisms to make dialogues more dynamic and adaptive to different situations.
For one, NPCs and Narrator can have choices too. Whenever they have several options, they will randomly pick one. That may liven up the dialogue somewhat, but it also means a total loss of control. Therefore, each choice can be combined with a condition. Player, NPC and Narrator will only be able to chose those alternatives whose conditions evaluated true. As practically every aspect of gameworld and characters can be queried in a condition, it is possible to create dialogues that can adapt to many different situations. Most often, the state of various quest steps will be used for branches in a dialogue.
Such dialogues require lots of writing, of course. Therefore, dlgeditâ€™s main aim is assisting you with the complex structure of dialogues, so you can fully concentrate on the actual writing. As it tries to get as little in the way as possible, its usage is not always intuitive. However, the brief tutorial that follows should make you comfortable with most of its controls.