Hostile Mob Intelligence Overhaul: Vision Cones, Stealth Mechanics, and Smart Navigation#414
Open
Malerus wants to merge 47 commits intoFoundation-19:masterfrom
Open
Hostile Mob Intelligence Overhaul: Vision Cones, Stealth Mechanics, and Smart Navigation#414Malerus wants to merge 47 commits intoFoundation-19:masterfrom
Malerus wants to merge 47 commits intoFoundation-19:masterfrom
Conversation
…GC stuff Annoying Fast - 2.5 Fast - 2.75 Average - 3 Slow - 4
With Ghost Re-entry & Statpanel Stability Fixes
3. Combat Mode Standardization & Gunfire Alerts - Standardized combat_mode across ALL f13 hostile mobs (16 files, 70+ variants) - Three explicit modes: COMBAT_MODE_MELEE, COMBAT_MODE_RANGED, COMBAT_MODE_MIXED - Defined retreat_distance and minimum_distance for all mob types - Gunfire alert system: shooting alerts hostile mobs within 7 tiles - Alerts respect can_hear_combat flag and faction relationships Technical Implementation: - Added combat_mode variable to all f13 hostile mob definitions - Integrated gunfire alerts into shoot_live_shot() in gun.dm - Added cached_verb_hash for efficient statpanel change detection - Modified mob/Destroy() to preserve mind.current for valid ghosts - Created attempt_z_pursuit(), climb_stairs(), and coordination procs
- Batch atom initialization: Check tick every 100 atoms - Batch lighting updates: Process 100 lights/corners/objects per yield - Batch icon smoothing: Process 100 icons before yielding - Cache area lookup in turf initialization to avoid redundant loc calls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About The Pull Request
This PR makes hostile mobs significantly smarter and more challenging through advanced AI systems.
Smart Mob Pursuit & Coordination
Multi-Level Combat:
Pack Tactics:
Smarter Navigation:
Environmental Detection Refinements
Line-of-Sight Filtering:
Stealth Boy Interaction:
Unsilenced Weapon Response:
Investigation Movement:
Distraction Tools:
Directional Vision & Stealth System
Field.Cones.Test.mp4
Cone-Based Vision:
Sound Detection:
Low-Light Vision:
Predictable Behavior:
Combat Mode Standardization
Clear Combat Behaviors:
Gunfire Alerts:
Bug Fixes
Ghost System:
Statpanel (Admin UI):
Why It's Good For The Game
Dynamic Combat:
Stealth Gameplay:
Combat Depth:
Quality of Life:
Pre-Merge Checklist
Changelog
🆑
add: Hostile mobs pursue players across Z-levels via stairs, ladders, and openspace
add: Mobs remember targets for 15 seconds and actively search for 30 seconds after losing sight
add: Pack coordination - mobs call for backup and respond to allies' alerts across Z-levels
add: Mobs hear combat sounds from 7 tiles away and investigate
add: Smart mobs open doors instead of destroying them when possible
add: Directional vision system - 90° front cone, 45° peripheral vision, rear blind spot
add: Rear sound detection - mobs hear footsteps behind them based on speed and armor weight
add: Low-light vision for nocturnal/predator mobs (nightkin, deathclaws, geckos, wolves, cazadores, etc.)
add: Idle mobs maintain facing direction for 45+ seconds for predictable stealth gameplay
add: Combat mode standardization across 70+ f13 hostile mobs (MELEE/RANGED/MIXED behaviors)
add: Gunfire alert system - shooting alerts hostile mobs within 7 tiles
add: Debug vision mode for testing stealth mechanics
add: Thrown items only alert mobs within line-of-sight (no cross-room alerts)
add: Silenced weapons require LOS for light destruction alerts
add: Mobs visibly turn around when hearing stealthed players behind them
add: Unsilenced weapons cause mobs to investigate shooter location (sound carries through walls)
add: Bottle cap throw range increased from 2 to 7 tiles for distraction tactics
fix: Mobs complete full movement to investigation points (no more stopping 2-3 tiles away)
fix: Investigation state properly sets remembered_target to prevent premature LoseTarget()
fix: Mobs no longer lose targets when players change Z-levels
fix: Multiple anti-loop systems prevent mobs getting stuck on stairs
fix: Mobs investigate sound areas naturally instead of X-raying to exact locations
fix: Ghosts can no longer be locked out of corpses during revival
fix: Statpanel no longer flickers when switching bodies
fix: Admin tabs persist through body switches
tweak: Z-level commitment system prevents yo-yo behavior
tweak: Light armor (0 slowdown) provides 0.5x sound multiplier for stealth
tweak: Heavy armor increases detection range from rear
balance: Sound detection baseline established - refinement per-mob-type needed
balance: Standardized retreat and engagement distances for all f13 hostile mobs
/:cl: