Files
realms-in-ruin-dev/Documentation/Archaeology/03-ClassHierarchy.md
T
tedwardsandCursor ee65271212 Document Batch 4D archaeology and add README title image outside LFS.
Exclude REALMSINRUIN_TITLE_DEV.png from Git LFS so the README hero renders on Gitea.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 23:17:56 -07:00

226 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 03 — Class Hierarchy
**Status: Draft**
- **Scope:** Native C++ hierarchy under `Source/REALMSINRUIN/` plus Blueprint parent chains, interfaces, and framework Blueprints inspected in Batch 2 Pass 3.
- **Inspection method:** Batch 1 native reads; Batch 2 read-only AssetTools tags/deps + BlueprintTools graphs/events/variables; ObjectTools CDO properties.
- **Evidence classifications used:** Observed Implementation, Documented Intent, Inferred, Unknown.
- **Tool or visibility limitations:** Inherited Blueprint variables require querying each parent; CustomEvent FunctionFlags not exposed via ObjectTools; Gunslinger FiB/IsDataOnly anomaly.
- **Last updated:** 2026-07-16
- **Current phase:** Phase 1 — Static Architecture
- **Last completed pass:** Pass 4 + Pass 10 (Batch 4D)
- **Next pass expected to contribute:** Pass 11 when authorized
## Draft tracking
### Completed sections
- Full native class inventory (Batch 1)
- Blueprint parent chains for players, enemies, PC/PS, GI/GM
- Interface inventory under `/Game/_Main/Blueprints/Interfaces`
- WBP_PlayerHUD asset-class resolution (AHUD, not UserWidget)
- BP_PlayerState DefaultAttributesGameplayEffect = None
- **Pass 9:** Enemy EventGraphs empty; stock AIController; BPI partial; no BT/BB
- **Pass 4/10:** Frontend PC/GM/GI roles; BPI_PlayerController `UpdatePlayerHUD`/`AddGold` unimplemented on `PC_Character`; EffectActor vs `BP_BasePickUp` hierarchies
### Pending sections
- CommonUI content usage
- Exact CustomEvent reliable flags
### Evidence still required
- PIE possession of placed skeletons
- Whether any other class implements `AddGold` / `UpdatePlayerHUD`
---
## Hierarchy overview
```mermaid
flowchart TD
ACharacter[ACharacter] --> ARIRBaseCharacter
IASI[IAbilitySystemInterface] --> ARIRBaseCharacter
ARIRBaseCharacter --> ARIRPlayerCharacter
ARIRBaseCharacter --> ARIRBaseEnemyCharacter
ITarget[ITargetInterface] --> ARIRBaseEnemyCharacter
ARIRPlayerCharacter --> BP_PlayerCharacterBase
BP_PlayerCharacterBase --> Player_Paladin
BP_PlayerCharacterBase --> Player_Amazonian
BP_PlayerCharacterBase --> Player_Cleric
BP_PlayerCharacterBase --> Player_Wizard
BP_PlayerCharacterBase --> Player_Gunslinger
ARIRBaseEnemyCharacter --> BP_EnemyCharacterBase
BP_EnemyCharacterBase --> BP_Enemy_Skeleton
APlayerState --> ARIRPlayerState
ARIRPlayerState --> BP_PlayerState
APlayerController --> ARIRPlayerController
ARIRPlayerController --> PC_Character
AHUD --> ARIRHUD
ARIRHUD --> WBP_PlayerHUD
AGameModeBase --> GM_Dungeoneer
AGameModeBase --> GM_MainMenu
UGameInstance --> GI_Dungeoneer
```
---
## 1. Characters (native — Batch 1 summary)
See Batch 1 sections for `ARIRBaseCharacter`, `ARIRPlayerCharacter`, `ARIRBaseEnemyCharacter` native details. Key contradictions unchanged: enemy ASC on self vs base `GetAbilitySystemComponent` from PlayerState; `DefaultAttributesGameplayEffect` unused in C++.
---
## 2. Player Blueprint hierarchy (Pass 3)
### 2.1 `BP_PlayerCharacterBase`
| Field | Value |
|-------|--------|
| Asset path | `/Game/_Main/Blueprints/Characters/PlayerCharacters/BP_PlayerCharacterBase` |
| Asset class | `BP_PlayerCharacterBase_C` |
| Parent | `/Script/REALMSINRUIN.RIRPlayerCharacter` |
| Native parent | `RIRPlayerCharacter` |
| Interfaces | `BPI_PlayerCharacter` (graphs: GetPlayer*REF, GetPlayerREF) |
| NumReplicatedProperties (tag) | 18 |
| Components | Native: CollisionCylinder, Arrow, CharacterMesh0, CharMoveComp; BP: ThirdPersonCamera, CameraPositionRef, TPSpringArm, BP_FootstepComponent_Left/Right |
**Graphs:** UserConstructionScript, EventGraph, GetPlayerPaladinREF, GetPlayerREF, GetPlayerWizardREF, GetPlayerAmazonREF, GetPlayerClericREF
**Variables (local):** PlayerController, PlayerPawn, CurrentlyAttacking, CharacterClass, ManaRegenTimer, CameraPanTriggerDown, CameraTurnRate, IsDead, InitialSpawnLocation, plus DEPRECATED_Current/Max Health/Mana/Stamina, DEPRECATED_ManaRegenOverTime, DEPRECATED_Ability001004 Damage/ManaCost
**Replication samples:** CurrentlyAttacking, IsDead, DEPRECATED_CurrentHealth/Mana = Replicated; PlayerController, CharacterClass = None
**Implemented custom events (selection):** Server_Ability_001004 Begin/End, Server_UpdateHUD, PlayerDeath, Client_PlayerDeath, Server_RespawnPlayer, RotateCamera, Multicast_PlayMontage, Multicast_PlaySFX, Multi_SpawnParticle, HandleDeath; plus Possessed, BeginPlay, SetIsAttacking, InitializeHUD, AddKill_PlayerCharacter
**Input Action refs (deps):** IA_Ability_001004, IA_CameraPan, IA_CameraPanTrigger, IA_CameraZoom
**Deep dive:** See `05-LegacyAbilityArchitecture.md` and `08-CharacterSystems.md`.
### 2.2 Playable children (structural)
| Character | Path | Parent | IsDataOnly | Local vars | Ability-related implemented events |
|-----------|------|--------|------------|------------|-------------------------------------|
| Paladin | `.../Paladin/Player_Paladin` | BP_PlayerCharacterBase_C | False | Ability001Montages, ChargeStartLoc, ChargeFinishLoc, IsCharging, IsBlocking | Server_001 Begin; 002 Begin+End; 003 Begin; 004 Begin; UseAbility001/004; Charge; Client_Charge |
| Amazonian | `.../Amazonian/Player_Amazonian` | BP_PlayerCharacterBase_C | False | DynamicMaterials, Ability001Montage, PerformingWhirlwind | Server_001 Begin; UseAbility001; ReceiveAnyDamage |
| Cleric | `.../Cleric/Player_Cleric` | BP_PlayerCharacterBase_C | False | Ability001Montages, DivineCircle*, IsBlocking, EnemyFound, ClosestEnemy | Server_001004 Begin; Server_003 End; UseAbility002/004; Concentrate* |
| Wizard | `.../Wizard/Player_Wizard` | BP_PlayerCharacterBase_C | False | EnemyFound, IsBlocking, ClosestEnemy | ReceiveBeginPlay/Tick/ActorBeginOverlap only |
| Gunslinger | `.../Gunslinger/Player_Gunslinger` | BP_PlayerCharacterBase_C | **True** | [] | ReceiveBeginPlay/Tick/ActorBeginOverlap; **deps only base** |
**AnimBP (Paladin sample):** Mesh AnimClass = `/Game/_Main/Animations/PlayerCharacters/Human/CharacterClasses/Paladin/ABP_Paladin`
**Naming:** Use `Player_Amazonian` (not Amazon). BPI_PlayerCharacter deps list Amazonian/Cleric/Paladin/Wizard — **not Gunslinger**.
---
## 3. Enemy Blueprint hierarchy (Pass 3 + Pass 9)
| Asset | Parent | Interface | Graphs | Vars | Implemented events | Pass 9 body |
|-------|--------|-----------|--------|------|--------------------|-------------|
| `/Game/_Main/Blueprints/Characters/Enemies/BP_EnemyCharacterBase` | RIRBaseEnemyCharacter | — | UCS, EventGraph | [] | BeginPlay, Tick, ActorBeginOverlap | **Empty** (unconnected) |
| `/Game/_Main/Blueprints/Characters/Enemies/Skeleton/BP_Enemy_Skeleton` | BP_EnemyCharacterBase_C | BPI_EnemyCharacter (GetEnemyREF only) | UCS, EventGraph, GetEnemyREF | [] | BeginPlay, Tick, ActorBeginOverlap | **Empty**; GetEnemyREF→self |
**Control (CDO + C_1 instance):** `AIControllerClass=/Script/AIModule.AIController`; `AutoPossessAI=PlacedInWorld`.
**Deps (Skeleton):** SKM_Skeleton_Guard_Body, BPI_EnemyCharacter, BP_EnemyCharacterBase, ABP_Skeleton, REALMSINRUIN.
**Pass 9:** No BehaviorTree/Blackboard/custom AIController in project. Chase/attack **Implementation Missing**. Full analysis: `09-EnemyAI-StaticAnalysis.md`.
---
## 4. Player framework Blueprints
### 4.1 `PC_Character`
| Field | Value |
|-------|--------|
| Path | `/Game/_Main/Blueprints/Player/PC_Character` |
| Parent | RIRPlayerController |
| Interface | BPI_PlayerController |
| Variables | CharacterSelectHUD |
| Implemented events | ServerSpawnCharacter, ReceiveBeginPlay, PlayerFirstSpawn, PlayerSelectScreenChoice, PlayerRespawn |
| **Not implemented** (`bIsImplemented=false`) | `UpdatePlayerHUD`, `AddGold`, `SetPlayerCanMove`, `AddKill_PlayerController` |
| Native C++ | `RIRPlayerController` has **no** `UpdatePlayerHUD` / `AddGold` symbols |
| CDO IMC | `/Game/_Main/Blueprints/Player/Inputs/IMC_PlayerDefault` |
| CDO MovementInput | `/Game/_Main/Blueprints/Player/Inputs/Movement/IA_Movement` |
**Pass 4:** BeginPlay creates char-select only on Authority∧IsServer. Spawn path: select → ServerSpawnCharacter → GM GetSelectedClass → PlayerFirstSpawn → SpawnActor+Possess.
### 4.2 `BP_PlayerState`
| Field | Value |
|-------|--------|
| Path | `/Game/_Main/Blueprints/Player/BP_PlayerState` |
| Parent | RIRPlayerState |
| IsDataOnly | True |
| Variables | [] |
| Implemented events | BeginPlay, Tick |
| **DefaultAttributesGameplayEffect** | **None** (Observed Implementation on CDO) |
---
## 5. Game framework Blueprints
| Asset | Parent | Notes |
|-------|--------|-------|
| `/Game/_Main/Blueprints/Game/GameInstance/GI_Dungeoneer` | GameInstance | Empty EventGraph; **0 referencers**; not in `GameInstanceClass` INI — Present but Unconnected |
| `/Game/_Main/Blueprints/Game/GameMode/GM_Dungeoneer` | GameModeBase | BPI_GameMode; vars PlayerStartLocations, ConnectedPlayers, Player Stats; events PostLogin/Logout/BeginPlay/GetSelectedClass |
| `/Game/_Main/Blueprints/Game/GameMode/GM_MainMenu` | GameModeBase | IsDataOnly; deps PC_MainMenu, BP_MainMenuPawn |
| `/Game/_Main/Blueprints/Player/PC_MainMenu` | PlayerController | HostGame CreateAdvancedSession; JoinGame JoinSession; creates WBP_MainMenu |
**GM_Dungeoneer CDO (Observed Implementation):**
- HUDClass = `WBP_PlayerHUD_C`
- PlayerControllerClass = `PC_Character_C`
- PlayerStateClass = `BP_PlayerState_C`
- DefaultPawnClass = None (spawn via PC char-select flow)
---
## 6. Interfaces discovered
| Interface | Path | Key graphs |
|-----------|------|------------|
| BPI_PlayerCharacter | `/Game/_Main/Blueprints/Interfaces/BPI_PlayerCharacter` | UseAbility001004, SetIsAttacking, InitializeHUD, GetPlayer*REF, DEPRECATED_Recover*, AddKill_PlayerCharacter |
| BPI_EnemyCharacter | `.../BPI_EnemyCharacter` | GetEnemyREF, AddPlayerTarget, EnemyMeleeAttack |
| BPI_PlayerController | `.../BPI_PlayerController` | SetPlayerCanMove, UpdatePlayerHUD, PlayerRespawn, PlayerSelectScreenChoice, PlayerFirstSpawn, AddGold, GetPC_DungeoneerReference, AddKill_PlayerController |
| BPI_GameMode | `.../BPI_GameMode` | GetPlayerStats (on GM_Dungeoneer) |
No separate ability/damage/targeting/session BPI assets under `/Game/_Main/Blueprints/Interfaces` beyond the four above.
**Pass 10:** Callers of `UpdatePlayerHUD` / `AddGold` exist; `PC_Character` does not implement them → Present but Unconnected.
---
## 7. WBP_PlayerHUD resolution
| Field | Value |
|-------|--------|
| Path | `/Game/_Main/UI/Widgets/HUD/WBP_PlayerHUD` |
| Asset class | `WBP_PlayerHUD_C` |
| Parent | `/Script/REALMSINRUIN.RIRHUD` (**AHUD**) |
| IsDataOnly | True |
| Verdict | **AHUD Blueprint**, not a Widget Blueprint. `WBP_` prefix is misleading. |
| Referencers | `GM_Dungeoneer` |
| Dependencies | REALMSINRUIN, `WBP_Overlay`, `BP_OverlayWidgetController` |
| CDO (Pass 10) | `overlayWidgetClass=WBP_Overlay_C`; `overlayWidgetControllerClass=BP_OverlayWidgetController_C` |
Resolves Batch 1 subclass-search anomaly: ObjectTools returned this asset under RIRHUD search because it **is** an RIRHUD child.
---
## 8. Native RPCs
**Observed Implementation:** Still no native Server/Client/Multicast UFUNCTIONs in `Source/REALMSINRUIN`. All ability networking is Blueprint-only (`05`).
---
## Contradictions
| Topic | Evidence A | Evidence B | Better supported |
|-------|------------|------------|------------------|
| Enemy ASC access | Enemy ASC on self | Base GetASC from PlayerState | Both Observed; interface path likely broken for enemies |
| Default attributes | GE assets exist; property on PS | BP_PlayerState CDO = None; never applied in C++ | Property unused; apply path still Unknown / missing |
| HUD naming | `WBP_PlayerHUD` name suggests widget | Parent is RIRHUD (AHUD) | AHUD — name is Documented Intent mismatch |
| Dual HUD systems | Native InitOverlay → WBP_Overlay + ASC | BP Server_UpdateHUD → UpdatePlayerHUD | Overlay Connected; UpdatePlayerHUD **unimplemented** on PC (Pass 10) |
| Gameplay Abilities | URIRGameplayAbility Documented Intent | No GA assets; legacy Server_Ability_* | Legacy BP abilities active |
| Gold | BP_BasePickUp calls AddGold | AddGold unimplemented on PC_Character | Mutation Present but Unconnected |
| GameInstance | GI_Dungeoneer asset exists | Not in GameInstanceClass; 0 refs | Present but Unconnected |