Simple Monster AI

Advanced AI Component for Unreal Engine — No NavMesh Required

v2.1.0 UE 5.3 – 5.7+ Threat System Multiplayer

What's Inside

⚔️

Souls-like Combat

Telegraphed attacks: Windup → Active → Recovery. Parry system with stun.

🎭

Emotional AI

5 emotions: Calm, Curious, Aggressive, Frightened, Enraged. Each changes behavior.

👂

Hearing / Stealth

AI hears noise based on player movement type. Sprint is loud, crouch is silent.

🎯

Threat / Aggro NEW

Full threat table. AI tracks who's the biggest threat. Taunt, decay, healer aggro.

🌐

Multiplayer NEW

Server-authoritative AI. Health, state, emotion replicate to all clients. One checkbox.

👥

Multi-Target NEW

AI detects and tracks all players. Picks best target using threat or distance.

🧠

Knowledge Sharing

Monsters tell each other where the player is. Pack hunting without complex code.

📈

Adaptive Difficulty

AI adjusts to player skill automatically. Dying a lot? AI gets easier.

🎬

Scripted Encounters

JumpScare, Dramatic reveal, Ambush. Trigger when you want.

🌙

Day / Night

AI gets more aggressive, faster, and detects further at night.

❤️

Health System

Built-in HP with regen. Events for damage, healing, death. No extra components.

🐛

Debug Visualization

See detection radius, attack range, hearing, FOV, state, HP — all in editor.

Quick Start — 3 Minutes Setup

1. Enable the Plugin

1

In Unreal, go to Edit → Plugins

2

Search "Simple Monster AI" → check the box → restart editor

2. Add Component to Your Enemy

3

Open your enemy Character Blueprint (must be a Character, not just an Actor)

4

Click Add Component → search "Simple Monster AI v2.1" → add it

3. Tag Your Player

This is the #1 mistake! Without the Player tag, the AI will never detect you.

5

Open your Player Character Blueprint

6

Click Class Defaults in the toolbar

7

In Details, search "Tags" → find Actor → Tags → click + → type Player

8

Compile & Save both Blueprints

4. Test It

Place your enemy in the level → Press Play → Walk close → The monster chases you!

Default settings: Wanderer mode, 1500cm detection, 200cm attack range, 400cm/s chase speed. Tweak everything in the Details panel.

How-To Guide (Blueprints)

Step-by-step Blueprint recipes. All function and event names are exact — search them in your Blueprint.

How to Deal Damage TO the Monster

The plugin does NOT automatically take damage from your weapons. You call the function yourself.

1

In your weapon/projectile Blueprint, when you detect a hit on the enemy

2

Get the hit actor → Get Component by Class → select SimpleMonsterAIComponent

3

Drag from the component pin → call Take Damage (input: Damage Amount as float)

Tip: If using Threat System, also call Add Threat right after, passing the player as Source and the damage as Amount.

How to Deal Damage FROM the Monster to the Player

Important: The plugin fires On Attack Started but does NOT automatically damage the player. You decide what happens.

1

In your enemy Blueprint Event Graph, right-click → search "On Attack Started" → add the event

2

From that event, call Get Detected Player on the AI component to get the target

3

Call Get Effective Damage on the AI component for final damage (includes all modifiers)

4

Apply damage to the player using your own health system (e.g. Apply Damage or a custom function)

How to Set Up Parry (Souls-like)

1

On the AI component, enable bUseSoulsLikeCombat and add attacks to the Attacks array

2

In your player Blueprint, when the parry button is pressed:

3

Get a reference to the enemy AI component → call Try Parry → returns a bool

4

If true: parry succeeded! Monster is stunned for ParryStunDuration seconds. Play your parry effect.

5

You can also check Is In Parry Window to show a UI indicator while parry is possible

How to Make Monsters Alert Each Other

1

On ALL monster AI components, enable bUseKnowledgeSharing

2

Make sure all monsters have the same AllyTag (default: Monster)

3

Done. When one monster sees the player, nearby allies investigate the same location.

How to Make Monsters Enrage When an Ally Dies

1

Enable bUseEmotionalAI on all monsters

2

Enable bEnrageOnAllyDeath (on by default)

3

Same AllyTag on all, within AllyDeathDetectionRadius (default: 1000cm)

4

Kill one → nearby allies become Enraged (+50% damage, +30% speed, -20% defense) for EnragedDuration seconds

How to Create a Jump Scare

1

Enable bUseScriptedEncounter, set EncounterType to Jump Scare

2

Enable bWaitForTrigger — monster stays dormant until triggered

3

Optionally assign EncounterMontage and EncounterSound

4

Place a Trigger Box in the level. On overlap → get AI component → call Trigger Encounter

How to Use Threat / Taunt in Multiplayer Co-op

1

Enable bUseThreatSystem and bEnableMultiplayer

2

Tag ALL player characters with PlayerTag (default: Player)

3

AI automatically tracks all players. Whoever deals most damage gets most threat.

4

Tank ability: call Taunt on AI component, passing tank actor as Source and desired Duration

5

Healer: on heal, call Report Heal Threat with healer actor and heal amount

How to React to AI State Changes

All events are on the AI component. In your enemy Blueprint Event Graph:

1

Right-click → search the event name (e.g. "On State Changed", "On Death", "On Emotion Changed")

2

Event node appears with output pins for parameters (see Events table)

3

Connect your logic: play effects, update UI, trigger sounds

Example: On Emotion Changed → Switch on NewEmotion → play different particles for Enraged vs Frightened.

How to Read AI Info at Runtime

Pure functions — call them any time, no side effects:

FunctionReturnsUse For
GetCurrentStateEAIStateShow state on UI
GetCurrentEmotionEMonsterEmotionChange enemy aura by emotion
GetDetectedPlayerActor or nullWho is AI targeting?
IsAIActiveboolIs AI running?
GetHealthPercentfloat 0.0–1.0Health bar widget
IsInParryWindowbool"Parry Now!" UI prompt
GetEffectiveChaseSpeedfloatDebug speed display
GetEffectiveDamagefloatShow effective damage
GetThreat (Source)floatThreat meter per player
GetHighestThreatTargetActorWho has aggro
GetThreatTableSizeintHow many targets tracked
IsServerboolMultiplayer authority check

Core Systems

Health System

Enable: bUseHealthSystem = true (on by default)

PropertyDefaultDescription
MaxHealth100.0Maximum HP
CurrentHealth100.0Current HP (read-only, replicated in multiplayer)
HealthRegenRate0.0HP per second (0 = no regen)
HealthRegenDelay3.0Seconds after damage before regen starts

Detection & Field of View

PropertyDefaultDescription
DetectionRadius1500.0How far AI can see (cm)
PlayerTag"Player"Tag on players the AI looks for
DetectionInterval0.5Seconds between detection checks
bRequireLineOfSightfalseNeeds clear line to target?
FieldOfView0.0View angle (0 = 360°, 90 = forward cone, 180 = front half)

Movement

PropertyDefaultDescription
PatrolSpeed200.0Speed when patrolling (cm/s)
ChaseSpeed400.0Speed when chasing (cm/s)
RotationSpeed5.0How fast the AI turns
AcceptanceRadius100.0How close = "reached target" (cm)
bStickToGroundtrueKeep AI on ground with raycasts
ObstacleCheckDistance150.0Obstacle avoidance look-ahead (cm)

Behavior Modes

Set BehaviorMode to choose idle behavior:

ModeBehavior
IdleStands still. Waits for player.
WandererWalks to random points within WanderRadius. Pauses if bPauseWhileWandering is on. Interval: WanderInterval. Pause: WanderPauseDuration.
Spline PatrolFollows PatrolSpline component. Loops (bLoopPatrol) or ping-pongs. Waits PatrolWaitTime at each point.

Basic Combat

PropertyDefaultDescription
AttackRange200.0Distance to start attacking (cm)
AttackCooldown2.0Seconds between attacks
BaseDamage20.0Base damage per attack
bStopOnAttacktrueStop moving while attacking
GiveUpDistance0.0Stop chasing if player this far (0 = never)

Animations & Sounds

Assign in the Details panel. All optional — AI works without them.

SlotWhen It Plays
AttackMontage / AttackSoundBasic attack (non Souls-like)
PlayerFoundMontage / DetectionSoundFirst time AI spots player
DeathMontage / DeathSoundAI dies
StunnedMontageAI gets stunned
FleeMontage / FleeSoundAI starts fleeing
InvestigateMontageAI investigates a noise
EnragedSoundAI enters Enraged state
EncounterMontage / EncounterSoundScripted encounter triggers

DestroyDelay (default: 5.0) — seconds before actor is destroyed after death.

Debug Visualization

PropertyDefaultDescription
bShowDebugtrueShow spheres/lines in editor
bShowDebugInGamefalseAlso show during Play In Editor
bShowEmotionDebugtrueShow emotion text above AI

Souls-like Combat

Enable: bUseSoulsLikeCombat = true

Every attack goes through 3 phases:

  1. Windup — telegraph, player can see it coming. Parry window active during first ParryWindow seconds.
  2. Active — damage lands. On Attack Started fires here.
  3. Recovery — AI is vulnerable, player can counter-attack.

Attack Definition (Attacks Array)

Add entries to Attacks. Each entry is an FMonsterAttack:

PropertyDefaultDescription
AttackName"BasicAttack"Name for debugging
WindupTime0.5Telegraph duration (seconds)
ActiveTime0.3Damage window (seconds)
RecoveryTime0.8Vulnerability window (seconds)
Damage20.0Damage of this attack
Range200.0Attack reach (cm)
AttackMontagenoneAnimation for this attack
WindupSoundnoneSound during telegraph
AttackSoundnoneSound on hit
bCanBeParriedtrueCan player parry this?
SelectionWeight1.0Higher = AI uses this more often

Parry Settings

PropertyDefaultDescription
ParryWindow0.3How long player can parry (seconds)
ParryStunDuration2.0How long AI is stunned after parry

Visual Indicators

PropertyDefaultDescription
bShowAttackIndicatortrueShow debug circles during attacks
WindupIndicatorColororange (1, 0.5, 0, 0.5)Circle color during windup
AttackIndicatorColorred (1, 0, 0, 0.7)Circle color during active attack

Emotional AI

Enable: bUseEmotionalAI = true

EmotionTriggerEffect
CalmDefaultNormal behavior
CuriousHeard a noiseInvestigates cautiously
AggressiveSees a playerChases and attacks
FrightenedHP below thresholdRuns away, speed × FrightenedSpeedMultiplier
EnragedAlly died nearbyDamage/speed/defense multiplied

Settings

PropertyDefaultDescription
FrightenedHealthThreshold0.25HP % to trigger fear
FrightenedSpeedMultiplier1.5Speed boost when fleeing
EnragedDamageMultiplier1.5+50% damage
EnragedSpeedMultiplier1.3+30% speed
EnragedDefenseMultiplier0.8Takes 20% more damage
EnragedDuration15.0Rage duration (0 = ends naturally)
bFleeWhenFrightenedtrueAI runs when Frightened
bEnrageOnAllyDeathtrueEnrage when ally dies
AllyDeathDetectionRadius1000.0Range to detect ally death (cm)

Hearing & Stealth

Enable: bUseHearingSystem = true

PropertyDefaultDescription
HearingRadius2000.0Max hearing distance (cm)
HearingSensitivity1.0Hearing multiplier
SprintNoiseRadius1500.0How loud sprinting is (cm)
WalkNoiseRadius500.0How loud walking is
CrouchNoiseRadius100.0How loud crouching is
InvestigateTime5.0How long AI searches (seconds)
InvestigateSpeed150.0Speed when investigating (cm/s)

Reporting Custom Sounds

Call Report Noise from any Blueprint:

Report Noise
  Noise Location : FVector    — where the sound came from
  Loudness       : float      — 0.0-1.0+ multiplier (default: 1.0)
  Noise Type     : EMonsterNoiseType — Footstep, Gunshot, Explosion, Voice, Impact, Custom
  Noise Instigator : Actor    — who made the noise (optional)

Threat / Aggro System NEW v2.1

Enable: bUseThreatSystem = true

Every player in range builds threat. AI focuses whoever has the most. Threat decays when a target leaves range.

Settings

PropertyDefaultDescription
ThreatPerDamage1.0Threat per 1 damage dealt to AI
PassiveThreatPerSecond0.5Threat/sec just for being in range
ThreatDecayRate2.0Threat lost/sec when out of range
ThreatSwitchThreshold20.0Extra threat needed to switch targets (prevents flickering)
HealThreatMultiplier0.5Threat per 1 HP healed
DefaultTauntDuration5.0Taunt length when Duration=0

Threat Functions

FunctionTypeDescription
AddThreat (Source, Amount)CallableAdd threat from an actor
ClearThreat (Source)CallableRemove all threat from one actor
ClearAllThreatCallableReset entire threat table
Taunt (Source, Duration)CallableForce AI to attack Source for Duration seconds
GetThreat (Source)PureGet current threat for an actor
GetHighestThreatTargetPureGet actor with most threat
GetAllTargetsByThreatCallableArray sorted by threat (highest first)
GetThreatTableSizePureHow many actors tracked
ReportHealThreat (Healer, HealAmount)CallableHealer gains threat

Multiplayer NEW v2.1

Enable: bEnableMultiplayer = true

AI logic runs on the server only. Key state replicates to all clients automatically.

What Replicates

PropertyClient Event
CurrentHealthOn Health Changed fires on clients
CurrentState (EAIState)On State Changed fires on clients
CurrentEmotionOn Emotion Changed fires on clients

Setup

  1. Enable bEnableMultiplayer on the AI component
  2. Enemy Character must have bReplicates = true (Class Defaults → Replication)
  3. Tag ALL player characters with PlayerTag
  4. Movement replication handled by UE's Character Movement Component — no extra work

Best combo: Enable both bUseThreatSystem and bEnableMultiplayer for full multiplayer AI with tank/healer/DPS dynamics.

Use Is Server (returns bool) to check authority in your own Blueprints.

Advanced Systems

Adaptive Difficulty

Enable: bUseAdaptiveDifficulty = true

AI adjusts speed and damage based on player performance.

PropertyDefaultDescription
PlayerSkillRating1.0Current rating (read-only; 0.5=easy, 2.0=hard)
MinSkillRating0.5Floor
MaxSkillRating2.0Ceiling
AdaptationRate0.1How fast it adjusts
bAdaptSpeedtrueAdjust AI speed
bAdaptDamagetrueAdjust AI damage
bAdaptAccuracytrueAdjust AI timing

Call from your game logic: Report Player Death, Report Player Hit AI, Report AI Hit Player

Knowledge Sharing

Enable: bUseKnowledgeSharing = true

PropertyDefaultDescription
KnowledgeSharingRadius1500.0Range for sharing (cm)
KnowledgeRetentionTime10.0How long knowledge lasts (sec)
AllyTag"Monster"Tag identifying allies

All monsters must have the same AllyTag to share knowledge!

Scripted Encounters

Enable: bUseScriptedEncounter = true

PropertyDefaultDescription
EncounterTypeNormalNormal / JumpScare / Dramatic / Ambush
bWaitForTriggerfalseAI stays dormant until Trigger Encounter
EncounterMontagenoneAnimation on trigger
EncounterSoundnoneSound on trigger
EncounterDelay0.5Seconds between trigger and AI activation

Day / Night Behavior

Enable: bUseTimeOfDayBehavior = true

PropertyDefaultNight Effect
NightDetectionMultiplier1.5+50% detection range
NightAggressionMultiplier1.5+50% damage
NightSpeedMultiplier1.2+20% speed

Call Set Night Time (bool) from your day/night system. bIsNightTime is also directly writable.

All Blueprint Events

Bind in your enemy Blueprint Event Graph. Right-click → search the name.

EventParametersWhen It Fires
On Player DetectedPlayer entered detection range
On Player LostPlayer escaped detection
On Attack Windup StartedSouls-like telegraph began (parry window open)
On Attack StartedAttack executes — apply damage to player here!
On DeathAI died
On State ChangedNewState (EAIState)Patrolling, Chasing, Attacking, Investigating, Fleeing, Stunned, Dead
On Emotion ChangedNewEmotion (EMonsterEmotion)Calm, Curious, Aggressive, Frightened, Enraged
On Health ChangedNewHealth, MaxHealth (float)HP changed (damage or heal)
On Damage TakenDamageAmount (float)AI took damage
On Noise HeardNoiseLocation (FVector)AI heard a sound
On Encounter TriggeredScripted encounter activated
On Knowledge ReceivedPlayerLastKnownLocation (FVector)Got player info from ally
On Target ChangedNewTarget, PreviousTarget (Actor)AI switched targets (threat system)
On Threat ChangedThreatSource (Actor), NewThreatValue (float)Threat value updated

All Blueprint Functions

AI Control

FunctionDescription
StartAIActivate the AI
StopAIDeactivate the AI
DieKill the AI (death anim, On Death event, destroy after delay)

Health

FunctionDescription
TakeDamage (DamageAmount)Apply damage
Heal (HealAmount)Restore health
GetHealthPercentReturns 0.0–1.0

Combat

FunctionDescription
ForceAttackAttack now (ignores cooldown)
Stun (Duration)Stun AI for seconds
TryParryAttempt parry → bool (true = success)
IsInParryWindowIs parry currently possible?
GetEffectiveChaseSpeedChase speed with all modifiers
GetEffectiveDamageDamage with all modifiers

State & Info

FunctionDescription
GetCurrentStateEAIState
GetCurrentEmotionEMonsterEmotion
GetDetectedPlayerCurrent target Actor (or null)
IsAIActiveIs AI running?
SetEmotion (NewEmotion)Force emotion change

Threat / Aggro

FunctionDescription
AddThreat (Source, Amount)Add threat from actor
ClearThreat (Source)Remove threat from one actor
ClearAllThreatReset entire table
Taunt (Source, Duration)Force target (Duration=0 uses DefaultTauntDuration)
GetThreat (Source)Threat value for actor
GetHighestThreatTargetTop-threat actor
GetAllTargetsByThreatSorted array (highest first)
GetThreatTableSizeNumber of tracked targets
ReportHealThreat (Healer, HealAmount)Healer generates threat

Systems

FunctionDescription
ReportNoise (Location, Loudness, Type, Instigator)Make AI hear a sound
ShareKnowledge (PlayerLocation)Share player position with allies
ReceiveKnowledge (PlayerLocation, KnowledgeAge)Receive from ally
TriggerEncounterStart scripted encounter
SetNightTime (bNight)Toggle night mode
ReportPlayerDeathAdaptive difficulty: player died
ReportPlayerHitAIAdaptive difficulty: player hit AI
ReportAIHitPlayerAdaptive difficulty: AI hit player
IsServerRunning on server? (multiplayer)

Troubleshooting

AI doesn't move

  • Check bAutoStart is enabled
  • Enemy must be a Character (with Character Movement Component), not a plain Actor
  • Speeds (PatrolSpeed, ChaseSpeed) must be greater than zero
  • Spline Patrol mode: assign a PatrolSpline component

AI doesn't detect player

#1 issue: Player missing Player tag. Player Blueprint → Class Defaults → Tags → add "Player".

  • Check DetectionRadius is large enough
  • If using FOV: player must be in front of AI
  • If using Line of Sight: nothing blocking the view
  • Enable bShowDebug + bShowDebugInGame to see detection sphere

AI doesn't attack

  • Player must be within AttackRange
  • Souls-like: Attacks array must have at least one entry
  • Check AttackCooldown

Animations not playing

  • Montages assigned in Details panel?
  • Character has Animation Blueprint?
  • Test montages manually first

Knowledge Sharing not working

  • All monsters need same AllyTag
  • bUseKnowledgeSharing enabled on ALL monsters
  • Check KnowledgeSharingRadius

Multiplayer: AI only works on host

  • Enable bEnableMultiplayer
  • Enemy Character: bReplicates = true
  • AI logic is server-only by design — clients get replicated state

Performance tips

  • Increase DetectionInterval to 1.0+ for many AI
  • Disable bShowDebug in shipping builds
  • Disable unused systems (hearing, knowledge, emotional, etc.)