Dynamic dialogue roots

Summary
Currently the starting section of dialogue displayed when a dialogue is initiated with an NPC (i.e. the NPC's greeting) is hard-coded and static - that is, NPCs will always greet the player with the same text, regardless of the player's actions. The proposed changes would add conditional statements to the START_SECTION tag which would be evaluated each time a dialogue is initiated to determine an appropriate starting dialogue section or root.

Rationale
Although dialogues can already have complex branching behavior with conditional responses, the initial greeting is always the same. This leads to frequent, highly unrealistic situations, e.g. having stolen from a merchant and been caught, the player would still be greeted enthusiastically the next time he/she interacted with the merchant.

Pros and Cons
Pros:
 * More realistic conversations that allow the NPC to greet the player according to his/her actions;

Cons:
 * Dialogues would be considerably more complex with multiple conditional starting points and possibly independent branches to maintain;

YAML Dialogue File Syntax Changes
The proposed changes would rename the START_SECTION tag to START_SECTIONS (plural) and modified so that a list of potential starting sections could be specified along with conditional statements. These conditional statements would be evaluated each time a dialogue is initiated with the NPC and would be used to select a starting section from the list. Conditional statements are evaluated in the order specified under the START_SECTIONS tag (from first to last), so start sections specified earlier in the list are always selected before dialogue sections later in the list provided both have conditional statements which evaluate to True.

Once implemented, the proposed syntax changes would look like the following: --- NPC_NAME: Mr. NPC AVATAR_PATH: some/path/to/image DEFAULT_SECTION: friendly_greeting START_SECTIONS: -  continue_quest: "pc.hasItem['some_quest_item'] and pc.hasQuest['some_quest']" -  aggressive: "npc.favorability < 20" -  drunk: "pc.status['inebriated']" SECTIONS: -  ID: friendly_greeting SAY: "Hi there! Its nice to meet you." ACTIONS: -   meet: mr_npc RESPONSES: - REPLY: "Uhh, sure." GOTO: end -  ID: drunk SAY: "Go sleep it off buddy." RESPONSES: -  REPLY: "I don' need yar advice!" GOTO: end -  ID: continue_quest SAY: "Hey, you got the item! Great job" RESPONSES: -  REPLY: "Your praise makes it all worthwhile." ACTIONS: -  give_item: some_quest_item -  complete_quest: some_quest GOTO: end

Notice the DEFAULT_SECTION tag: the dialogue section indicated by this tag is the "fallback" section displayed when and if no other starting section conditional evaluates to True. This new tag is mostly to prevent errors in the dialogue logic from blocking interaction with the NPC, and is thus mandatory.

Notice also that the quest-related dialogue starting section is specified first in the list so that it is evaluated first before any of the other start sections. This means that if the player has the quest item then the NPC will greet the player with the quest-related start section, even if the player's favorability is low and is inebriated. This makes sure that the quest isn't broken should the player fall into disfavor with the NPC (or is hopelessly drunk all day!).