Skip to content

CustomCharacterDefinition ​

Inherits: CharacterDefinition < EntityDefinition < DatabaseResource < Resource

CustomCharacterDefinition - Extended character template with full customization support Stores facial feature configurations, shader color parameters, blend shape weights, and voice selection for creating unique, customizable player characters

Properties ​

CharacterCreationProfilecreation_profilenull
intselected_body_type_index0
Stringselected_voice""
Stringselected_animation""
Stringcustom_skeleton_tag"humanoid"
Dictionaryfacial_mesh_config{}
Dictionarycolor_config{}
Dictionaryblend_shape_config{}

Methods ​

voidset_selected_voice( voice_variant: String )
Stringget_selected_voice()
boolhas_selected_voice()
intget_selected_voice_index()
Stringget_voice_path()
voidset_selected_animation( animation_type_value: String )
Stringget_selected_animation()
boolhas_selected_animation()
intget_selected_animation_index()
voidset_facial_mesh( feature: GeneralSkeleton.FacialFeature, mesh_name: String )
Stringget_facial_mesh( feature: GeneralSkeleton.FacialFeature )
boolhas_facial_mesh( feature: GeneralSkeleton.FacialFeature )
voidremove_facial_mesh( feature: GeneralSkeleton.FacialFeature )
Array[int]get_configured_facial_features()
voidclear_facial_mesh_config()
voidset_color( param_name: String, color: Color )
Colorget_color( param_name: String )
boolhas_color( param_name: String )
voidremove_color( param_name: String )
Array[String]get_configured_color_params()
voidclear_color_config()
voidset_blend_shape( shape_key: String, weight: float )
floatget_blend_shape( shape_key: String )
boolhas_blend_shape( shape_key: String )
voidremove_blend_shape( shape_key: String )
Array[String]get_configured_blend_shapes()
voidclear_blend_shape_config()
Stringget_skeleton_tag()
voidset_skeleton_tag( tag: String )
boolmatches_skeleton_tag( tag: String )
CharacterCreationProfileget_creation_profile()
voidset_creation_profile( profile: CharacterCreationProfile )
boolhas_creation_profile()
intget_selected_body_type_index()
voidset_selected_body_type_index( index: int )
PackedSceneget_selected_body_type()
Stringget_selected_body_type_name()
Nodeinstantiate_body_type()
boolhas_customization()
voidclear_all_customization()
Dictionaryget_customization_snapshot()
voidapply_customization_snapshot( snapshot: Dictionary )
voidduplicate_customization_to( target: CustomCharacterDefinition )
Array[String]validate()

Property descriptions ​

Profile Configuration

CharacterCreationProfile creation_profile = null ​

Reference to the CharacterCreationProfile this character was created from Used to validate customization options and access body type scenes

int selected_body_type_index = 0 ​

Index of the selected body type from the profile's body_types array This determines which skeleton scene (e.g., HumanMale vs HumanFemale) is used

Voice Configuration

String selected_voice = "" ​

Selected voice variant name (e.g., "Male_01", "Female_02") Should match an entry in the profile's available_voices array

Animation Configuration

String selected_animation = "" ​

Selected animation type (e.g., "humanoid_default", "humanoid_athletic") Should match an entry in the profile's available_animations array

Skeleton Configuration

String custom_skeleton_tag = "humanoid" ​

The skeleton tag this character customization is designed for (e.g., "humanoid") Ensures facial/body mesh data matches the intended skeleton type

Facial Customization

Dictionary facial_mesh_config = ​

Facial mesh configuration: { FacialFeature (int) : mesh_name (String) } Maps GeneralSkeleton.FacialFeature enum values to selected mesh names Example: { 0: "default_eyes", 9: "aquiline_nose" }

Color Customization

Dictionary color_config = ​

Color configuration: { shader_param_name (String) : color (Color) } Maps shader parameter names to their color values Example: { "skin_color": Color(0.9, 0.7, 0.6), "eye_color": Color(0.2, 0.5, 0.8) }

Blend Shape Customization

Dictionary blend_shape_config = ​

Blend shape configuration: { shape_key (String) : weight (float) } Maps blend shape/morph target names to their weight values (typically 0.0 - 1.0) Example: { "brow_height": 0.5, "jaw_width": 0.3, "nose_length": -0.2 }

Method descriptions ​

void set_selected_voice( voice_variant: String ) ​

Set selected voice variant

String get_selected_voice() ​

Get selected voice variant

bool has_selected_voice() ​

Check if voice is selected

int get_selected_voice_index() ​

Get selected voice index from profile

String get_voice_path() ​

Get full voice path for DatabaseAudio lookup

void set_selected_animation( animation_type_value: String ) ​

Set selected animation type

String get_selected_animation() ​

Get selected animation type

bool has_selected_animation() ​

Check if animation is selected

int get_selected_animation_index() ​

Get selected animation index from profile

void set_facial_mesh( feature: GeneralSkeleton.FacialFeature, mesh_name: String ) ​

Set facial mesh for a specific feature

String get_facial_mesh( feature: GeneralSkeleton.FacialFeature ) ​

Get facial mesh name for a specific feature

bool has_facial_mesh( feature: GeneralSkeleton.FacialFeature ) ​

Check if facial feature has a mesh assigned

void remove_facial_mesh( feature: GeneralSkeleton.FacialFeature ) ​

Remove facial mesh for a specific feature

Array[int] get_configured_facial_features() ​

Get all configured facial features

void clear_facial_mesh_config() ​

Clear all facial mesh configurations

void set_color( param_name: String, color: Color ) ​

Set color for a shader parameter

Color get_color( param_name: String ) ​

Get color for a shader parameter

bool has_color( param_name: String ) ​

Check if color parameter is configured

void remove_color( param_name: String ) ​

Remove color configuration for a parameter

Array[String] get_configured_color_params() ​

Get all configured color parameter names

void clear_color_config() ​

Clear all color configurations

void set_blend_shape( shape_key: String, weight: float ) ​

Set blend shape weight

float get_blend_shape( shape_key: String ) ​

Get blend shape weight

bool has_blend_shape( shape_key: String ) ​

Check if blend shape is configured

void remove_blend_shape( shape_key: String ) ​

Remove blend shape configuration

Array[String] get_configured_blend_shapes() ​

Get all configured blend shape keys

void clear_blend_shape_config() ​

Clear all blend shape configurations

String get_skeleton_tag() ​

Get the skeleton tag this character is designed for

void set_skeleton_tag( tag: String ) ​

Set the skeleton tag

bool matches_skeleton_tag( tag: String ) ​

Check if skeleton tag matches

CharacterCreationProfile get_creation_profile() ​

Get the creation profile

void set_creation_profile( profile: CharacterCreationProfile ) ​

Set the creation profile

bool has_creation_profile() ​

Check if has a creation profile

int get_selected_body_type_index() ​

Get selected body type index

void set_selected_body_type_index( index: int ) ​

Set selected body type index

PackedScene get_selected_body_type() ​

Get the selected body type scene from the profile

String get_selected_body_type_name() ​

Get the selected body type name from the profile

Node instantiate_body_type() ​

Instantiate the selected body type scene

bool has_customization() ​

Check if character has any customization

void clear_all_customization() ​

Clear all customization data

Dictionary get_customization_snapshot() ​

Get complete customization snapshot (for save/load)

void apply_customization_snapshot( snapshot: Dictionary ) ​

Apply customization from snapshot (for save/load)

void duplicate_customization_to( target: CustomCharacterDefinition ) ​

Duplicate customization to another CustomCharacterDefinition

Array[String] validate() ​

Validate custom character configuration