This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
PalaceManager is an Unreal Engine 5.4 action game built around the Gameplay Ability System (GAS). The codebase is a single C++ module (PalaceManager) with no scripting layer — all logic is in C++.
Build via UnrealBuildTool from the UE5 engine install:
# Development Editor build (most common during iteration)
"<UE5_ROOT>/Engine/Build/BatchFiles/Build.bat" PalaceManagerEditor Win64 Development "C:/Users/qnfgh/PalaceManager/PalaceManager.uproject"
# Shipping build
"<UE5_ROOT>/Engine/Build/BatchFiles/Build.bat" PalaceManager Win64 Shipping "C:/Users/qnfgh/PalaceManager/PalaceManager.uproject"Alternatively, open PalaceManager.sln in Visual Studio 2022 and build the Development Editor configuration. Live Coding is enabled via the RiderLink plugin.
There are no automated tests configured in this project.
AMechBaseCharacter (implements IAbilitySystemInterface, IPawnCombatInterface, IPawnUIInterface) is the root for all pawns. It owns MechAbilitySystemComponent, MechAttributeSet, and MotionWarpingComponent, and holds a TSoftObjectPtr<UDataAsset_StartUpDataBase> that drives ability/effect grants on possession.
AMechHeroCharacter— player character, usesMechHeroControllerandMechInputComponentAMechEnemyCharacter— AI character, usesMechAIControllerwith Behavior Tree
Abilities are not granted directly — they are registered through DataAsset_StartUpDataBase::GiveToAbilitySystemComponent(), which reads ActivateOnGivenAbilities, ReactiveAbilities, and StartUpGameplayEffects arrays from a DataAsset assigned per character class. Hero and enemy each have their own subclass (DataAsset_HeroStartUpData, DataAsset_EnemyStartUpData).
Ability subclasses:
UMechGameplayAbility— base, addsMechFunctionLibraryhelpers andMotionWarpingaccessUMechHeroGameplayAbility— hero-specific (input-bound abilities)UMechEnemyGameplayAbility— enemy-specific
Damage flows through GEExecCalc_DamageTaken, which reads AttackPower, DefensePower, and DamageTaken from MechAttributeSet. Attribute changes broadcast to UI via the IPawnUIInterface cached in MechAttributeSet.
All tags are declared in MechGameplayTags.h (namespace MechGameplayTags) with UE_DECLARE_GAMEPLAY_TAG_EXTERN and defined in MechGameplayTags.cpp. Tag values are registered in Config/DefaultGameplayTags.ini. When adding a new tag, declare it in both files and add the ini entry.
Tag naming convention:
InputTag_*— Enhanced Input action bindingsPlayer_Ability_*/Enemy_Ability_*— ability identifiersPlayer_Weapon_*/Enemy_Weapon_*— weapon slot keys forPawnCombatComponentShared_*— cross-pawn events and statuses (HitReact, Death, MeleeHit)
Two component hierarchies hang off every pawn:
Combat: UPawnCombatComponent → UHeroCombatComponent / UEnemyCombatComponent
- Maintains a
TMap<FGameplayTag, AMechWeaponBase*>of carried weapons ToggleWeaponCollisionenables/disables hit detection per animation notifyOnHitTargetActor/OnWeaponPulledFromTargetActorhandle overlap deduplication viaOverlappedActors
UI: UPawnUIComponent → UHeroUIComponent / UEnemyUIComponent
- Exposes delegates that
MechAttributeSet::PostGameplayEffectExecutefires when attributes change
Both hierarchies are accessed polymorphically through the IPawnCombatInterface / IPawnUIInterface interfaces. Use MechFunctionLibrary helpers rather than direct casts where possible.
DataAsset_InputConfig maps UInputAction assets to Gameplay Tags. MechInputComponent binds these at runtime using BindNativeInputAction / BindAbilityInputAction. Enhanced Input is the only supported input path.
Enemy AI uses Unreal's Behavior Tree with custom nodes:
BTService_OrientToTargetActor— rotates enemy toward target each tickBTTask_RotateToFaceTarget— one-shot rotate task
The MechAIController owns the BT and Blackboard.
AMechWeaponBase (Actor) is the base weapon spawned and attached to sockets. AMechHeroWeapon extends it for player weapons. Weapons are registered into PawnCombatComponent via RegisterSpawnedWeapon — the tag passed becomes the lookup key.
Declared in PalaceManager.Build.cs:
EnhancedInput— input handlingGameplayTags,GameplayTasks— GAS infrastructure (note:GameplayAbilitiesmodule is listed only in.uproject, not in Build.cs — add it if linking errors appear)AIModule,NavigationSystem— Behavior Tree and NavMeshAnimGraphRuntime,MotionWarping— animation systems
- Single Responsibility: Keep commits small and focused (e.g., one commit for UI, one for Player state).
- Prefixes: Use
fix,feat,chore,refactor,docs. - Messages: Write concise commit messages in Korean.
- No Signatures: NEVER append "Co-authored-by" or Claude automatic signatures to git commits.
- Target Branch: Always work on the
Refactorbranch. - No Direct Merges: Never direct push or local merge to
main. - Merge Process:
Refactor -> mainintegration MUST be done via GitHub Pull Request after review.