Base Classes

Overview

The module provides a hierarchy of pre-assembled base classes. Each class automatically creates and wires its components in the constructor via UCInitializerComponent::prepare_CSTR_* static methods. All base classes implement IGenericTeamAgentInterface (delegated to UCInteractionComponent) and the framework’s ICCommonActor interface.

ACActor

Lightweight actor base. Inherits AActor. Components: root scene, initializer, debug, static mesh, interaction, select, skill.

Name Description
cdryxRootComponent Scene component used as root (gives the actor a world position)
initializerComponent Drives data-driven initialization from UCActorInformation
debugComponent Editor-only debug widget overlay
meshComponent UCStaticMeshComponent for visual representation
interactionComponent Capsule-based overlap interaction system
selectComponent Decal-based selection indicator
skillComponent Skill list and skill widget management
// ACActor is the simplest base. Use it for static objects, props, interactables.
// Components are created automatically in the constructor.
// At runtime, UCInitializerComponent::init() wires everything from a FCCharacterDetailMaker row.

ACActor(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) {
    UCInitializerComponent::prepare_CSTR_CACTOR_ONLY(this);
}

ACPawn

Pawn base with floating movement. Inherits APawn. Adds: life, combotter, floating movement, skeletal mesh, navigation invoker, AI perception, automation. Root is a UCCapsuleComponent.

Name Description
cdryxRootComponent Capsule root (required for floating movement)
meshComponent UCSkeletalMeshComponent for animated mesh
lifeComponent Health management, damage reception, death sequence
combotterComponent Melee/range/block combat state machines
floatingMovementComponent Floating pawn movement
navigationInvokerComponent Dynamic NavMesh generation around the pawn
automationComponent Scripted command sequences (location, wait)
aiPerceptionStimuliSourceComponent AI perception stimuli registration
// ACPawn adds combat, life, AI and movement on top of ACActor components.
// Root is a UCCapsuleComponent for physics and floating movement.

ACPawn(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) {
    UCInitializerComponent::prepare_CSTR_CPAWN_ONLY(this);
}

ACCharacter

Character base with CharacterMovement. Inherits ACharacter. Replaces default capsule, mesh and movement with Cdryx variants (UCCapsuleComponent, UCSkeletalMeshComponent, UCCharacterMovementComponent).

Name Description
cCapsuleComponent Cdryx capsule replacing the default ACharacter capsule
cSkeletalMeshComponent Cdryx skeletal mesh replacing the default ACharacter mesh
cCharacterMovementComponent Cdryx character movement replacing the default movement component
// ACCharacter uses ObjectInitializer to replace default UE subobjects with Cdryx variants.

ACCharacter(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer
    .SetDefaultSubobjectClass<UCCapsuleComponent>(CapsuleComponentName)
    .SetDefaultSubobjectClass<UCSkeletalMeshComponent>(MeshComponentName)
    .SetDefaultSubobjectClass<UCCharacterMovementComponent>(CharacterMovementComponentName)
) {
    UCInitializerComponent::prepare_CSTR_CCHARACTER_ONLY(this);
}

ACProjectile

Projectile actor. Inherits AActor. Components: sphere root (BlockAll collision), initializer, static mesh, projectile movement.

Name Description
cdryxRootComponent Sphere collision root with BlockAll profile
meshComponent Static mesh for projectile visual
projectileMovementComponent UCProjectileMovementComponent with bend-time-to-speed curve support
// ACProjectile is spawned by UCCombotterComponent during range attacks.
// The sphere root uses BlockAll collision profile.

ACProjectile() {
    UCInitializerComponent::prepare_CSTR_CPROJECTILE_ONLY(this);
}

ACPlayer1STCharacter

First/third person player character. Inherits ACCharacter. Adds: spring arm, camera, action mapping, turn-by-turn, FOW, minimap, compass. Supports top-view / first-person switching, fight mode with combo turn-in-place, mobile gyroscope input, and touch/pinch gestures.

Name Description
springArmComponent Camera boom with adaptive target offset and optional gyroscope pitch
cameraComponent Player camera attached to the spring arm
actionMappingComponent Enhanced Input action mapping
turnByTurnComponent Turn-by-turn combat coordination
fowComponent Fog of War component
minimapComponent Minimap scene capture
compassComponent Compass direction indicator
isFighting Returns true if the player has active fight reasons and is not in top view
changeView Toggles between first-person and top-view camera modes
// ACPlayer1STCharacter is the main playable character.
// Fight mode is driven by fightReasonSet: any system can add/remove fight reasons.
updateFightReason(advIdx, true);  // enter fight mode against advIdx
updateFightReason(advIdx, false); // leave fight mode against advIdx
cleanFightReason();               // clear all fight reasons

// View switching:
changeView(); // toggles between top-view and first-person
bool top = isTopView(); // check current view mode

ACPlayerFLYPawn

Top-down flying camera pawn. Inherits ACPawn (via ACPlayerBaseFLYPawn). Keyboard/mouse driven with translation, rotation, scroll zoom, box selection, and Z-following terrain.

Name Description
springArmComponent Camera boom (no collision, arm length 0)
cameraComponent Top-down camera at -89° pitch
actionMappingComponent Enhanced Input action mapping
fowComponent Fog of War component
startHeight Initial camera height above terrain
followZ If true, camera follows terrain Z continuously
// ACPlayerFLYPawn is a strategy-style flying camera.
// It tracks terrain Z and supports box selection of actors.
// Left click + drag: translate. Right click + drag: rotate.
// Right click + Ctrl + drag: box select. Scroll: zoom.

ACSun

Animated directional light simulating a day/night cycle. Inherits ACActor (without mesh, interaction, select, skill).

Name Description
directionalLightComponent The directional light
zenithAngle Maximum sun elevation angle (default 75°)
dayDelayInSecond Full day cycle duration in seconds (default 120)
nightRation Night-to-day ratio for pitch range (default 0.5)
startedSinceSecond Time offset at BeginPlay
// ACSun computes pitch and yaw each tick using a sine-based curve.
ACSun sun;
sun.zenithAngle = 75;         // max elevation
sun.dayDelayInSecond = 120.0;  // 2 minutes = 1 full day
sun.nightRation = 0.5;         // night covers half the pitch range
sun.startedSinceSecond = 60;   // start at midday

ACPortrait

3D portrait rendering actor with a multi-light studio setup and scene capture. Used for character portraits in UI. Inherits AActor.

Name Description
ambiantLight Point light for ambient fill
backgroundLight / fillLight / keyLight Spot lights for 3-point lighting
rimSpotLight / rimRectLight Rim lighting (spot + rect)
halfSphereBackgroundStaticMesh Background half-sphere with material
skeletalMesh The character mesh to capture (visible in scene capture only)
sceneCapture2D Scene capture component rendering to a render target
// ACPortrait sets up a complete portrait studio.
// The skeletal mesh is SetVisibleInSceneCaptureOnly(true).
// All lights use lighting channel 2 to avoid affecting the game world.
// The scene capture ShowOnlyComponent targets the skeletal mesh.