Conversation tree

A conversation tree is an approach to modeling dialogue between the player character and an NPC. It is particularly common in role-playing games.

Basic form
Upon initiating conversation with the NPC, the player is presented with several lines of dialogue. They select the line they want their PC to say. The NPC responds, and the player is again presented with several possible responses. This process continues until the conversation is terminated.

In essence, each conversation is modeled as a graph, where the nodes are NPC responses and the edges are the choices available to the player.

Generally, the last option (at least on the major nodes) will end the conversation. This is sometimes suspended for plot-important conversations (such as immediately before a boss battle), thus preventing the player from skipping important dialogue.

Many conversations serve a strictly informational function, and have no mechanical effects on gameplay. However, some conversational choices - particularly with plot-related NPCs - may cause the NPC to become hostile (typically ending the conversation), trigger an exchange of currency or items from the PC to the NPC (or vice versa), initiate a quest, or have other effects.

Common variants

 * Instead of displaying the full text of the PC's dialogue, the game may represent each option as a concise, such as "Bribe, Ask About Ship, Directions to Town". Once the player selects an option, the full dialogue may be displayed or voice-acted. This approach is used in Mass Effect.
 * In games which incorporate a stat system, the chance of success for some conversation options may depend on the player character's stats. For example, an attempt to flatter the NPC may depend on the PC's Charisma stat. The probability of succeeding may or may not be displayed to the user.
 * An increasingly common approach eschews probability entirely, and simply requires the player to have a certain minimum stat before they can select the option. This discourages savescumming.