Enhance narrative systems with detailed implementation guides and data-driven structures
- Updated BPC_NarrativeStateSystem with a comprehensive manual implementation guide, including class setup, variable initialization, and function breakdowns. - Expanded BPC_ObjectiveSystem documentation to include a manual implementation guide and detailed function descriptions. - Added a manual implementation guide for BPC_DialoguePlaybackSystem, outlining class setup and function nodes. - Introduced a manual implementation guide for BPC_DialogueChoiceSystem, detailing choice presentation and selection processes. - Enhanced BPC_BranchingConsequenceSystem documentation with a manual implementation guide for consequence evaluation. - Updated BPC_TrialScenarioSystem with a manual implementation guide for scenario management. - Expanded BPC_LoreUnlockSystem documentation to include a manual implementation guide for lore entry management. - Added a manual implementation guide for BP_NarrativeTriggerVolume, detailing trigger volume setup and action execution. - Enhanced BPC_EndingAccumulator documentation with a manual implementation guide for ending evaluation. - Updated BPC_HitReactionSystem with a manual implementation guide for hit reaction management. - Added a manual implementation guide for BPC_RecoilSystem, detailing recoil application and recovery processes. - Introduced DT_ProjectTags.csv to define gameplay tags for various systems, enhancing data-driven design capabilities.
This commit is contained in:
@@ -128,4 +128,61 @@ Manages trial-based gameplay scenarios: combat gauntlets, escape sequences, inve
|
||||
| Phase 8 AI | Indirect | Spawn/despawn enemy actors by tag |
|
||||
|
||||
### Reuse Notes
|
||||
Scenarios are fully data-driven via `DA_ScenarioData`. Designers configure spawn tags, objective tags, time limits, and cleanup actions without blueprint modifications. Supports mixed scenarios: combat + investigation, timed + untimed, survival + objective.
|
||||
Scenarios are fully data-driven via `DA_ScenarioData`. Designers configure spawn tags, objective tags, time limits, and cleanup actions without blueprint modifications. Supports mixed scenarios: combat + investigation, timed + untimed, survival + objective.
|
||||
|
||||
---
|
||||
|
||||
## Manual Implementation Guide
|
||||
|
||||
### Class Setup
|
||||
1. Create Blueprint Class: Parent = `ActorComponent`, Name = `BPC_TrialScenarioSystem`
|
||||
2. Add to Player Character or GameMode
|
||||
|
||||
### Variable Init (BeginPlay)
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Set ScenarioState = Inactive
|
||||
└─ Cache: BPC_NarrativeStateSystem, BPC_ObjectiveSystem
|
||||
```
|
||||
|
||||
### Function Node-by-Node
|
||||
|
||||
#### `StartScenario(ScenarioData: DA_ScenarioData)` → `void`
|
||||
```
|
||||
Step 1: If ScenarioState != Inactive → Return (already running)
|
||||
Step 2: Set ActiveScenario = ScenarioData, ScenarioState = SetupRunning
|
||||
Step 3: Create checkpoint via SS_SaveManager (auto-save before trial)
|
||||
Step 4: Spawn enemies: ForEach ScenarioData.SpawnTags → Spawn Actor from Class at SpawnPoints
|
||||
Step 5: Lock doors/block exits: ForEach ScenarioData.BlockActor → Set enabled=false
|
||||
Step 6: If ScenarioData.bShowObjective: ActivateObjective(ScenarioData.ObjectiveTag)
|
||||
Step 7: Set ScenarioStartTime = Get Game Time
|
||||
Step 8: ScenarioState = ActiveRunning
|
||||
Step 9: Fire OnScenarioStarted
|
||||
```
|
||||
|
||||
#### `EvaluateScenario()` → `void` *(Called on Tick or timer)*
|
||||
```
|
||||
Step 1: If ScenarioState != ActiveRunning → Return
|
||||
Step 2: Check success conditions:
|
||||
If ScenarioData.SuccessFlags: HasAllFlags? → Call OnScenarioSuccess()
|
||||
If ScenarioData.SuccessKillCount: enemies killed >= count? → Success
|
||||
Step 3: Check failure conditions:
|
||||
If ScenarioData.TimeLimit > 0 AND (Now - StartTime) >= TimeLimit → OnScenarioFailure("Time expired")
|
||||
If player death detected → OnScenarioFailure("Player died")
|
||||
```
|
||||
|
||||
#### `OnScenarioSuccess()` → `void`
|
||||
```
|
||||
Step 1: ScenarioState = Success
|
||||
Step 2: ForEach ScenarioData.SuccessFlags → BPC_NarrativeStateSystem.SetFlag(flag, true)
|
||||
Step 3: If Objective active: CompleteObjective(ObjectiveTag)
|
||||
Step 4: Fire OnScenarioCompleted(true)
|
||||
Step 5: Call CleanupScenario()
|
||||
```
|
||||
|
||||
### Build Checklist
|
||||
- [ ] Create component with DA_ScenarioData reference
|
||||
- [ ] Implement StartScenario: setup → spawn → lock → objective → active
|
||||
- [ ] Implement EvaluateScenario: check win/loss conditions per tick
|
||||
- [ ] Implement OnScenarioSuccess/Failure with flag setting
|
||||
- [ ] Implement CleanupScenario: despawn enemies, unlock doors
|
||||
Reference in New Issue
Block a user