분류 전체보기 101

TIL - 81

Element Gauge - GameplayEvent 기반 충전 시스템한 줄 요약플레이어가 발생시킨 GameplayEvent(HitSuccess, Parry.Success 등)를 ASC가 받으면, DataTable 기반 룰에 따라 ElementGaugeComponent가 정해진 양만큼 게이지를 충전한다.왜 DataTable인가처음엔 컴포넌트 멤버 TMap로 충분하다고 봤지만, 수치 튜닝 빈도가 높을 것으로 예상되어 DataTable로 승격. 향후 행에 추가 컨텍스트(VFX, 사운드, 약점 보너스 배율 등)를 묶기에도 유리.구조1. Row 구조체 — FElementChargeRuleUSTRUCT(BlueprintType)struct RETRIEVE_API FElementChargeRule : public ..

TIL - 80

버스트 스킬 시스템 구현 계획책임 분리GA_Burst (얇음) └─ 매칭 / 슬롯 소비 / 몽타주 재생 / 컴포넌트에 신호PlayerCombatComponent (적중 감지 허브) └─ 노티파이 수신 / AttackType 분기 / 트레이스·오버랩 / GE 인플릭트월드/투사체 액터 BP (자기 콜리전 책임) └─ 자기 overlap 감지 → PlayerCombatComponent에 적중 보고책임담당ElementPattern 매칭GA_Burst::FindMatchingCombination게이지 슬롯 소비GA_Burst → ElementGaugeComponent몽타주 재생GA_Burst::PlayMontageAndWaitAttackType 분기PlayerCombatComponent::OnBurstHit..

TIL - 79

스킬 데이터 테이블 설계 — FSkillCombination 확장 기존 구조체의 한계USTRUCT(BlueprintType)struct FSkillCombination : public FTableRowBase{ GENERATED_BODY() TMap ElementPattern; UAnimMontage* AttackMontage; TSubclassOf PrimaryEffect; TSubclassOf SecondaryEffect; float DamageMultiplier; float EffectDuration; float AoeRadius;}; 멀티히트 표현 불가 — WWW는 60% × 5회, AAA는 100% × 3회, FFW는 120% + 60%. 단일 floa..

TIL - 78

DT와 값 비교GameplayAbility의 DT에서 ElementPattern 10종류를 현재 ElementPattern과 비교하여 동일 패턴 찾기TMap ElementPattern으로 저장되어 있음bool UGA_Burst::DoesCombinationMatch( const TMap& Pattern, const TMap& Actual){ // 0 카운트는 TMap에 들어가지 않으므로 크기가 같아야 동일 조합 if (Pattern.Num() != Actual.Num()) return false; for (const TPair& Pair : Pattern) { const int32* ActualCount = Actual.Find(Pair.Key); ..

TIL - 77

Component에서 부착 Actor의 ASC 가져오기현재 구조ElementGaugeComponent (UActorComponent) └─ GetOwner() → ASovereignCharacter (APawn 상속) └─ GetPlayerState() └─ GetRetrieveAbilitySystemComponent() → URetrieveAbilitySystemComponent* 헤더 파일에 ASC 캐싱// 클래스 내부에 추가public: URetrieveAbilitySystemComponent* GetRetrieveASC() const;private: // const 함수에서 캐시 갱신할 수 있게 mutable UPROPERTY(Transient..

TIL - 76

GameplayTag를 remove하고 add 할때상황게임 속 설정한 원소모드를 전환하면서 기존에 적용되어 있을 것 같은 Tag들을 remove하는데 없는 경우container에 없는 태그를 remove하려 한다고 Log가 뜸 해결 방안remove하지 않고 0으로 설정함ASC->SetLooseGameplayTagCount(RetrieveGameplayTags::Element_fire, 0);ASC->SetLooseGameplayTagCount(RetrieveGameplayTags::Element_Water, 0);ASC->SetLooseGameplayTagCount(RetrieveGameplayTags::Element_Wind, 0);ASC->SetLooseGameplayTagCount(RetrieveG..

TIL - 75

AI1. 상태 머신(State Machine)상태 머신은 AI의 행동 상태를 정의하고 상태 전환 조건을 관리하는 방식이다.주로 캐릭터 애니메이션과 간단한 AI 로직에 사용된다.핵심 개념State(상태)Idle : 대기Patrol : 순찰Chase : 추적Attack : 공격Dead : 사망Transition(전이)특정 조건 만족 시 상태 변경예:플레이어 발견 → Chase공격 거리 진입 → Attack체력 0 → DeadUE5 구현 방식Animation Blueprint의 State Machine 사용변수 기반 전환SpeedIsInAirIsAttackingIsDead 등장점구조 단순디버깅 쉬움애니메이션 제어에 적합단점상태 증가 시 복잡도 급증다양한 행동 조합 구현 어려움2. Behavior Tree (행..

TIL - 72

챕터4 팀 프로젝트 담당 파트 피드백초기 설계 DataTable로 아이템 속성 관리 상호작용으로 아이템 들기 각도나 거리 초과시 자동 낙하 물건 운반시 위치를 서버가 직접 계산, ReplicationMovement로 전체 클라이언트에 자동 전파 운반자의 이동 입력 방향으로 물건 목표 위치 계산 실제 구현 폭발 시스템 구현 X 물건을 들으면 replicate를 끄고 운반시 이동할 때 클라이언트가 각자 로직을 수행하고 운반이 종료되면 replicate를 킴 아쉬웠던 점 경사에서 운반이 자연스럽지 못함 물건의 크기와 거리를 잘못 설정하면 운반시 이상한 방향과 속도로 이동함 폭발시스템을 구현하지 못함 개선점 물건을 옮기는 방식을 setlocation에서 physics constraint로 변경해보기