The goal is not to
fill the game with static handcrafted quests but leave the possibility
to create a few of them to add consistency and background to the world.
Topics
Dialogs
are grouped by topics. The player has a list of active topics that he
can use in a conversation. Speaking to npc can add or remove topics
from the active list. There are some specials hardcoded topics like
'Trade'.
Choosing a topic
Dialogs
From
a technical point of view, each topic is a list of dialogs. Each dialog
can contain a question (what is said by the player) and an answer (what
is said by the npc). Each dialog has conditions. When the player tries
to speak to a npc, we check conditions of each dialog from the active
topic list. Generally, this should leave only one dialog per topic. If
there are several, we take a random one.
Typical conditions on a
dialog are the npc name or the npc faction. The npc name condition
allows you to write dialogs specific to a given npc while the faction
condition allows to write only once dialogs that will be available for
several npc (for example, every npc living in a city can give you
information about the city).
Note that each npc can belong to
several "factions". Factions are not visible by the player. They are
just an arbitrary way of regrouping npcs (mainly for dialogs
affectation).
There is also an 'end script' associated with the
dialog. It is executed once the player has read the dialog. It can do
basic actions like giving/taking items to/from the player,
adding/removing topics from active list, starting/advancing/ending
quests...
Questions/answers
Some dialogs may contain a
list of sub-dialogs. This is a special case when the npc ask a question
and the player has to choose between several answers.

