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:
@@ -49,4 +49,53 @@
|
||||
|
||||
- RecoilPattern is a CurveVector from DA_WeaponData — swap per weapon
|
||||
- For hitscan weapons, call ApplyRecoil on every shot. For projectile, call on fire release
|
||||
- Recovery runs on tick when bIsRecovering; disable tick at rest for performance
|
||||
- Recovery runs on tick when bIsRecovering; disable tick at rest for performance
|
||||
|
||||
---
|
||||
|
||||
## Manual Implementation Guide
|
||||
|
||||
### Class Setup
|
||||
1. Create Blueprint Class: Parent = `ActorComponent`, Name = `BPC_RecoilSystem`
|
||||
2. Attach to `BP_RangedWeapon` or Player Character
|
||||
3. **⚠️ Local only** — recoil is cosmetic, not replicated
|
||||
|
||||
### Variable Init (BeginPlay)
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Set CurrentRecoilOffset = (0, 0)
|
||||
├─ Set bIsRecovering = false
|
||||
├─ Read RecoilPattern from DA_WeaponData
|
||||
└─ Cache: BPC_CameraStateLayer (from Player)
|
||||
```
|
||||
|
||||
### Function Node-by-Node
|
||||
|
||||
#### `ApplyRecoil(ShotCount: Integer, bADS: Boolean)` → `void`
|
||||
```
|
||||
Step 1: Sample RecoilPattern curve at ShotCount (or accumulated counter)
|
||||
Step 2: Get curve output: Pitch = X channel, Yaw = Y channel
|
||||
Step 3: If bADS: Pitch *= ADSRecoilMultiplier, Yaw *= ADSRecoilMultiplier
|
||||
Step 4: CurrentRecoilOffset.X += Pitch, CurrentRecoilOffset.Y += Yaw
|
||||
Step 5: Push to camera:
|
||||
BPC_CameraStateLayer.AddControllerPitch(Pitch) ← or PlayCameraShake
|
||||
BPC_CameraStateLayer.AddControllerYaw(Yaw)
|
||||
Step 6: Set bIsRecovering = true
|
||||
Step 7: Set Timer (0.05s loop) → TickRecovery ← timer runs while recovering
|
||||
```
|
||||
|
||||
#### `TickRecovery(DeltaTime: Float)` → `void`
|
||||
```
|
||||
Step 1: CurrentRecoilOffset = Lerp(CurrentRecoilOffset, Vector2D(0,0), RecoverySpeed * DeltaTime)
|
||||
Step 2: If CurrentRecoilOffset nearly zero (< 0.01):
|
||||
ResetRecoil()
|
||||
Clear Recovery timer
|
||||
```
|
||||
|
||||
### Build Checklist
|
||||
- [ ] Create BPC_RecoilSystem, attach to Player
|
||||
- [ ] Create RecoilPattern CurveVector per weapon (X=pitch, Y=yaw)
|
||||
- [ ] Implement ApplyRecoil with curve sampling + ADS multiplier
|
||||
- [ ] Implement TickRecovery with lerp toward zero
|
||||
- [ ] Wire to BPC_FirearmSystem.OnFire
|
||||
- [ ] Test: fire weapon → camera kicks up → recovers to center
|
||||
Reference in New Issue
Block a user