Materials v

Desperados 3 GDD

AI Behavior

Desperados 3 cover

Desperados 3

Status
Released
Year
2020
Genre
Strategy
Platforms
Windows, macOS, Linux

Enemy and NPC behavior in Desperados III is built around readable stealth-state changes: patrol or idle routines, vision-cone and hearing-based suspicion, investigation of noises/bodies/accidents, escalation into alarms and reinforcements, then recovery or reload-driven failure. Archetypes such as standard guards, Ponchos, Long Coats, dogs, and civilians react differently to lures, disguise, mind control, bodies, and alarms, making each encounter a systemic perception puzzle rather than a simple patrol obstacle.

9 min read

AI Behavior Summary

Desperados III enemy AI is designed to be systemic, readable, and exploitable. Enemies follow patrol, idle, conversation, and watch routines until the player introduces a perceivable stimulus: entering a vision cone, making noise, leaving a body, triggering an accident, using a lure, or performing a suspicious action. The AI then shifts into suspicion, investigation, rescue, alarm, combat, or recovery depending on what was perceived and which enemy archetype is responding.

AI behavior should support the core tactical promise: the player can study routines, predict reactions, create timing windows, and recover or reload when a plan fails. The system should not feel omniscient; if an enemy sees a body but not the player, the response should center on the evidence location rather than magically revealing hidden squad members.

Core Enemy State Model

stateDiagram-v2
    [*] --> Routine
    Routine --> Suspicious: Sees partial exposure / hears minor stimulus / notices odd event
    Routine --> Investigating: Hears lure or noise / sees body or accident evidence
    Routine --> Alarmed: Sees hostile act / confirms player / discovers severe evidence
    Routine --> Rescuing: Sees tied or incapacitated ally where rescue behavior applies

    Suspicious --> Routine: Target leaves sight and suspicion decays
    Suspicious --> Investigating: Stimulus location is worth checking
    Suspicious --> Alarmed: Player, hostile act, or critical evidence is confirmed

    Investigating --> Routine: No player or unresolved threat found
    Investigating --> Alarmed: Body, hostile actor, rescue completion, or player found
    Investigating --> Rescuing: Tied/incapacitated ally becomes priority

    Rescuing --> Routine: Rescue interrupted or evidence resolved without escalation
    Rescuing --> Alarmed: Ally successfully untied or hostile actor found

    Alarmed --> Combat: Player position confirmed and attack is possible
    Alarmed --> Reinforcement: Alarm call succeeds / mission rules spawn support
    Alarmed --> Routine: Scenario-specific recovery after unresolved accident or false alarm

    Combat --> Alarmed: Player escapes line of sight but area remains alerted
    Combat --> [*]: Mission failure, character death, or reload
    Reinforcement --> Alarmed

Perception Inputs

Input AI Evaluation Player-Facing Feedback Design Purpose
Vision cone overlap Checks line of sight, stance, terrain, cone strength, exposure time, and target state Green coverage, yellow suspicion fill, red/alert state, view-cone markers Lets players read risk before committing movement or takedowns.
Witnessed action Detects hostile or suspicious actions such as attacks, shots, body handling, disguise-breaking actions, or visible sabotage Immediate suspicion or alarm depending on severity and witnesses Ensures stealth actions still require witness control.
Noise Compares action/lure noise to nearby listeners and current AI state Noise radius/listener response, question marks, facing changes, investigation pathing Turns loud tools into powerful but risky attention events.
Body discovery Detects corpses, unconscious enemies, tied enemies, thrown bodies, or visible allies needing rescue Investigation, rescue behavior, possible alarm or reinforcements Makes cleanup and body placement part of the stealth puzzle.
Accident evidence Evaluates deaths or hazards when the player was not seen causing them Investigation without automatic player attribution when unseen Supports environmental kills as stealth-valid solutions.
Social/disguise anomalies Checks whether the actor is disguised, in a safe zone, performing suspicious actions, or seen by disguise-piercing enemies Safe-zone shields, disguise break, immediate detection by counters Makes social stealth useful but counterable.
Mind-control anomalies Detects suspicious acts performed by controlled targets and controlling-character vulnerability Controlled target may be attacked by allies without necessarily raising alarm Creates a separate control layer that still interacts with AI perception.

Enemy Archetypes

Archetype Baseline Behavior Special Reactions / Resistances Design Role
Standard guard / gunman Patrols, watches cones, investigates noises and bodies, alarms when threats are confirmed, can attack at range Usually affected by standard distractions, disguise rules, takedowns, lures, and body discovery Baseline unit for teaching and combining stealth systems.
Thug / melee enemy Participates in vision, investigation, and alarm logic but is less threatening at range Still blocks routes and can expose the squad if ignored Close-range patrol pressure and simple witness control.
Poncho Patrols and alarms like other guards but resists some simple lures Cooper coin is less effective; McCoy bag and Hector whistle do not reliably pull movement; some track responses are excluded Forces alternate tools instead of repeating one lure pattern.
Long Coat Heavy guard with strong perception/combat presence and broad resistance Pierces Kate disguise, resists or modifies many lures and disables; McCoy gas/shotgun can stun; Hector can directly handle them; mind control requires prior damage/stun Specialist-check enemy that changes encounter composition and target priority.
Dog Detects disguised characters and reacts as an animal unit Sees through Kate disguise; can be lured by some tools; cannot be handled like a normal social target Counter to disguise/social routes and additional perception pressure.
Civilian Non-combatant or low-combat NPC that can notice suspicious events Screams or calls attention when alarmed; can be affected by some social/lure/body situations Raises stakes in public spaces without acting as a standard combat guard.

Investigation and Alarm Rules

Trigger First Response Escalation Condition Recovery Condition
Player briefly enters sight Suspicion fill begins Exposure continues long enough, player performs hostile action, or enemy reaches red alert Player leaves sight before confirmation and suspicion decays.
Enemy hears a lure or tool Turns toward or moves to stimulus, depending on archetype and lure type Finds player, body, suspicious target, or severe evidence Reaches source and finds nothing requiring escalation, then returns to routine or scripted state.
Enemy sees a body Investigates body location Body is confirmed as severe evidence, rescue succeeds, or player is found nearby Body is removed before confirmation or accident context resolves without player attribution.
Enemy sees a takedown Suspicion or immediate alarm depending on timing and visibility Witness survives long enough to call or attack Witness is neutralized before escalation and no other watcher confirms the event.
Very loud weapon or explosion Broad nearby attention or alarm response Listener set confirms hostile event or alarm call succeeds Scenario-specific; loud events rarely return cleanly without player intervention.
Accident kill while player unseen Guards investigate hazard/body Player is seen causing setup/trigger, or investigation uncovers additional threat Investigation completes without player attribution.
Tied ally discovered Rescuer may move to untie, sometimes without immediate alarm Ally is successfully untied or rescuer confirms threat Rescuer is interrupted, neutralized, or evidence is resolved before escalation.

Distraction and Attention Priority

Distractions should redirect attention without suspending normal perception. A guard following a coin, bag, whistle, cat, social lure, body lure, footprint trail, or accident response can still detect a visible player, witness a takedown, find a body, or escalate if the stimulus reveals severe evidence.

Priority guidance:

Priority State / Stimulus Handling
1 Confirmed player, witnessed hostile act, active combat Alarm/combat overrides routine and most lures.
2 Severe evidence: visible corpse, successful rescue, very loud weapon, mission-critical detection Investigation escalates into alarm or reinforcement if not interrupted.
3 Current rescue/untie interaction Can temporarily ignore other sound stimuli, creating a special attention lock.
4 Active investigation or lure movement Enemy follows current stimulus unless a higher-priority event occurs.
5 Minor facing distraction or social hold Adjusts facing/position while still checking vision and target validity.
6 Patrol, idle, conversation, watch Default routine when no unresolved stimulus remains.

Social Stealth and Controlled NPCs

Kate’s disguise and social tools should be treated as AI state modifiers, not invisibility hacks. Standard enemies ignore a properly disguised character unless she performs a suspicious action. Dogs and Long Coats pierce disguise on sight. Social Distract can hold eligible targets in place and facing Kate; Lure can pull eligible male enemies while disguised, but cannot be used on Ponchos and shares a cooldown with Distract.

Isabelle’s mind control creates a different AI exception: the controlled target can perform actions within a limited radius, while Isabelle remains stationary and vulnerable. If the controlled target performs suspicious actions, other enemies may shoot the controlled unit without necessarily raising a general alarm. Long Coats require prior damage/stun before they can be controlled.

Bodies, Rescue, and Cleanup AI

Bodies are persistent AI stimuli. A corpse, unconscious enemy, tied enemy, carried body, or poorly hidden body can change patrol behavior even after the original takedown was silent.

Body State AI Meaning Expected Response
Corpse Severe evidence, especially if not explained as an unseen accident Investigate and potentially alarm/reinforce.
Unconscious but untied Unresolved neutralization; may be rescued or escalate if discovered Investigate, rescue, or alarm depending on archetype and context.
Tied Secured but visible evidence and potential rescue target Draws rescuers; alarm may occur if rescue succeeds.
Carried or dragged Suspicious action if seen, even when the takedown was unseen Detect actor/body through normal vision and escalate.
Fully concealed No normal patrol discovery Safe unless another mission/script rule exposes it.
Accident body Evidence of hazard death without automatic player attribution if unseen Investigate, then recover if no hostile cause is found.

Showdown Interaction

Showdown Mode queues player actions, but AI behavior still resolves in live state once execution begins. Queued lures, takedowns, shots, movement, and body interactions must revalidate against moving patrols, line of sight, noise, target state, and archetype resistance. If an alarm starts during execution, remaining queued actions should resolve against the current alert state rather than assuming the pre-plan world is still valid.

Failure, Recovery, and Readability

AI failure points should be readable enough for the player to learn and retry. Detection colors, view-cone markers, noise feedback, question marks, alarm cues, body discovery reactions, safe-zone indicators, and post-mission statistics all help explain what happened.

Common AI-driven retry reasons:

  • A character remained in a cone long enough for suspicion to become detection.
  • A witness saw a takedown or body-handling action.
  • A body was left in a patrol route or only partially concealed.
  • A loud tool reached off-screen listeners.
  • A lure-resistant archetype ignored the expected response.
  • A disguised character was seen by a dog or Long Coat, or performed a suspicious action.
  • A rescuer untied an ally before the player interrupted the rescue.
  • A Showdown plan desynchronized because patrols, movement speed, or target state changed.