|
Drag[en]gine Script Module DragonScript 1.32.1
|
Convert simple conversation snippet into conversation actions. More...
Classes | |
| class | Gesture |
| Gesture to be added to speech. More... | |
| class | State |
| Conversation state. More... | |
Public Member Functions | |
| void | convert (SimpleConversationSnippet snippet, SimpleConversation simpleConversation, ConversationPlayback playback) |
| Convert snippet adding conversation actions similar to CActionSnippet. | |
| void | convert (SimpleConversationSnippet snippet, SimpleConversation simpleConversation, ConversationPlayback playback, Array actions) |
| Convert snippet adding conversation actions similar to CActionSnippet. | |
| void | convert (SimpleConversationSnippet snippet, SimpleConversation simpleConversation, ConversationPlayback playback, bool advance) |
| Convert snippet adding conversation actions similar to CActionSnippet. | |
| UnicodeString | getCharsPhraseBreak () |
| Matching string with characters separating phrases. | |
| UnicodeString | getCharsSubPhraseBreak () |
| Matching string with characters separating sub phrases. | |
| UnicodeString | getCharsWordBreak () |
| Matching string with characters separating words. | |
| float | getElongateSpeak () |
| Elongate speaking duration. | |
| float | getEstimateWordLength () |
| Average character length. | |
| float | getFacePoseDuration () |
| Face pose duration. | |
| float | getLookAtDuration () |
| Look-at duration. | |
| float | getMinGestureDuration () |
| Minimum available duration for gesture to start playing. | |
| int | getMinSpeakCountCameraChange () |
| Minimum count of actor speaks before switch camera. | |
| float | getPausePhrase () |
| Pause in seconds to insert after a phrase break. | |
| float | getPauseSubPhrase () |
| Pause in seconds to insert after a sub phrase break. | |
| bool | getScaleLastGesture () |
| Scale last gesture to fit speech length. | |
| float | getSpeakSpeed () |
| Speaking speed. | |
| SimpleConversationConverter | new () |
| Create simple conversation convertor. | |
| void | setCharsPhraseBreak (UnicodeString chars) |
| Set matching string with characters separating phrases. | |
| void | setCharsSubPhraseBreak (UnicodeString chars) |
| Set matching string with characters separating sub phrases. | |
| void | setCharsWordBreak (UnicodeString chars) |
| Set matching string with characters separating words. | |
| void | setElongateSpeak (float duration) |
| Set elongate speaking duration. | |
| void | setEstimateWordLength (float length) |
| Set average character length. | |
| void | setFacePoseDuration (float duration) |
| Set face pose duration. | |
| void | setLookAtDuration (float duration) |
| Set look-at duration. | |
| void | setMinGestureDuration (float duration) |
| Set minimum available duration for gesture to start playing. | |
| void | setMinSpeakCountCameraChange (int count) |
| Set minimum count of actor speaks before switch camera. | |
| void | setPausePhrase (float seconds) |
| Set pause in seconds to insert after a phrase break. | |
| void | setPauseSubPhrase (float seconds) |
| Set pause in seconds to insert after a sub phrase break. | |
| void | setScaleLastGesture (bool scale) |
| Set scale last gesture to fit speech length. | |
| void | setSpeakSpeed (float speed) |
| Set speaking speed. | |
Public Attributes | |
| float | pAverageCharacterLength |
| UnicodeString | pCharsWordBreak |
| float | pFacePoseDuration |
| float | pMinGestureDuration |
| int | pMinSpeakCountCameraChange |
| float | pPausePhrase |
| bool | pScaleLastGesture |
| float | pSpeakSpeed |
Protected Member Functions | |
| void | applyCameraWaitMode (State state, ConversationAction action, Enumeration mode) |
| Apply camera wait mode to conversation action. | |
| void | applySpeechPause (State state) |
| Apply speech pause if present. | |
| float | cameraDelay (State state, SimpleConversationCamera camera, Enumeration mode) |
| Delay to use for camera change. | |
| void | closeActions (State state) |
| Close open conversation actions if present. | |
| void | closeSpeak (State state) |
| Close open actor speak conversation action if present. | |
| void | convert (State state) |
| Convert snippet using state. | |
| void | convertActor (State state, SimpleConversationAction action) |
| Convert actor action. | |
| void | convertAddActor (State state, SimpleConversationAction action) |
| Convert add actor action. | |
| void | convertAddCoordSystem (State state, SimpleConversationAction action) |
| Convert add coordinate system action. | |
| void | convertCamera (State state, SimpleConversationCamera camera, SimpleConversationCameraShot shot, Enumeration mode) |
| Add camera conversation actor. | |
| void | convertCameraActorCommand (State state, SimpleConversationCamera camera, SimpleConversationCameraShot shot, Enumeration mode) |
| Add camera conversation actor using actor command. | |
| void | convertCameraGameCommand (State state, SimpleConversationCamera camera, SimpleConversationCameraShot shot, Enumeration mode) |
| Add camera conversation actor using game command. | |
| void | convertCameraShot (State state, SimpleConversationCamera camera, SimpleConversationCameraShot shot, Enumeration mode) |
| Add camera conversation actor using camera shot. | |
| void | convertCameraSnippet (State state, SimpleConversationCamera camera, SimpleConversationCameraShot shot, Enumeration mode) |
| Add camera conversation actor using snippet. | |
| void | convertCommand (State state, SimpleConversationAction action) |
| Convert command action. | |
| ConversationCondition | convertCondition (State state, SimpleConversationCondition condition) |
| Convert condition. | |
| void | convertFacePose (State state, ConversationFacePose facePose, float duration) |
| Add conversation face pose. | |
| void | convertFacePose (State state, SimpleConversationAction action) |
| Convert face pose action. | |
| void | convertGesture (State state, ConversationGesture gesture) |
| Add conversation gesture. | |
| void | convertGesture (State state, SimpleConversationAction action) |
| Convert gesture action. | |
| void | convertIfElif (State state, SimpleConversationAction action) |
| Convert if/elif action. | |
| void | convertLookAt (State state, ConversationTarget lookAt, float duration) |
| Add conversation look-at. | |
| void | convertLookAt (State state, SimpleConversationAction action) |
| Convert look-at action. | |
| void | convertMusic (State state, SimpleConversationAction action) |
| Convert music action. | |
| void | convertPlayerChoice (State state, SimpleConversationAction action) |
| Convert player choice action. | |
| void | convertPlayerChoiceOption (State state, SimpleConversationAction action) |
| Convert player choice option action. | |
| void | convertRemoveActor (State state, SimpleConversationAction action) |
| Convert remove actor action. | |
| void | convertRemoveCoordSystem (State state, SimpleConversationAction action) |
| Convert remove coordinate system action. | |
| void | convertSnippet (State state, SimpleConversationAction action) |
| Convert snippet action. | |
| void | convertSpeak (State state, SimpleConversationAction action) |
| Convert speak action. | |
| void | convertStopConversation (State state, SimpleConversationAction action) |
| Convert stop conversation action. | |
| void | convertStopTopic (State state, SimpleConversationAction action) |
| Convert stop topic action. | |
| void | convertTrigger (State state, SimpleConversationAction action) |
| Convert modify trigger action. | |
| void | convertVariable (State state, SimpleConversationAction action) |
| Convert set variable action. | |
| void | convertWait (State state, SimpleConversationAction action) |
| Convert wait action. | |
| SimpleConversationSnippet | getSnippetRequired (State state, StringID id) |
| Get snippet throw exception if absent. | |
Convert simple conversation snippet into conversation actions.
|
protected |
Apply camera wait mode to conversation action.
|
protected |
Apply speech pause if present.
|
protected |
Delay to use for camera change.
|
protected |
Close open conversation actions if present.
|
protected |
Close open actor speak conversation action if present.
If closing updates last gesture duration if it is a held gesture. Stored actor information linked to speak conversation action are not cleared to reuse them.
| void Dragengine.ConversationSystem.SimpleConversationConverter.convert | ( | SimpleConversationSnippet | snippet, |
| SimpleConversation | simpleConversation, | ||
| ConversationPlayback | playback | ||
| ) |
Convert snippet adding conversation actions similar to CActionSnippet.
Adds ConversationPlaybackLayer to conversation with converted actions.
| void Dragengine.ConversationSystem.SimpleConversationConverter.convert | ( | SimpleConversationSnippet | snippet, |
| SimpleConversation | simpleConversation, | ||
| ConversationPlayback | playback, | ||
| Array | actions | ||
| ) |
Convert snippet adding conversation actions similar to CActionSnippet.
Adds converted actions to actions array.
| void Dragengine.ConversationSystem.SimpleConversationConverter.convert | ( | SimpleConversationSnippet | snippet, |
| SimpleConversation | simpleConversation, | ||
| ConversationPlayback | playback, | ||
| bool | advance | ||
| ) |
Convert snippet adding conversation actions similar to CActionSnippet.
Adds ConversationPlaybackLayer to conversation with converted actions. The value of advance is used in the ConversationPlaybackLayer constructor to advance the actions iterator. Use true for advance unless you can not avoid calling ConversationPlayback::advanceToNextAction() later on.
|
protected |
Convert snippet using state.
|
protected |
Convert actor action.
Closes open actions if present. If actor is set adds action for switching camera. Then adds instance of CActionActorSpeak. If actor is not set uses the previous CActionActorSpeak actor. The added CActionActorSpeak and the matching conversation actor are not present in the state as open speak action. Throws exception if actor is not set and no previous CActionActorSpeak is present.
|
protected |
Convert add actor action.
Closes open actions if present then adds instance of CActionActorAdd.
|
protected |
Convert add coordinate system action.
Closes open actions if present then adds instance of CActionCoordSystemAdd.
|
protected |
Add camera conversation actor.
|
protected |
Add camera conversation actor using actor command.
|
protected |
Add camera conversation actor using game command.
|
protected |
Add camera conversation actor using camera shot.
|
protected |
Add camera conversation actor using snippet.
|
protected |
Convert command action.
Closes open actions if present. Then adds instance of CActionGameCommand or CActionActorCommand with 0 delay waiting for speaking actors to finish.
|
protected |
Convert condition.
|
protected |
Add conversation face pose.
|
protected |
Convert face pose action.
|
protected |
Add conversation gesture.
|
protected |
Convert gesture action.
|
protected |
Convert if/elif action.
If action is if-type closes open actions if present then adds instance of CActionIfElse with using 0 delay waiting for speaking actors to finish. Then adds converted conditions to the open if-else action. Then adds to this case actions of the referenced snippet.
|
protected |
Add conversation look-at.
|
protected |
Convert look-at action.
|
protected |
Convert music action.
Closes open actions if present then adds instance of CActionMusic.
|
protected |
Convert player choice action.
Closes open actions if present then adds instance of CActionPlayerChoice with using 0 delay waiting for speaking actors to finish.
|
protected |
Convert player choice option action.
Adds instance of CActionPlayerChoiceOption to the open player-choice action. Then adds to this option actions of the referenced snippet.
|
protected |
Convert remove actor action.
Closes open actions if present then adds instance of CActionActorRemove.
|
protected |
Convert remove coordinate system action.
Closes open actions if present then adds instance of CActionCoordSystemRemove.
|
protected |
Convert snippet action.
Closes open actions if present. If getSubTarget() is null adds referenced snippet actions. If getSubTarget() is not null adds CActionSnippet.
|
protected |
Convert speak action.
|
protected |
Convert stop conversation action.
Closes open actions if present. Then adds instance of CActionStopConversation with 0 delay waiting for speaking actors to finish.
|
protected |
Convert stop topic action.
Closes open actions if present. Then adds instance of CActionStopTopic with 0 delay waiting for speaking actors to finish.
|
protected |
Convert modify trigger action.
Closes open actions if present. Then adds instance of CActionTrigger using 0 delay waiting for speaking actors to finish.
|
protected |
Convert set variable action.
Closes open actions if present. Then adds instance of CActionSetVariable or CActionSetActorParameter depending if SimpleConversationAction::getTarge() is null or not. Action is set to use 0 delay waiting for speaking actors to finish.
|
protected |
Convert wait action.
Closes open actions if present then adds instance of CActionWait with using 0 delay waiting for speaking actors to finish. Then adds to the wait action the actions of the referenced snippet.
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.getCharsPhraseBreak | ( | ) |
Matching string with characters separating phrases.
Default value ".;:?!". Produces a long pause while speaking.
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.getCharsSubPhraseBreak | ( | ) |
Matching string with characters separating sub phrases.
Default value ",". Produces a short pause while speaking.
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.getCharsWordBreak | ( | ) |
Matching string with characters separating words.
Default value " \t\n\r,.;:\"?!()".
| float Dragengine.ConversationSystem.SimpleConversationConverter.getElongateSpeak | ( | ) |
Elongate speaking duration.
Slows down speaking by elongating the speak duration by a fixed amount of seconds. This gives users some time to locate the beginning of the text to read. Combined with getSpeakSpeed() this allows to fine tune the speak duration for users with different reading speeds. Default value is 0.15.
| float Dragengine.ConversationSystem.SimpleConversationConverter.getEstimateWordLength | ( | ) |
Average character length.
Used to estimate the length of a word without speech animation defining the length. Default value is 0.095.
| float Dragengine.ConversationSystem.SimpleConversationConverter.getFacePoseDuration | ( | ) |
Face pose duration.
Duration in seconds to use for added face poses unless explicitely set. Defines how fast the actor blends from the old face pose to the new face pose. Default value is 0.25.
| float Dragengine.ConversationSystem.SimpleConversationConverter.getLookAtDuration | ( | ) |
Look-at duration.
Duration in seconds to use for added look-ats unless explicitely set. Defines how fast the actor switches looking direction from old look-at to new look-at. Default value is 0.5.
| float Dragengine.ConversationSystem.SimpleConversationConverter.getMinGestureDuration | ( | ) |
Minimum available duration for gesture to start playing.
Default value is 0.5.
| int Dragengine.ConversationSystem.SimpleConversationConverter.getMinSpeakCountCameraChange | ( | ) |
Minimum count of actor speaks before switch camera.
If enabled triggers the camera switch defined in the speaking actor after a set amount of speaks have been done. This breaks long sequences of speaks with with random camera changes. To disable set count to a high value like 100.
Default value is 100.
| float Dragengine.ConversationSystem.SimpleConversationConverter.getPausePhrase | ( | ) |
Pause in seconds to insert after a phrase break.
Default value 0.5 .
| float Dragengine.ConversationSystem.SimpleConversationConverter.getPauseSubPhrase | ( | ) |
Pause in seconds to insert after a sub phrase break.
Default value 0.35 .
| bool Dragengine.ConversationSystem.SimpleConversationConverter.getScaleLastGesture | ( | ) |
Scale last gesture to fit speech length.
Default value is true.
|
protected |
Get snippet throw exception if absent.
| float Dragengine.ConversationSystem.SimpleConversationConverter.getSpeakSpeed | ( | ) |
Speaking speed.
Larger values slow down speaking which makes it easier for users to read the text. A value of 1 equals fast reading. A value of 1.1 is moderate speed. A value of 1.2 is slow speed. Default value is 1.1.
| SimpleConversationConverter Dragengine.ConversationSystem.SimpleConversationConverter.new | ( | ) |
Create simple conversation convertor.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setCharsPhraseBreak | ( | UnicodeString | chars | ) |
Set matching string with characters separating phrases.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setCharsSubPhraseBreak | ( | UnicodeString | chars | ) |
Set matching string with characters separating sub phrases.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setCharsWordBreak | ( | UnicodeString | chars | ) |
Set matching string with characters separating words.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setElongateSpeak | ( | float | duration | ) |
Set elongate speaking duration.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setEstimateWordLength | ( | float | length | ) |
Set average character length.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setFacePoseDuration | ( | float | duration | ) |
Set face pose duration.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setLookAtDuration | ( | float | duration | ) |
Set look-at duration.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setMinGestureDuration | ( | float | duration | ) |
Set minimum available duration for gesture to start playing.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setMinSpeakCountCameraChange | ( | int | count | ) |
Set minimum count of actor speaks before switch camera.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setPausePhrase | ( | float | seconds | ) |
Set pause in seconds to insert after a phrase break.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setPauseSubPhrase | ( | float | seconds | ) |
Set pause in seconds to insert after a sub phrase break.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setScaleLastGesture | ( | bool | scale | ) |
Set scale last gesture to fit speech length.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setSpeakSpeed | ( | float | speed | ) |
Set speaking speed.
| float Dragengine.ConversationSystem.SimpleConversationConverter.pAverageCharacterLength |
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.pCharsWordBreak |
| float Dragengine.ConversationSystem.SimpleConversationConverter.pFacePoseDuration |
| float Dragengine.ConversationSystem.SimpleConversationConverter.pMinGestureDuration |
| int Dragengine.ConversationSystem.SimpleConversationConverter.pMinSpeakCountCameraChange |
| float Dragengine.ConversationSystem.SimpleConversationConverter.pPausePhrase |
| bool Dragengine.ConversationSystem.SimpleConversationConverter.pScaleLastGesture |
| float Dragengine.ConversationSystem.SimpleConversationConverter.pSpeakSpeed |