|
Drag[en]gine Script Module DragonScript 1.35
|
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.
References getLookAtDuration(), and setLookAtDuration().
Referenced by getSnippetRequired().
|
protected |
Apply speech pause if present.
Referenced by getSnippetRequired().
|
protected |
Delay to use for camera change.
References setMinSpeakCountCameraChange().
Referenced by getSnippetRequired().
|
protected |
Close open conversation actions if present.
Referenced by getSnippetRequired().
|
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.
References convertRemoveCoordSystem().
Referenced by getSnippetRequired().
| 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.
References setElongateSpeak().
Referenced by convertCommand(), convertCondition(), convertPlayerChoice(), convertStopConversation(), convertStopTopic(), convertTrigger(), and getSnippetRequired().
| 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.
References pFacePoseDuration, and setFacePoseDuration().
| 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.
References getFacePoseDuration(), and pFacePoseDuration.
|
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.
Referenced by convertPlayerChoiceOption(), and getSnippetRequired().
|
protected |
Convert add actor action.
Closes open actions if present then adds instance of CActionActorAdd.
References convertIfElif(), and convertPlayerChoice().
Referenced by convertRemoveCoordSystem(), and getSnippetRequired().
|
protected |
Convert add coordinate system action.
Closes open actions if present then adds instance of CActionCoordSystemAdd.
References convertMusic(), and convertSnippet().
Referenced by convertRemoveCoordSystem(), and getSnippetRequired().
|
protected |
|
protected |
Add camera conversation actor using actor command.
References getMinSpeakCountCameraChange(), and pMinSpeakCountCameraChange.
Referenced by getSnippetRequired().
|
protected |
Add camera conversation actor using game command.
Referenced by getSnippetRequired().
|
protected |
Add camera conversation actor using camera shot.
Referenced by getSnippetRequired().
|
protected |
Add camera conversation actor using snippet.
Referenced by getSnippetRequired().
|
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.
References convert().
Referenced by convertSnippet(), and getSnippetRequired().
|
protected |
|
protected |
Add conversation face pose.
References pMinGestureDuration.
Referenced by convertWait(), and getSnippetRequired().
|
protected |
Convert face pose action.
References getScaleLastGesture().
|
protected |
Add conversation gesture.
References getMinGestureDuration().
Referenced by convertWait(), and getSnippetRequired().
|
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.
Referenced by convertAddActor(), and getSnippetRequired().
|
protected |
Add conversation look-at.
References pMinGestureDuration, and setMinGestureDuration().
Referenced by convertWait(), and getSnippetRequired().
|
protected |
Convert look-at action.
References pScaleLastGesture, and setScaleLastGesture().
|
protected |
Convert music action.
Closes open actions if present then adds instance of CActionMusic.
References convertTrigger(), and convertVariable().
Referenced by convertAddCoordSystem(), and getSnippetRequired().
|
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.
References convert().
Referenced by convertAddActor(), and getSnippetRequired().
|
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.
References convertActor(), and convertSpeak().
Referenced by convertRemoveActor(), and getSnippetRequired().
|
protected |
Convert remove actor action.
Closes open actions if present then adds instance of CActionActorRemove.
References convertPlayerChoiceOption(), and convertWait().
Referenced by convertRemoveCoordSystem(), and getSnippetRequired().
|
protected |
Convert remove coordinate system action.
Closes open actions if present then adds instance of CActionCoordSystemRemove.
References convertAddActor(), convertAddCoordSystem(), and convertRemoveActor().
Referenced by closeSpeak(), and getSnippetRequired().
|
protected |
Convert snippet action.
Closes open actions if present. If getSubTarget() is null adds referenced snippet actions. If getSubTarget() is not null adds CActionSnippet.
References convertCommand(), convertStopConversation(), and convertStopTopic().
Referenced by convertAddCoordSystem(), and getSnippetRequired().
|
protected |
Convert speak action.
References pMinSpeakCountCameraChange.
Referenced by convertPlayerChoiceOption(), and getSnippetRequired().
|
protected |
Convert stop conversation action.
Closes open actions if present. Then adds instance of CActionStopConversation with 0 delay waiting for speaking actors to finish.
References convert().
Referenced by convertSnippet(), and getSnippetRequired().
|
protected |
Convert stop topic action.
Closes open actions if present. Then adds instance of CActionStopTopic with 0 delay waiting for speaking actors to finish.
References convert().
Referenced by convertSnippet(), and getSnippetRequired().
|
protected |
Convert modify trigger action.
Closes open actions if present. Then adds instance of CActionTrigger using 0 delay waiting for speaking actors to finish.
References convert().
Referenced by convertMusic(), and getSnippetRequired().
|
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.
Referenced by convertMusic(), and getSnippetRequired().
|
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.
References convertFacePose(), convertGesture(), and convertLookAt().
Referenced by convertRemoveActor(), and getSnippetRequired().
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.getCharsPhraseBreak | ( | ) |
Matching string with characters separating phrases.
Default value ".;:?!". Produces a long pause while speaking.
References pAverageCharacterLength, and pSpeakSpeed.
Referenced by setPauseSubPhrase().
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.getCharsSubPhraseBreak | ( | ) |
Matching string with characters separating sub phrases.
Default value ",". Produces a short pause while speaking.
Referenced by setEstimateWordLength().
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.getCharsWordBreak | ( | ) |
Matching string with characters separating words.
Default value " \t\n\r,.;:\"?!()".
References pMinSpeakCountCameraChange, and pScaleLastGesture.
Referenced by setCharsSubPhraseBreak().
| 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.
Referenced by setScaleLastGesture().
| 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.
Referenced by setLookAtDuration().
| 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.
Referenced by convert().
| 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.
Referenced by applyCameraWaitMode().
| float Dragengine.ConversationSystem.SimpleConversationConverter.getMinGestureDuration | ( | ) |
Minimum available duration for gesture to start playing.
Default value is 0.5.
References pAverageCharacterLength.
Referenced by convertGesture().
| 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.
References getSpeakSpeed(), and pSpeakSpeed.
Referenced by convertCameraActorCommand().
| float Dragengine.ConversationSystem.SimpleConversationConverter.getPausePhrase | ( | ) |
Pause in seconds to insert after a phrase break.
Default value 0.5 .
Referenced by setElongateSpeak().
| float Dragengine.ConversationSystem.SimpleConversationConverter.getPauseSubPhrase | ( | ) |
Pause in seconds to insert after a sub phrase break.
Default value 0.35 .
Referenced by setFacePoseDuration().
| bool Dragengine.ConversationSystem.SimpleConversationConverter.getScaleLastGesture | ( | ) |
|
protected |
Get snippet throw exception if absent.
References applyCameraWaitMode(), applySpeechPause(), cameraDelay(), closeActions(), closeSpeak(), convert(), convertActor(), convertAddActor(), convertAddCoordSystem(), convertCamera(), convertCameraActorCommand(), convertCameraGameCommand(), convertCameraShot(), convertCameraSnippet(), convertCommand(), convertCondition(), convertFacePose(), convertGesture(), convertIfElif(), convertLookAt(), convertMusic(), convertPlayerChoice(), convertPlayerChoiceOption(), convertRemoveActor(), convertRemoveCoordSystem(), convertSnippet(), convertSpeak(), convertStopConversation(), convertStopTopic(), convertTrigger(), convertVariable(), convertWait(), getSnippetRequired(), pAverageCharacterLength, pCharsWordBreak, pFacePoseDuration, pMinGestureDuration, pMinSpeakCountCameraChange, pPausePhrase, pScaleLastGesture, and pSpeakSpeed.
Referenced by getSnippetRequired().
| 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.
Referenced by getMinSpeakCountCameraChange().
| SimpleConversationConverter Dragengine.ConversationSystem.SimpleConversationConverter.new | ( | ) |
Create simple conversation convertor.
References pAverageCharacterLength, pCharsWordBreak, pFacePoseDuration, pMinGestureDuration, pPausePhrase, and pSpeakSpeed.
| void Dragengine.ConversationSystem.SimpleConversationConverter.setCharsPhraseBreak | ( | UnicodeString | chars | ) |
Set matching string with characters separating phrases.
References pFacePoseDuration, pMinGestureDuration, pMinSpeakCountCameraChange, and pScaleLastGesture.
Referenced by setPauseSubPhrase().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setCharsSubPhraseBreak | ( | UnicodeString | chars | ) |
Set matching string with characters separating sub phrases.
References getCharsWordBreak(), and pCharsWordBreak.
Referenced by setSpeakSpeed().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setCharsWordBreak | ( | UnicodeString | chars | ) |
Set matching string with characters separating words.
References pCharsWordBreak, and pPausePhrase.
Referenced by setPausePhrase().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setElongateSpeak | ( | float | duration | ) |
Set elongate speaking duration.
References getPausePhrase(), pPausePhrase, and setPausePhrase().
Referenced by convert().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setEstimateWordLength | ( | float | length | ) |
Set average character length.
References getCharsSubPhraseBreak().
Referenced by setMinGestureDuration().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setFacePoseDuration | ( | float | duration | ) |
Set face pose duration.
References getPauseSubPhrase(), and setPauseSubPhrase().
Referenced by convert().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setLookAtDuration | ( | float | duration | ) |
| void Dragengine.ConversationSystem.SimpleConversationConverter.setMinGestureDuration | ( | float | duration | ) |
Set minimum available duration for gesture to start playing.
References pAverageCharacterLength, and setEstimateWordLength().
Referenced by convertLookAt().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setMinSpeakCountCameraChange | ( | int | count | ) |
Set minimum count of actor speaks before switch camera.
References pSpeakSpeed, and setSpeakSpeed().
Referenced by cameraDelay().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setPausePhrase | ( | float | seconds | ) |
Set pause in seconds to insert after a phrase break.
References pCharsWordBreak, and setCharsWordBreak().
Referenced by setElongateSpeak().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setPauseSubPhrase | ( | float | seconds | ) |
Set pause in seconds to insert after a sub phrase break.
References getCharsPhraseBreak(), and setCharsPhraseBreak().
Referenced by setFacePoseDuration().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setScaleLastGesture | ( | bool | scale | ) |
Set scale last gesture to fit speech length.
References getElongateSpeak().
Referenced by convertLookAt().
| void Dragengine.ConversationSystem.SimpleConversationConverter.setSpeakSpeed | ( | float | speed | ) |
Set speaking speed.
References setCharsSubPhraseBreak().
Referenced by setMinSpeakCountCameraChange().
| float Dragengine.ConversationSystem.SimpleConversationConverter.pAverageCharacterLength |
Referenced by getCharsPhraseBreak(), getMinGestureDuration(), getSnippetRequired(), new(), and setMinGestureDuration().
| UnicodeString Dragengine.ConversationSystem.SimpleConversationConverter.pCharsWordBreak |
Referenced by getSnippetRequired(), new(), setCharsSubPhraseBreak(), setCharsWordBreak(), and setPausePhrase().
| float Dragengine.ConversationSystem.SimpleConversationConverter.pFacePoseDuration |
Referenced by convert(), convert(), getSnippetRequired(), new(), and setCharsPhraseBreak().
| float Dragengine.ConversationSystem.SimpleConversationConverter.pMinGestureDuration |
Referenced by convertCamera(), convertFacePose(), convertLookAt(), getSnippetRequired(), new(), and setCharsPhraseBreak().
| int Dragengine.ConversationSystem.SimpleConversationConverter.pMinSpeakCountCameraChange |
Referenced by convertCameraActorCommand(), convertSpeak(), getCharsWordBreak(), getSnippetRequired(), and setCharsPhraseBreak().
| float Dragengine.ConversationSystem.SimpleConversationConverter.pPausePhrase |
Referenced by getSnippetRequired(), new(), setCharsWordBreak(), and setElongateSpeak().
| bool Dragengine.ConversationSystem.SimpleConversationConverter.pScaleLastGesture |
Referenced by convertLookAt(), getCharsWordBreak(), getSnippetRequired(), and setCharsPhraseBreak().
| float Dragengine.ConversationSystem.SimpleConversationConverter.pSpeakSpeed |
Referenced by getCharsPhraseBreak(), getMinSpeakCountCameraChange(), getSnippetRequired(), new(), and setMinSpeakCountCameraChange().