Player Noise System
Player Noise System
Section titled “Player Noise System”Noise-Based Detection
Section titled “Noise-Based Detection”The player noise system enables AI to detect player actions based on the volume and type of activities performed. This creates tactical gameplay where players must consider how their actions might alert nearby enemies.
Noise Volume System
Section titled “Noise Volume System”Player Noise Enumeration
Section titled “Player Noise Enumeration”Create standardized noise levels for different player actions:
Enumeration_Player_Noise_Volume
Section titled “Enumeration_Player_Noise_Volume”- 0%: Silent actions (no noise generated)
- 20%: Very quiet actions (minimal detection risk)
- 40%: Quiet actions (low detection risk)
- 60%: Moderate actions (moderate detection risk)
- 80%: Loud actions (high detection risk)
- 100%: Very loud actions (maximum detection risk)
Noise Broadcasting Function
Section titled “Noise Broadcasting Function”Create F_Player_Noise function to broadcast noise to nearby AI:
// Player Noise BroadcastingF_Player_Noise(Volume) {noise_radius = base_radius * volume_percentage;detection_value = base_value * volume_percentage;
if (Stealth_Enabled) {noise_radius *= 0.25; // Reduce radius in stealthdetection_value /= 4; // Reduce detection in stealth}
SphereTraceForObjects(GetActorLocation(), GetActorLocation(), noise_radius, [Pawn]);
ForEach(detected_ai in trace_results) {detected_ai.Interface_Detect_Player(detection_value, Self);}}
Noise Implementation
Section titled “Noise Implementation”Footstep Noise Integration
Section titled “Footstep Noise Integration”Connect noise system to character movement:
Animation Blueprint Integration
Section titled “Animation Blueprint Integration”- Interface_Player_Noise: Function called from animation events
- Footstep Events: Animation notify events trigger noise
- Volume Selection: Set appropriate noise level for movement type
Movement Noise Levels
Section titled “Movement Noise Levels”Configure noise for different movement types:
- Walk: 20% noise (very quiet movement)
- Run: 40% noise (moderate noise level)
- Sprint: 60% noise (significant noise generation)
- Jump: 40% noise (moderate impact noise)
Ability Noise Integration
Section titled “Ability Noise Integration”Add noise generation to player abilities:
Combat Ability Noise
Section titled “Combat Ability Noise”Most combat abilities generate significant noise:
- Melee Attacks: 100% noise (maximum detection)
- Projectile Attacks: 100% noise (gunshots, magic casting)
- Area Effects: 100% noise (large explosive effects)
- Stealth Attacks: 60% noise (quieter but still detectable)
Utility Ability Noise
Section titled “Utility Ability Noise”- Dodge Roll: 20% noise (quiet evasive movement)
- Stealth Activation: 0% noise (silent ability activation)
- Interaction: 0% noise (silent world interaction)
AI Detection Response
Section titled “AI Detection Response”Detection Value Accumulation
Section titled “Detection Value Accumulation”AI characters accumulate detection points based on noise exposure:
Detection Phases Integration
Section titled “Detection Phases Integration”Connect noise system to existing AI detection phases:
- Phase 1 (< 33 points): Look toward noise source
- Phase 2 (< 66 points): Walk to investigate noise location
- Phase 3 (100+ points): Full aggro and combat engagement
Detection Value Scaling
Section titled “Detection Value Scaling”Different noise levels add different detection amounts:
- 20% Noise: +2 detection points
- 40% Noise: +4 detection points
- 60% Noise: +8 detection points
- 80% Noise: +16 detection points
- 100% Noise: +32 detection points
Stealth Integration
Section titled “Stealth Integration”Stealth Noise Reduction
Section titled “Stealth Noise Reduction”Stealth state provides significant noise reduction benefits:
Stealth Modifiers
Section titled “Stealth Modifiers”- Radius Reduction: Multiply noise radius by 0.25 when in stealth
- Detection Reduction: Divide detection value by 4 when in stealth
- State Requirement: Must be in stealth state (not combat) for benefits
Strategic Stealth Usage
Section titled “Strategic Stealth Usage”- Quiet Actions: Some actions become nearly silent in stealth
- Movement Benefits: Stealth movement generates minimal noise
- Combat Trade-off: Attacking breaks stealth, removing noise benefits
Noise System Polish
Section titled “Noise System Polish”Hit Prevention
Section titled “Hit Prevention”Prevent multiple noise applications to same AI:
- Hit Actors Array: Track which AI received noise this activation
- Add Unique: Only add detection points once per noise event
- Array Clear: Reset hit actors after noise event completes
AI Reset Integration
Section titled “AI Reset Integration”- Detection Reset: Clear player detection values when AI resets to spawn
- Noise Immunity: AI in reset state ignore noise events
- Fresh Start: Reset AI returns to neutral detection state
Testing and Balance
Section titled “Testing and Balance”Noise Level Tuning
Section titled “Noise Level Tuning”The noise system requires careful balance adjustment:
- Volume Values: Adjust detection ranges for gameplay feel
- Detection Accumulation: Tune how quickly AI reach each detection phase
- Stealth Benefits: Ensure stealth provides meaningful noise reduction
AI Response Testing
Section titled “AI Response Testing”- Gradual Detection: Low noise should trigger investigation, not immediate aggro
- High Noise Response: Loud actions should create immediate danger
- Stealth Effectiveness: Stealth should provide significant tactical advantage
The player noise system adds tactical depth to stealth gameplay while providing clear cause-and-effect relationships between player actions and AI responses.