This contains the source code documentation of the class DialogicCharacter
.
DialogicCharacter
Inherits: Resource
Resource that represents a character in dialog. Manages/contains portraits, custom info and translation of characters.
Properties
Name | Type | Default |
---|---|---|
display_name | String | "" |
nicknames | Array | [] |
color | Color | Color(0, 0, 0, 1) |
description | String | "" |
scale | float | 1.0 |
offset | Vector2 | Vector2(0, 0) |
mirror | bool | false |
default_portrait | String | "" |
portraits | Dictionary | {} |
custom_info | Dictionary | {} |
Methods
Returns | Method |
---|---|
String | add_translation_id ( ) |
String | get_set_translation_id ( ) |
void | remove_translation_id ( ) |
String | get_property_translation_key ( property : int ) |
Array | get_nicknames_translated ( ) |
String | get_display_name_translated ( ) |
String | get_character_name ( ) |
Dictionary | get_portrait_info ( portrait_name : String ) |
Constants
No description available.
No description available.
Property Descriptions
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
Method Descriptions
func add_translation_id ( ) ⇒ String
Adds a translation ID to the character.
func get_set_translation_id ( ) ⇒ String
Returns the character's translation ID. Adds a translation ID to the character if it doesn't have one.
func remove_translation_id ( ) ⇒ void
Removes the translation ID from the character.
func get_property_translation_key ( property
: int ) ⇒ String
Checks property
and matches it to a translation key. Undefined behaviour if an invalid integer is passed.
func get_nicknames_translated ( ) ⇒ Array
Translates the nicknames of the characters and then returns them as an array of strings.
func get_display_name_translated ( ) ⇒ String
Translates and returns the display name of the character.
func get_character_name ( ) ⇒ String
Returns the best name for this character.
func get_portrait_info ( portrait_name
: String ) ⇒ Dictionary
Returns the info of the given portrait. Uses the default portrait if the given portrait doesn't exist.