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 ​
CharacterCreationProfile | creation_profile | null |
int | selected_body_type_index | 0 |
String | selected_voice | "" |
String | selected_animation | "" |
String | custom_skeleton_tag | "humanoid" |
Dictionary | facial_mesh_config | {} |
Dictionary | color_config | {} |
Dictionary | blend_shape_config | {} |
Methods ​
void | set_selected_voice( voice_variant: String ) |
String | get_selected_voice() |
bool | has_selected_voice() |
int | get_selected_voice_index() |
String | get_voice_path() |
void | set_selected_animation( animation_type_value: String ) |
String | get_selected_animation() |
bool | has_selected_animation() |
int | get_selected_animation_index() |
void | set_facial_mesh( feature: GeneralSkeleton.FacialFeature, mesh_name: String ) |
String | get_facial_mesh( feature: GeneralSkeleton.FacialFeature ) |
bool | has_facial_mesh( feature: GeneralSkeleton.FacialFeature ) |
void | remove_facial_mesh( feature: GeneralSkeleton.FacialFeature ) |
Array[int] | get_configured_facial_features() |
void | clear_facial_mesh_config() |
void | set_color( param_name: String, color: Color ) |
Color | get_color( param_name: String ) |
bool | has_color( param_name: String ) |
void | remove_color( param_name: String ) |
Array[String] | get_configured_color_params() |
void | clear_color_config() |
void | set_blend_shape( shape_key: String, weight: float ) |
float | get_blend_shape( shape_key: String ) |
bool | has_blend_shape( shape_key: String ) |
void | remove_blend_shape( shape_key: String ) |
Array[String] | get_configured_blend_shapes() |
void | clear_blend_shape_config() |
String | get_skeleton_tag() |
void | set_skeleton_tag( tag: String ) |
bool | matches_skeleton_tag( tag: String ) |
CharacterCreationProfile | get_creation_profile() |
void | set_creation_profile( profile: CharacterCreationProfile ) |
bool | has_creation_profile() |
int | get_selected_body_type_index() |
void | set_selected_body_type_index( index: int ) |
PackedScene | get_selected_body_type() |
String | get_selected_body_type_name() |
Node | instantiate_body_type() |
bool | has_customization() |
void | clear_all_customization() |
Dictionary | get_customization_snapshot() |
void | apply_customization_snapshot( snapshot: Dictionary ) |
void | duplicate_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