ModularSkeleton ​
Inherits: GeneralSkeleton < Skeleton3D
Inherited by: CustomSkeleton
Enhanced ModularSkeleton for RPGToolkit integration Full support for body parts, equipment, and skins with unified flow matching GeneralSkeleton Uses GeneralSkeleton enums directly - no custom MeshSlot enum needed
Properties ​
String | modular_equipment_type_tag | "" |
Variables ​
Dictionary | base_body_meshes | {} |
Dictionary | base_facial_meshes | {} |
Dictionary | base_body_skins | {} |
Dictionary | base_facial_skins | {} |
bool | base_meshes_initialized | false |
Dictionary | original_body_part_skins | {} |
Methods ​
Property descriptions ​
String modular_equipment_type_tag = "" ​
The tag used to fetch the correct mesh data from equipment items This should match one of the tags in the equipment database folder structure Example: "humanoid", "beast", "undead"
Variable descriptions ​
Dictionary base_body_meshes = ​
The meshes the body had before equipment changed them, by body slot (to give them back).
Dictionary base_facial_meshes = ​
The meshes the face had before changes, by facial feature.
Dictionary base_body_skins = ​
The skins the body had before changes, by body slot.
Dictionary base_facial_skins = ​
The skins the face had before changes, by facial feature.
bool base_meshes_initialized = false ​
True once the starting meshes were stored.
Dictionary original_body_part_skins = ​
Storage for original skins before equipment changes them (body parts)
Method descriptions ​
String get_skeleton_type() ​
The kind of skeleton ("ModularSkeleton").
String get_modular_equipment_tag() ​
Get the tag used for fetching equipment mesh data
void set_modular_equipment_tag( tag: String ) ​
Set the tag used for fetching equipment mesh data
bool has_modular_equipment_tag() ​
Check if this skeleton has a valid equipment tag configured
MeshInstance3D get_body_mesh_instance( body_slot: BodySlot ) ​
Public API: Get body mesh instance for a given slot
MeshInstance3D get_facial_mesh_instance( facial_feature: FacialFeature ) ​
Public API: Get facial mesh instance for a given feature
bool set_body_part_mesh_with_materials( body_slot: BodySlot, mesh: Mesh, material_overrides: Array = [], skin: Skin = null, scale: float = 1.0 ) ​
Override: Set body part mesh with full material array and skin support
bool remove_body_part_mesh( body_slot: BodySlot ) ​
Override: Remove body part mesh
bool restore_body_part_mesh( body_slot: BodySlot ) ​
Override: Restore body part mesh to base version
void store_original_body_part_skin( body_slot: BodySlot ) ​
Override: Store the current skin as the original for a body part (call before equipping)
void restore_original_body_part_skin( body_slot: BodySlot ) ​
Override: Restore the original skin for a body part (call when unequipping)
void clear_stored_original_body_part_skins() ​
Clear stored original body part skins (cleanup method)
bool has_stored_original_body_part_skin( body_slot: BodySlot ) ​
Check if we have stored original skin for a body part
bool set_facial_feature_mesh_with_materials( facial_feature: FacialFeature, mesh: Mesh, material_overrides: Array = [], skin: Skin = null, scale: float = 1.0 ) ​
Enhanced: Set facial feature mesh with full support
bool remove_facial_feature_mesh( facial_feature: FacialFeature ) ​
Remove facial feature mesh
bool restore_facial_feature_mesh( facial_feature: FacialFeature ) ​
Restore facial feature mesh
void hide_hair_for_helmet() ​
Hide hair and facial hair when helmet is equipped
void show_hair_after_helmet() ​
Show hair and facial hair when helmet is unequipped
bool should_hide_hair_for_helmet() ​
Check if hair should be hidden (called from GeneralSkeleton)
int clear_all_body_part_meshes() ​
Hides every body part. Gives how many were hidden.
int clear_all_facial_feature_meshes() ​
Hides every facial feature. Gives how many were hidden.
int restore_all_body_part_meshes() ​
Shows every body part again. Gives how many were restored.
int restore_all_facial_feature_meshes() ​
Shows every facial feature again. Gives how many were restored.