Table of Contents

Start Page » Game Development with the Drag[en]gine » Drag[en]gine Integrated Game Development Environment » Conversation Editor » Conversation Actions

Conversation Actions provide the basic steps in a conversation script. Actions have a Waiting Condition. The waiting condition composes of a Delay in seconds and an Conversation Actor indication. If the conversation actor is present the action waits for the conversation actor to be ready for acting. Conversation actors are considered not ready for acting if they are speaking or if they are carrying out a game action preventing them to act. What conditions define if an actor can act is game specific and can be adjusted dynamically by game scripts. It is also possible to wait for all actors in the conversation to become ready for acting. This is the default. Once all request actors are ready for acting the Delay starts counting down. Once the delay finishes the action is carried out and the script advances to the next action. If no more actions are present the conversation playback stops. If multiple actions in succession have no actor to wait for and 0 seconds delay they are immediately carried out. This makes it possible to create scripts carrying out a set of actions and then immediately stop for example spawning and configure a couple of actors for an upcoming game event.

The following list describes the available actions

Add Actor Action

Adds a conversation actor to the conversation. The actor is not allowed to be present in any conversation including this one. Once added the conversation actor is identified by the Unique Name of the conversation actor and an optional Alias Name the user can assign using this action. This action finishes immediately if activated.

Remove Actor Action

Removes a conversation actor from the conversation. The actor has to be present in this conversation for the action to work. The conversation actor is identified either using its Unique Name or the Alias Name, whichever matches. To avoid confusion chosen alias names should not collide with unique names

Actor Speak Action

Makes an actor speak. The actor is identifier by index or its Unique Name or Alias Name, whichever matches. This action is quite complex. Various parameters can be set to make the actor speak. The action updates all needed data structures in the conversation actor to star speaking, then it finishes. This is important to understand the playback of actions. Actor speak actions only set up the speaking but finish immediately afterwards. This allows to make an actor speak while soon after trigger actions carried out while the actor is still speaking. The actor speak action also makes use of the Speech Panel in the lower part of the window. The following parameters can be set using the action panel or the speech panel:

Text Box Text

Shows a subtitle box with the specified text on screen. The game scripts define how this looks and behaves like. Special tags can be used in the text if the game scripts defines the appropriate parsing and handling. The duration of showing the text box is game specific but usually as long as the Speech Time of the conversation actor plus some delay.

Text Box Style

Optional identifier defining the text box style. This is a game specific string the user can handle any way he wants.

Sound File

Optional sound file to play back. If set plays back the sound with the Speaker attached to the conversation actor if present. The game scripts define how the sound is played back.

Words

Defines optional sequence of words matching the speech. Words are used to drive Speech Animation for example mouth movement. Words are edited in the speech panel. Each word has a Duration in seconds and a Pause in seconds. Duration defines the duration of the speech animation of the word. Pause defines the delay after the previous word to start the speech animation of the word. Context menu allows to set up words from the text box text with proper duration. This requires an actor to be loaded into the editor with an associated Speech Animation to figure out supported words and their duration.

Use Speech Animation

Defines if the speech animation defined in the actor is used to animate speaking words. Typically used to prevent mouth animation if an actors is thinking instead of speaking.

Face Poses

Defines optional sequence of face poses. Has the same parameters as words but matches Face Poses defined in the conversation. Face poses are played back by the game scripts using an Animator overlaying a face pose onto the actor animation. Face poses defined in the conversation can compose of different animation states blended together. See Face Poses for how they are defined.

Gestures

Defines optional sequence of gestures. Has the same parameters as words but matches Gestures defined in the conversation. Gestures are played back by the game scripts using an Animator overlaying a gesture onto the actor animation. Gestures are always defined to work for a specific Actor Pose. The game scripts defined what actor poses are. In general an actor pose refers to a specific Animator or a set of similar Animators. A gesture is made to properly overlay such a set of animators. If the actor pose is not matching the respective gesture is skipped as if the next gesture had a longer pause.

Gestures can be of two different flavours. The animator used for a gesture has to provide up to 3 Controllers.

The first controller is the Playback Progress and is set to the elapsed time clamped to the duration of the gesture. This is the main controlled used for a simple gestures stretching to play back over the duration of the gesture.

The second controller Playback is optional and incremented by the elapsed time continuously. This controller is artist controlled and allows to play back animations that hold on after the gesture finishes. Typically this controller is not clamped and drives a looping animation which the first controller is used to blend into. If this kind of gesture is made the gesture duration is set to match the desired blend-in time.

The third controller Variation is optional too and is set to a random value at the start of the gesture. This allows artists to define variations of the same gesture picked randomly each time the same gesture is played back.

Head Look-At

Defines optional sequence of head look-at targets. Has the same parameters as word but matches Targets defined in the conversation. Head look-ats are played back by game scripts to make actors point their head at a specific target. Targets can be anything like spots on actors or conversation systems. The head is adjusted to the desired look-at position over the duration time of the look-at.

Eyes Look-At

Defines optional sequence of eyes look-at targets. Works similar to Head Look-At but affects the target the actor eyes are focused at.

Minimum Speech Time

Defines the speech time of the actor. Speech time is used to determine how long a conversation actor is not able to act and thus how long an action waiting for this actor is waiting. If set to 0 the speech time is automatically calculated. The automatic speech time is the maximum of the sound file length (if present) and the length of the words (if defined). Setting the speech time is useful if an actor should finished some gestures (which do not count for speech time) or the player is supposed to see an actor speech longer than it actually is (for example important hints).

Actor Command Action

Sends a string command to the actor specified by either index, Unique Name or Alias Name. This is a multi-tool for game developers to trigger game specific behaviour on actors. The scripting language scripts will deliver the string command as an array or list of strings the actor scripts can parse. Actor command actions finish immediately.

Camera Shot Action

Sets active camera shot. The Name parameter matches one from the Camera Shots defined in the conversation. The Duration parameter defines the time frame over which the camera shot is animated. Once finished camera shot stays at the end position. The Camera Target matches the Targets defined in the conversation and defines the location the camera is mounted at. The Look-At Target matches the Targets defined in the conversation and defines the location the camera is looking at. If both targets are identical camera shots are relative to the target orientation in the world. If both targets are different the camera lines up with the connection line between the two targets. Later one is best used for dynamic shots like OTS (over the shoulder) shots. Camera shot actions finish immediately.

Add Coordinate System Action

Adds a Coordinate System to the conversation. Coordinate systems are entities not being conversation actors. This allows to reference targets in the game world like certain objects or markers. What is a coordinate system is the responsibility of the game scripts. All coordinate systems are identified using a unique Identifier. Additionally an Alias Identifier can be set in the action. This works similar like Alias Names for conversation actors. Once added coordinate systems are typically used in Targets which in turn are used for different types of actions. Game scripts can also use coordinate systems themselves to reference specific locations or objects in the game world.

In contrary to conversation actors coordinate systems can be added to any number of conversations. It is not allowed to add a coordinate system that is already part of the conversation. Add coordinate system actions finish immediately.

Remove Coordinate System Action

Removes a Coordinate System from the conversation. The coordinate system is identified using its Identifier or Alias Identifier, whichever matches. It is not allowed to remove a coordinate system not being part of the conversation. Remove coordinate system actions finish immediately.

Game Command Action

Sends a string command to the conversation playback object. This is a multi-tool for game developers to trigger game specific behaviour on the entire game. The scripting language scripts will deliver the string command as an array or list of strings the conversation playback can parse. Game command actions finish immediately.

If-Else Action

Plays back the actions of the first If-Case whose condition evaluates to true. If no such if-case is applicable the Else-Case actions are played back. See Conversation Conditions for possible conditions that can be used. If no condition is set on an if-case this equals to the condition evaluating to false. Multiple if-cases can be defined. They are evaluated in the order they are specified. If-else actions do not finish immediately. They finish once the chosen action list has finished playing back.

Player Choice Action

Shows a choice dialog for the player to pick an option from. Once chosen the actions belonging to the chosen option are played back. The game scripts define how the player choice dialog looks and behaves like. Each Option contains the text to display and the actions to play back if selected. The player has to make a choice. If the game scripts allow to cancel the dialog this has to trigger any of the present options. If you wish to allow such a scenario you have to designate one of the actions as cancel action.

The Variable Name is an option parameter that defines the variable to be set with the index of the chosen option (first option has index 0). If used this allows to later on alter the course of conversation by examining the value of the variable.

An optional list of Idle Actions can be defined to be played back while the player is deciding what to do. The actions in the list are looped until the player makes a decision. Be careful how you set up the idle actions in this list. After the player makes a choice the actions in the chosen option are not started to play back unless the current idle action has finished waiting. In particular this means if an action is waiting for an actor to finish speaking the chosen option actions will not start playing back until the actor finished speaking. The idle actions are thus only aborted if the current action has finished waiting for actors and is counting down the delay. Also avoid using actions not finishing immediately. These will also block playing back the chosen actions until they have finished.

The player choice action does not finish immediately. It finished once the player made a choice and the last action in the list of actions in the chosen option finished playing back.

Set Actor Parameter Action

Sets an Actor Parameter in a conversation actor. Actor parameters are named integer parameters conversation actors store in the game scripts. The game scripts define the meaning of actor parameters. This allows conversation scripts to alter behaviour of actors beyond finishing playing back by means of altering integer parameters. The actor is identified by index, Unique Name or Alias Name. The Operator defines how the parameter is updated by the specified Value. The parameter is either Set to the specified value, Incremented by the specified value or Decremented by the specified value. If the parameter has never been accessed before incrementing and decrementing uses 0 as current value. Negative values are allowed. The set actor parameter action finishes immediately.

Set Variable Action

Sets a Conversation Variable. Works similar to Set Actor Parameter Action but affects a variable existing only inside this conversation playback for the duration of the playback. Variables can be accessed after the playback finished as long as the playback instance is not discarded. The set variable action finishes immediately.

Snippet Action

Plays back the actions of a different Topic in different Topic Group. This allows to reuse conversation snippets or creating dynamic conversations where individual conversation parts are stored in individual topics for better management. The snippet action does not finish immediately. Once the actions in the chosen topic finished playing back the action finishes. If the topic is not found the action finishes immediately.

Stop Conversation Action

Stops playing back the conversation. This action finishes immediately. Once finishes the playback finishes with the playback callback notified.

Stop Topic Action

Stops playing back the current topic. This action finishes immediately. The behaviour is different from Stop Conversation Action if a Snippet Action is currently playing back. In this case only the topic started by the snippet action is stopped and playback continues after the snippet action. Only the inner most snippet action is stopped this way.

Trigger Action

Modifies a Game Trigger. Game triggers are managed by the game scripts. Using the trigger action a conversation script can trigger game events like Trigger Elements inside a world (for example a touch sensor). The trigger is identified by the Target Name. If the trigger does not exist in the game world it is created. The Action defines how the trigger is manipulated. The trigger can be Fired, Reset, Pulsed and Full Reset. Triggers have two states: Fired and Ever Fired. The fired state indicates if the trigger is in the fired stated right now. The ever fired state indicates if the trigger has ever been fired in his lifetime. The Fire action changes the trigger stated to fired. The Reset action changes the trigger state to not fired. The Full Reset action resets the trigger state to not fired and also reset the ever fired state to never fired. The Pulse action does the same as using Reset immediately after Fire. The trigger action finishes immediately.

Wait Action

Plays back a list of Idle Actions while waiting for a condition to evaluate to true. See Conversation Conditions for possible conditions that can be used. Once the condition evaluates to true the idle actions playback stops with the same caveats as in Player Choice Action. The Interval can be used to indicate the time elapsed between re-evaluating the condition. This can be useful if the condition uses expensive game or actor commands or if special effects are desired like conversation scripts not reacting immediately to a change. The wait action has the same finish behaviour as Player Choice Action.

Comment Action

Places a visual comment in the actions list for conversation script authors to help them organize their conversation scripts. Comment actions are ignored in actual conversation (actually they are not even loaded in the first place).