Monsters Mental States
- 4A Games
Introduction
Description of behavior of all monsters in all mental states, except for danger.
Combat Monsters
This category includes:
- nosalis
- aqua_male_small
- aqua_female
- harpy
- lurker
- watchman
- dog
- humanimal
- wolf
- cannibal.
Basic Behavior Concept
Unlike human NPCs, monsters do not possess group behavior with role distribution. Each one works on its own. Still, in the uber alert state they will, like human NPCs, synchronize threats and timers among themselves.
1. Disturbed
- This mental state only affects the interest of the monster. It does not play any motions, it simply tries to look toward the threat.
2. Light Alert
- In this state, the monster has to look at the threat, turning if necessary.
3. Alert
- In this state, the monster has to check the location of the threat without alerting others.
4. Uber Alert
- In this state, the monster has to check the location of the threat, alerting others.
Some monsters have a number of quirks associated with their abilities (demons fly, dogs sniff, lurkers hide in holes) which will be described separately.
Basic Behavior Mechanic
Light Alert
Reaction → Threat Inspection → Calming Down
Reaction
- A monster plays an interest animation directed at the threat.
- The monster turns towards the threat.
- Once the motions are over, the monster switches to the next state.
Motions:
- Motions of the monster turning towards the threat
- _turn...
Threat Inspection
- If a threat is nearby, a monster plays the motions of looking around. At the end of the motion, the monster switches to the next state.
- If the threat is not nearby but is visible (raypick), the monster plays the motions of looking at the threat. At the end of the motion, the monster switches to the next state.
- If the threat is not nearby and is not visible, the monster plays the motions of looking around. At the end of the motion, the monster switches to the next state.
The threat is nearby:
Distance to the threat ≤ 3 meters, path built through path find.
Assessment of whether the threat is visible:
- Raypick from an NPC at the height of its eyes toward the threat, the distance of up to 15 meters. If there are no obstacles, the threat is visible. If there is an obstacle, it is deemed not visible.
Motions:
- motions of looking around.
- motions of looking at the threat.
Calming Down
Once motions of looking around or looking at the threat are over, the monster will switch to the free state.
Alert
Reaction → Looking for Threat → Threat Inspection → Calming Down
Reaction
Same as Reaction in Light Alert.
Looking for Threat
A path to the threat is calculated and the monster begins the movement. While walking along the path, the monster constantly checks the threat’s visibility to keep looking at it.
- If the threat isn’t visible, the monster looks along the path vector and points of interest.
- If the threat is visible, the monster looks toward the threat.
- If the threat is far away, the path to it is not calculated.
- If there is no calculated path to the threat or the threat is too far, this state is skipped.
- When the monster comes close to the threat, it stops and enters the next state.
Distance to stop at:
- The length of the path built by pathfind ≤ 2m.
Long distance to look for threat:
- The net distance to the threat or the pathfind distance is taken from the values.
- max_investigate_threat_dist_lalert.
- max_investigate_threat_dist_alert.
Monsters should not all head for one point.
Threat Inspection
Same as Threat Inspection in Light Alert.
Calming Down
Same as Calming Down in Light Alert.
Uber Alert
Reaction → Looking for Threat → Threat Inspection → Territory Inspection → Calming Down
Reaction
Same as Reaction in Light Alert.
Looking for Threat
Same as Looking for Threat in alert.
Threat Inspection
· If a threat is nearby, a monster plays the motions of looking around. At the end of the motion, the monster switches to the next state.
· If the threat is not nearby but is visible (raypick), the monster plays the motions of looking at the threat. After that, the motions of looking around. At the end of the motion, the monster switches to the Calming Down state.
· If the threat is not nearby and is not visible, the monster plays the motions of looking around. At the end of the motion, the monster switches to the Calming Down state.
Territory Inspection
Current pattern used, where monsters check different locations around the area where the threat was detected.
Calming Down
Same as Calming Down in Light Alert.
Corpse Found
• The monster perceives the corpse as an uber alert threat. The corpse has an expiration time during which it is perceived as a threat, and once that time elapses it is ignored.
Killing In Sight
Reaction
- The monster that first saw the corpse receives an uber alert visual threat with the position of an initiator.
- The monsters that discovered the corpse reacts according to the standard flow of uber alert sound threats.
Specific Properties of These Monsters
Monster | Light Alert | Alert | Uber Alert | Finding Corpses | Killing In Sight | Extra Features. | |
---|---|---|---|---|---|---|---|
1 | nosalis | Base behavior. | Base behavior. | Base behavior. | Base behavior. | Base behavior. | - |
2 | aqua_male_small | If the entity is on land and the threat is on land:
If the entity is in the water and the threat is in the water:
If the entity is on land and the threat is in the water:
If the entity is in the water and the threat is on land:
| If the path can be calculated, regardless of the threat’s and entity’s locations:
If the entity is in the water and can’t build the path:
If the entity is on land and can’t build a path:
| If the path can be calculated, regardless of the threat’s and entity’s locations:
If the entity is in the water and can’t build the path:
If the entity is on land and can’t build a path:
| Base behavior. | Base behavior. | - |
3 | aqua_female | Same as aqua_male_small. | If the entity is allowed to get out of the water: If the path can be calculated, regardless of the threat’s and entity’s locations:
If the entity is in the water and can’t build the path:
If the entity is on land and can’t build a path:
If the entity is NOT allowed to get out of the water: If the entity is in the water and the threat is on land:
For all other cases:
| If the entity is allowed to get out of the water: If the path can be calculated, regardless of the threat’s and entity’s locations:
If the entity is in the water and can’t build the path:
If the entity is on land and can’t build a path:
If the entity is NOT allowed to get out of the water: If the entity is in the water and the threat is on land:
For all other cases:
| Base behavior. | Base behavior. | The entity has 2 different behavior patterns:
|
4 | harpy | While on land:
While in the air:
| While in the air:
While on land: If the threat is near (closer than 20m):
If the threat is far (between 20m and 60m):
| While in the air:
While on land: If the threat is near (closer than 20m):
If the threat is far (between 20m and 60m):
| Base behavior. | Base behavior. | The entity can be either on land or in the air, depending on which behavior patterns and reactions have changed. |
5 | lurker | While on land:
While in its lair:
| While on land:
While in its lair:
| While on land:
While in its lair:
| Base behavior. | Base behavior. | - |
6 | watchman | Base behavior. | Base behavior. | Base behavior. | Base behavior. | Base behavior. | - |
7 | dog | Base behavior. | Base behavior. | Base behavior. | Upon noticing a corpse, it switches to uber alert and goes to check the corpse out. Having checked the corpse, it updates the threat location (location from which the victim was killed). Marks the corpse for the others as checked. | Base behavior. | Has special functionality of sniffing out the threat, described in more detail below. |
8 | humanimal | Base behavior. | Base behavior. | Base behavior. | Base behavior. | Base behavior. | - |
9 | wolf | Base behavior. | Base behavior. | Base behavior. | Same as dog. | Base behavior. | Same as dog. |
10 | cannibal | Base behavior. | Base behavior. | Base behavior. | Base behavior. | Base behavior. | - |
Smell Mechanic (Dogs/Wolves)
The keen sense of smell lets the entity detect the “trail” and follow it to check it out.
Chain of events:
Reaction → Searching For The Source → Inspection → Repeat or Calming down
Reaction
The entity plays the motions of sniffing and then switches to the state of “Searching For The Source”.
Searching For The Source
The entity moves (pathfind) along the trail, constantly switching between points in the trail’s sequence.
· If the time specified in the entity’s properties for the search elapses, the entity switches to the Inspection state.
· If the trail was lost (there are no valid traces within the scent radius), the entity switches to the Inspection state.
Inspection
The entity stops to check the location by sniffing it.
After The Inspection
· If a “track” is found in the smell radius, the loop repeats, starting with Searching For The Source.
· If no “track” is found in the smell radius, the entity stops the search and calms down.
The tracks in this case are:
- Player’s tracks
- The player leaves an array of X tracks, each of which lives for Y amount of time (no tracks are left outside of the AI map).
- A corpse of an entity belonging to the same group, or a corpse of an entity from a group that the assigned NPC leader belongs to (referred to as the “friendly group” below):
- If the entity from the “friendly group” was killed and the entity’s group did not find out about it, once a certain period of time passes (which can be changed in settings), the corpse becomes a “track” for the group members.
- If the dead entity from the “friendly group” has already been sniffed or seen by any of the other members of same group, it stops being treated as a new “track” for the whole group.
A corpse starts being treated as a track once Х amount of time elapses since death, and ceases to be treated as such after being checked out by an entity.
Particularities:
· An entity can only use its sense of smell in the free/disturbed state, i.e. any threat with a state higher than disturbed will take priority over smell.
· If the entity smells several corpses and the player at once, it chooses the nearest track as its target.
Search Mechanic With a Dog and Leader NPC
If the dog’s leader is alive and is in the uber alert state, AND the dog does not have a unique threat of its own, it uses this mechanic.
Leader Search → Territory Inspection → Repeat
Leader Search
The dog moves toward its leader using sniffing motions. Having reached the leader (an exposed value in meters), the dog switches to Territory Inspection.
Territory Inspection
Same as Territory Inspection in uber alert.
Once the leader departs and moves further from the dog than a specific distance (an exposed value in meters), the dog switches to Leader Search.
IMPORTANT: The dog occupies the second NPC’s slot in a search group, i.e. a group containing an NPC and a dog is considered full and won’t be joined by another NPC.
Neutral Monsters
The category includes:
- rat
- rabbit
- deer
- snake
- slave.
Basic Behavior Concept
- Disturbed
This mental state only affects the interest of the monster. It does not play any motions but simply tries to look toward the threat.
- Light Alert
In this state, the monster has to stop what it’s doing and look at the threat, turning if necessary.
- Alert
- Some monsters hide in their lairs.
- In this state, the monster has to get scared and retreat.
- Uber Alert
- Some monsters hide in their lairs.
- In this state, the monster has to get scared and retreat.
- Kill In Sight
- Same as Uber Alert but the monster learns the enemy’s location.
- Finding A Corpse
- Same as Uber Alert.
Basic Behavior Mechanic
Light Alert
Same as the Light Alert described above.
Alert And Uber Alert
Safe → Calming down
Safe
Runs away until the timer elapses.
- While running away, it uses the same mechanism as in Species Behavior, i.e. either runs to a particular cover or in the direction opposite to the threat (chosen by the designer).
- While running away, it alerts others.
Calming Down
Once the timer elapses, switches to the free state.
Corpse Found
Treats a corpse as an uber alert threat. The corpse has an expiration time during which it is perceived as a threat, once that time elapses it is ignored.
Kill In Sight
Reaction
- The monster that first saw the corpse receives an uber alert visual threat with a position of the initiator.
- The monsters who found the corpse will react according to the standard flow of uber alert sound threats.
Specific Properties of These Monsters.
Монстр | Light Alert | Alert | Uber Alert | Finding corpses | Killing in sight | Extra features. | |
---|---|---|---|---|---|---|---|
1 | Rat | Base behavior. | Base behavior using lairs as places to escape to. | Base behavior using lairs as places to escape to. | Base behavior. | Base behavior. | - |
2 | Rabbit | Base behavior. | Base behavior using lairs as places to escape to. | Base behavior using lairs as places to escape to. | Base behavior. | Base behavior. | - |
3 | Deer | Base behavior. | Base behavior. | Base behavior. | Base behavior. | Base behavior. | - |
4 | Slave | Base behavior. | Same as in Light Alert behavior – i.e. stays in free animation state, in contrast to cannibals and tribals. | When threatened, drops to the ground. While on the ground, looks around from time to time but doesn’t get up until returning to free. | Base behavior. | Base behavior. | - |
Using The Slave Entity
- In the uni_cannibal subscript, mark the entity as slave.
- In the state of light alert and above, cease all logic.
- Use rusik\uni_npc_mental subscript with type=slave to be able to catch the correct end of the fright state.
If the slave goes to sleep or sits down, use the rusik\uni_slave_state subscript to point it out, then the slave will be able to correctly switch to fear from the sitting or prone position and then return back to sitting or prone.
- Sitting – floor_sit_idle_0
- Sleeping – monsters\canibal\free_idle_sleep_left_side_0
Other Monsters
The categories include:
- big_mother
- aqua_male_big
- grizly
- simple_anomaly
- catfish
- water worm
- desert worm
- nosalis_female
- arahind
- mantabat
- raven.
Behavior concept
Scripted monsters with unique, entirely scripted behaviors.
Exodus SDK © 2005-2023, 4A Games Limited. Developed by 4A Games®.
4A Games® is a registered trademark, and 4A Games Limited, Exodus SDK and their respective logos are trademarks of 4A Games Limited.
Published by Deep Silver. Deep Silver is a division of PLAION GmbH, Austria. Deep Silver and Plaion are registered trademarks of PLAION GmbH.
Metro Exodus is inspired by the internationally best-selling novels METRO 2033 and METRO 2034 by Dmitry Glukhovsky.
All other trademarks, logos and copyrights are property of their respective owners. All rights reserved.
By using this site, downloading or using the Exodus SDK or related content, you are agreeing to be bound by the terms of the End User License Agreement.