Table des matières

Dynamic Dialogue

There comes a point in every quest when the path splits, and a decision must be made about how to proceed. The art of branching dialogue relies on the player choosing from a list of possible interactions in order to move the conversation forward. In addition to the potential outcome, you may want to carry forward the history of past responses to characters during previous conversations.

At the center of Wwise's Dynamic Dialogue system is the dialogue event, which is a set of rules or conditions that determines which piece of dialogue to play. The dialogue event allows you to re-create a variety of different scenarios, conditions, or outcomes that exist in your game. To ensure that you cover every situation, Wwise also allows you to create default or fallback conditions.

All these conditions are defined using a series of Switch Groups and Switches. These Switch Groups and Switches are combined to create Switch Group paths, which define the particular conditions or outcomes in the game. Each path is then associated with a specific sound object in Wwise. As the game is played and dialogue events are called, the game verifies the existing conditions against the Swtich Groups defined in the dialogue event. The Switch Group paths that match the current situation in game along with the mode, probability, and weighting of each path determine which piece of dialogue is played, if any.

For example, the following dialogue event contains the arguments related to the names of each player in a sports game. The Switches of each Switch Group are combined to create the different paths or conditions that may exist. In this particular example, the commentator can use either the player's last name or full name.

Dialogue Event: Name

Switch Groups

Player Name

Name Length

Switches

Tony Cross

Full

 

John Patrick

Last

 

Switch Group Paths

Assigned Object

Cross - Full

Cross_Full

Cross - Last

Cross_Last

Patrick - Full

Pat_Full

Patrick - Last

Pat_Last

Player Name - Name Length

He

To deal with situations where there are no Switches that match the current situation in game, you can create a path with a default or fallback Switch. These fallback paths contain one or more Switch Groups instead of Switches and are usually associated with a more general sound object. In the previous example, the fallback Switch Group path is associated with the sound object “he” instead of one of the player's names.

After you have re-created all the conditions in the dialogue event, it can be integrated into the game engine. When the dialogue events are called by the game, the sound engine resolves the dialogue event by returning the audio object that corresponds to the matching argument path. The sound engine can then decide whether to insert the audio object into a dynamic sequence for playback. The relationship between returning an audio object and inserting it into a dynamic sequence does not have to be 1:1. This means that for each resolved dialogue event, a returned audio object can be added to the dynamic sequence as many times as necessary.

Since the game engine uses the dialogue event name, you can create the events, integrate them into the game and then build and fine-tune the contents of each event without ever having to re-integrate them into the game again. This gives you a great deal of flexibility to add or remove argument values, and to experiment with different sounds, all without additional programming.

For more information on dynamic dialogue:

Wwise Help > Interacting with the Game > Managing Dynamic Dialogue > Working with Dialogue Events

Wwise Help > Interacting with the Game > Managing Dynamic Dialogue > Understanding the Dynamic Dialogue System

Wwise Help > Interacting with the Game > Managing Dynamic Dialogue > Dialogue Events Tips and Best Practices

Wwise Help > Interacting with the Game > Managing Dynamic Dialogue > Creating Dialogue Events