Skip to content

Assets: how they are built ​

The Assets chapter explains the editors. The libraries themselves (how each folder is read, the static classes and their calls) are described in Asset databases. This page covers the other half: who uses the assets while the game runs, the code of the editors, and how to extend them.

Meshes

How a mesh file becomes a mesh on a character, where its settings and its skin live, and the asset editors in detail: The mesh pipeline and the asset editors.

The three layers ​

text
 files in src/data/...        the libraries (static classes)        the users
 .tscn  .res  .wav  .png  ──► DatabaseMeshes  ModelSceneDatabase ─► EntityRigComponent, Equipment
                              DatabaseAnimation DatabaseVFX       ─► EntityAnimationPlayer, VFXManager
                              DatabaseAudio     DatabaseIcons     ─► AudioManager, AudioComponent, UI

The libraries only read folders and answer questions; they never keep a node. The users load what they need through them, so a missing file shows as a warning in the console rather than a crash.

Model scenes become entities ​

ClassRoot ofGives
GeneralSkeleton (Skeleton3D)A creature or characterThe points (get_point(PointSlot): a Marker3D under the BoneAttachment3D of its bone, by unique name, %HeadPoint; the fixed list is POINTS), the weapon grips (get_grip, GRIPS: the weapon meshes main_hand_weapon, off_hand_weapon are under them), the holders of equipment meshes (get_attachment_point(AttachmentSlot)), the enums BodySlot, FacialFeature, AttachmentSlot, PointSlot, WeaponSlot, and the signals body_mesh_changed, attachment_mesh_changed, weapon_mesh_changed, mesh_removed
ModularSkeletonA character of swappable partsmodular_equipment_type_tag: the folder of DatabaseMeshes the parts come from
CustomSkeletonA customizable characterThe skin, hair and eye ShaderMaterials and the blend shapes, and apply_customization (used by character creation)
InteractableScene (Node3D)An objectbody_mark, top_mark, nameplate_marker, the AnimationPlayer, the collision shape, available_animations (written when the scene is saved)
  • Equipment. When an item is equipped, the equipment component asks the rig to show its meshes: body parts replace the part of the modular skeleton (the slots an EquipmentTypeDefinition hides), attachments go to the attachment points, weapons to the weapon meshes (position and rotation offset, enchant VFX position and projectile spawn point are read from the metadata of the mesh resource).
  • Required nodes. The skeleton converter (SkeletonSceneConverter) and the interactable creator (InteractableSceneCreator), in editor_components/utility/, are what the Create buttons call. The check in the Model Scenes editor reads the same exports.

Animations ​

EntityAnimationPlayer and the animation tree (entity_animation_tree_root.tres) play the clips of the entity's AnimationCoreMap (data_classes/entity/animations/animation_core_map.gd: one String export for each clip, grouped by @export_group). The map names a clip; DatabaseAnimation.build_library_for_entity finds it in the entity type's folder or in the parent's. Abilities, weapon classes and status effects ask the same library by package and category. See Entities and Abilities & Effects.

VFX ​

VFXManager pre-instantiates every VFX of the library at loading, keeps a pool for each, and plays them from selections (VFXSelection, one class for each type in data_classes/selections/vfx/). The classes (VFX and one subclass for each type) are in runtime_classes/vfx/. See Pooling for the pool, and the VFX classes for the animation-name rules (START_ANIMATION_NAMES, LOOP_ANIMATION_NAMES, END_ANIMATION_NAMES in vfx.gd).

Audio ​

Icons ​

DatabaseIcons.get_icon_by_id(id) returns the path of the file whose name is the id; the editors' icon pickers and the UI load it. get_next_icon_id gives the first free id; import_icons_to_category copies and numbers.

The editors ​

editor_components/editors/assets/ holds one editor for each library (SkeletonsEditor, InteractableScenesEditor, MeshDatabaseEditor, AnimationDatabaseEditor with animation/core_package_editor.gd, VFXDatabaseEditor, AudioDatabaseEditor, IconDatabaseEditor). They share a shape: a search box and a refresh button, a tree or list built from the library's get_* calls, a settings menu, an import button that copies files and asks for a destination, and a validation pass whose results are shown in a dialog. The CorePackageEditor builds the animation map's drop-downs by reflection from the exports of AnimationCoreMap, so a clip you add to the map appears by itself.

Extending ​

You wantDo
A new SFX categoryAdd an entry to DatabaseAudio.SFX_CATEGORIES (path, pattern, extensions, description, section). The editor lists it, and the folder is made
A new VFX typeAdd it to DatabaseVFX.VFX_TYPES, VFX_CLASS_MAPPING and VFX_SCRIPT_MAP, write a VFX subclass in runtime_classes/vfx/, and a selection class for the editors
A new animation packageAdd it to DatabaseAnimation.ANIMATION_PACKAGES with its categories and structure
A new clip in the mapAdd an @export var my_clip: String to AnimationCoreMap (in the right group); the editor shows it; fetch it with the entity's animation component
A new attachment pointAdd the node to your skeleton scene with a unique name, add a value to GeneralSkeleton.AttachmentSlot, and add its @onready reference
A new equipment tagAdd Skeleton Equipment Tag in the Meshes editor makes the folders; set modular_equipment_type_tag on the skeleton

See also ​