Skip to main content
Version: 1.3

SproutyDialogsPortraitData

Inherits: Resource

Description​

This resource stores data for character portraits. Each portrait includes the reference for the portrait scene, transform settings and overrides properties.

Properties​

TypeNameDefault
Stringportrait_scene_path""
Dictionaryexport_overrides{}
Dictionarytransform_settingsSee description
Dictionarytyping_soundSee description

Property Descriptions​

var portrait_scene_path : String = ""

Path to the portrait scene used for this portrait. This is stored as a fallback to load the portrait scene when its stored UID is no longer valid. This is for reference only, the portrait scene is set on the character editor.


var export_overrides : Dictionary = {}

Portrait exported overrides properties. This is a dictionary where each key is the property name to override and its value is a dictionary containing the value and type of the property.

The dictionary structure is as follows:

{
"property_name_1": {
"value": value_of_property_1,
"type": 0 # 0 for NIL from Variant.Type enum
},
"property_name_2": {
"value": value_of_property_2,
"type": 1 # 1 for BOOL from Variant.Type enum
},
...
}

var transform_settings : Dictionary

Transform settings for the portrait. This is a dictionary containing the following keys:

  • ignore_main_transform: whether to ignore the main transform settings from the character.
  • scale: the scale of the portrait.
  • scale_lock_ratio: whether to lock the aspect ratio of the scale.
  • offset: the offset of the portrait.
  • rotation: the rotation of the portrait in degrees.
  • mirror: whether to mirror the portrait.

Default values:

{
"ignore_main_transform": false,
"scale": Vector2.ONE,
"scale_lock_ratio": true,
"offset": Vector2.ZERO,
"rotation": 0.0,
"mirror": false
}

var typing_sound : Dictionary

Typing sound for the character portrait. This is a dictionary containing the sound data for typing sounds.

Default values:

{
"path": "",
"volume": 1.0,
"pitch": 1.0
}

(Not used yet, typing sounds implementation is pending)!