fix: Update data asset documentation for clarity and consistency in type definitions
This commit is contained in:
@@ -13,15 +13,26 @@ The Modular Game Framework uses `UDataAsset` (and subclass `UPrimaryDataAsset` w
|
||||
### Conventions
|
||||
- **Naming:** `DA_<Domain><Subtype>` — e.g., `DA_WeaponData`, `DA_AIProfile`, `DA_AtmosphereProfile`
|
||||
- **Storage:** All DA files live in `Content/DataAssets/<Domain>/` in-engine
|
||||
- **Loading:** Use `UAssetManager` with `FPrimaryAssetType` and `FPrimaryAssetId` for async loading
|
||||
- **Validation:** Each DA implements `ValidateData()` for editor-time data integrity checks
|
||||
- **Gameplay Tags:** All DAs carry a `FGameplayTagContainer` for query and filtering
|
||||
- **Parent Class:** `Primary Data Asset` (Blueprint class). Maps to C++ `UPrimaryDataAsset`.
|
||||
- **Loading:** Use `Async Load Primary Asset` node with `Primary Asset Id` and `Primary Asset Type`
|
||||
- **Validation:** Each DA implements a `ValidateData()` function for editor-time data integrity checks
|
||||
- **Gameplay Tags:** All DAs carry a `Gameplay Tag Container` for query and filtering
|
||||
|
||||
### Dependency Rules
|
||||
1. DAs reference other DAs by `FPrimaryAssetId` or `TSoftObjectPtr`, never by hard pointer
|
||||
1. DAs reference other DAs by `Primary Asset Id` or `Soft Object Reference`, never by hard pointer
|
||||
2. No DA may reference a runtime system; only other DAs
|
||||
3. Circular DA references are prohibited — use `World Context Object` for runtime resolution
|
||||
4. All DA types are registered in `DefaultGame.ini` under `[/Script/Engine.AssetManagerSettings]`
|
||||
- In BP: configure via **Project Settings → Asset Manager → Primary Asset Types to Scan**
|
||||
|
||||
### BP Type Reference
|
||||
| C++ Type | Blueprint Variable Type | BP Node |
|
||||
|----------|------------------------|---------|
|
||||
| `FPrimaryAssetId` | `Primary Asset Id` | `Make Primary Asset Id`, `Break Primary Asset Id` |
|
||||
| `FPrimaryAssetType` | `Primary Asset Type` | `Make Primary Asset Type` |
|
||||
| `TSoftObjectPtr<T>` | `Soft Object Reference` | `Async Load Primary Asset`, `Resolve Soft Reference` |
|
||||
| `FGameplayTagContainer` | `Gameplay Tag Container` | `Has Tag`, `Add Tag`, `Has Any` |
|
||||
| `UPrimaryDataAsset` | `Primary Data Asset` (parent class) | Right-click → Miscellaneous → Data Asset → PrimaryDataAsset |
|
||||
|
||||
### Registered DA Types (Section 13 of Master)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# DA_EncounterData — Data Asset
|
||||
|
||||
**Parent Class:** `UDataAsset`
|
||||
**Dependencies:** [`BPC_ProceduralEncounter`](../10-adaptive/70_BPC_ProceduralEncounter.md)
|
||||
**Parent Class:** `Primary Data Asset` (Blueprint: `PrimaryDataAsset`)
|
||||
**Dependencies:** [`BPC_ProceduralEncounter`](../10-adaptive/92_BPC_ProceduralEncounter.md)
|
||||
**Purpose:** Defines procedural encounter configurations — enemy types, spawn rules, difficulty scaling, and encounter triggers.
|
||||
|
||||
---
|
||||
@@ -10,18 +10,18 @@
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `EncounterTag` | `FGameplayTag` | Unique encounter identifier |
|
||||
| `EnemyArchetypes` | `TArray<FPrimaryAssetId>` | Allowed enemy DA_AIProfile references |
|
||||
| `MinEnemies` | `int32` | Minimum spawn count |
|
||||
| `MaxEnemies` | `int32` | Maximum spawn count |
|
||||
| `SpawnRadius` | `float` | Radius around trigger point (cm) |
|
||||
| `SpawnDelay` | `float` | Time between individual spawns |
|
||||
| `bTriggerOnOverlap` | `bool` | Auto-trigger on player overlap |
|
||||
| `bTriggerOnAlert` | `bool` | Trigger when alert level reaches threshold |
|
||||
| `RequiredAlertLevel` | `float` | Alert threshold (0.0-1.0) |
|
||||
| `EncounterCooldown` | `float` | Min time between encounters |
|
||||
| `DifficultyScaling` | `UCurveFloat*` | Curve for scaling enemy count/strength by difficulty |
|
||||
| `NarrativePrerequisites` | `TArray<FGameplayTag>` | Narrative flags required |
|
||||
| `EncounterTag` | `Gameplay Tag` | Unique encounter identifier |
|
||||
| `EnemyArchetypes` | `Array<Primary Asset Id>` | Allowed enemy `DA_BehaviourVariant` references |
|
||||
| `MinEnemies` | `Integer` | Minimum spawn count |
|
||||
| `MaxEnemies` | `Integer` | Maximum spawn count |
|
||||
| `SpawnRadius` | `Float` | Radius around trigger point (cm) |
|
||||
| `SpawnDelay` | `Float` | Time between individual spawns |
|
||||
| `bTriggerOnOverlap` | `Boolean` | Auto-trigger on player overlap |
|
||||
| `bTriggerOnAlert` | `Boolean` | Trigger when alert level reaches threshold |
|
||||
| `RequiredAlertLevel` | `Float` | Alert threshold (0.0-1.0) |
|
||||
| `EncounterCooldown` | `Float` | Min time between encounters |
|
||||
| `DifficultyScaling` | `Curve Float` (Object Reference) | Curve for scaling enemy count/strength by difficulty |
|
||||
| `NarrativePrerequisites` | `Array<Gameplay Tag>` | Narrative flags required |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# DA_ObjectiveData — Data Asset
|
||||
|
||||
**Parent Class:** `UDataAsset`
|
||||
**Dependencies:** [`BPC_ObjectiveSystem`](../07-narrative/39_BPC_ObjectiveSystem.md), [`WBP_ObjectiveDisplay`](../06-ui/WBP_ObjectiveDisplay.md)
|
||||
**Parent Class:** `Primary Data Asset` (Blueprint: `PrimaryDataAsset`)
|
||||
**Dependencies:** [`BPC_ObjectiveSystem`](../07-narrative/59_BPC_ObjectiveSystem.md), [`WBP_ObjectiveDisplay`](../06-ui/54_WBP_ObjectiveDisplay.md)
|
||||
**Purpose:** Defines objective content — objective text, requirements, completion conditions, linked narrative flags, and reward data.
|
||||
|
||||
---
|
||||
@@ -10,16 +10,16 @@
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `ObjectiveTag` | `FGameplayTag` | Unique tag for this objective |
|
||||
| `ObjectiveText` | `FText` | Display text for HUD/journal |
|
||||
| `ObjectiveTag` | `Gameplay Tag` | Unique tag for this objective |
|
||||
| `ObjectiveText` | `Text` | Display text for HUD/journal |
|
||||
| `ObjectiveCategory` | `EObjectiveCategory` | Main, Side, Hidden, Tutorial |
|
||||
| `PrerequisiteFlags` | `TArray<FGameplayTag>` | Narrative flags required before objective activates |
|
||||
| `CompletionFlags` | `TArray<FGameplayTag>` | Flags set when objective completes |
|
||||
| `bIsOptional` | `bool` | Objective can be skipped |
|
||||
| `ObjectiveLocation` | `FVector` | World location for marker |
|
||||
| `RewardItems` | `TArray<FPrimaryAssetId>` | Items granted on completion |
|
||||
| `RewardExperience` | `int32` | XP awarded |
|
||||
| `LinkedEndingWeight` | `float` | Score contribution to ending evaluation |
|
||||
| `PrerequisiteFlags` | `Array<Gameplay Tag>` | Narrative flags required before objective activates |
|
||||
| `CompletionFlags` | `Array<Gameplay Tag>` | Flags set when objective completes |
|
||||
| `bIsOptional` | `Boolean` | Objective can be skipped |
|
||||
| `ObjectiveLocation` | `Vector` | World location for marker |
|
||||
| `RewardItems` | `Array<Primary Asset Id>` | Items granted on completion |
|
||||
| `RewardExperience` | `Integer` | XP awarded |
|
||||
| `LinkedEndingWeight` | `Float` | Score contribution to ending evaluation |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user