61 lines
2.1 KiB
Markdown
61 lines
2.1 KiB
Markdown
# DA_EncounterData — Data Asset
|
|
|
|
**Parent Class:** `UDataAsset`
|
|
**Dependencies:** [`BPC_ProceduralEncounter`](../10-adaptive/70_BPC_ProceduralEncounter.md)
|
|
**Purpose:** Defines procedural encounter configurations — enemy types, spawn rules, difficulty scaling, and encounter triggers.
|
|
|
|
---
|
|
|
|
## Variables / Structure
|
|
|
|
| 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 |
|
|
|
|
---
|
|
|
|
## Gameplay Tags
|
|
- Namespace: `Encounter.<Type>.<Name>` (e.g., `Encounter.Ambush.Hallway`, `Encounter.Siege.Room`)
|
|
|
|
---
|
|
|
|
## Validation Rules
|
|
- `MinEnemies` must be >= 1
|
|
- `MaxEnemies` must be >= `MinEnemies`
|
|
- At least one `EnemyArchetype` required
|
|
- `SpawnRadius` must be > 0
|
|
|
|
---
|
|
|
|
## Example Data
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| EncounterTag | `Encounter.Ambush.DarkCorridor` |
|
|
| EnemyArchetypes | `[DA_AIProfile_Crawler, DA_AIProfile_Stalker]` |
|
|
| MinEnemies | 2 |
|
|
| MaxEnemies | 5 |
|
|
| SpawnRadius | 800.0 |
|
|
| bTriggerOnOverlap | true |
|
|
|
|
---
|
|
|
|
## Consumed By
|
|
- [`BPC_ProceduralEncounter`](../10-adaptive/70_BPC_ProceduralEncounter.md)
|
|
- [`BPC_DifficultyManager`](../10-adaptive/62_BPC_DifficultyManager.md)
|
|
|
|
## Reuse Notes
|
|
- Encounter data is completely data-driven; spawning logic reads from this DA
|
|
- DifficultyScaling curve allows non-linear difficulty adjustment
|
|
- Narrative prerequisites gate encounters behind story progression |