Artificial Intelligence
- 4A Games
Pre-Requisites
Needs a Navigation setup; (Ctrl+N to show it in the Scene Mode).
Patrol Points
Patrol Point are points that can be connected, allowing an NPC/AI to follow. They follow a linear, one-directional path.
To add a patrol point, look for General → Patrol Point in the Entities Toolbar.
It should look like a red flag. A green flag means it in on a navmesh.
To link patrol points:
- With the first patrol point selected, add a new patrol point to the scene
- or with one patrol point selected, RMB on the next cover → Highlighted → AI: Add Link to Selected.
VS Blocks
- npc/Play Patrol Path/EX = Forces an NPC/AI to play a patrol path. It will follow the path until the end. All points must be on the AI-map.
Covers
Covers are paths with animations that an NPC/Enemy can follow dynamically (e.g. jump to another navmesh to follow the player) or forced (via VS Node → play patrol path).
They can follow a linear path (point A to point B) or branch into multiple branches (point A can lead to points B, C, D, E, etc.).
Main Properties | Description |
---|---|
Type | The type of cover. This will depend on what type of an NPC will use it and for what purpose. |
Left/Right Action | Mostly used for the "Human Combat" type. The cover can be used to "look" left/right. |
Stand/Sit/Up | Mostly used for the "Human Combat" type. Sets how this cover is to be used (enemy standing, on his knees, or use it as an up/down cover). |
Must be/Must not be on AI map | Allows you to snap the cover into a navmesh. Green covers are on a navmesh, while red are not. For the first and last covers of a sequence, it MUST be on the AI-map! |
To add a cover, look for General → Cover in the Entities Toolbar.
It should look like a red, small cylinder. Cylinder size will vary depending on the cover type: green means it is on a navmesh, red means it is not on a navmesh.
Every time you add a cover, you should specify its type. Some of the types include:
- Humans/Watchman/Humanimals, etc. – should be used for simple covers for each type (e.g. Watchman uses Watchman type covers).
- Human Combat – specifically designed for a Human Enemy. They will automatically take cover from bullets. You can set up left/right actions, also as "sitting" or "standing up".
- NetSpawn – create as a spawn area for when the player drowns.
To link covers:
- With the first cover selected, add a new cover to the scene. It will ask you to select an animation.
- With one cover selected, RMB on the next cover → Selected → COVER: Create a link to HL Cover.
Covers can also be attached to a "Cover Group" entity. It allows you to group covers so that it's easier to allow/block multiple covers at once.
To add a Cover Group, look for General → Cover Group in the Entities Toolbar.
To link the Cover Group to covers, you can:
- Select all covers you want in the group and then Add a Cover Group into the scene.
- Select all covers you want in the group, then RMB on the Group → Highlighted → Append Cover to Group.
- Select the cover group, then RMB on the cover you want → Selected → Append Cover to Group.
VS Blocks
- npc/Play Cover Path/EX – forces an NPC/AI to play a cover path. The first and last covers MUST be in the navmesh (green-colored).
- npc/Take Cover – forces an NPC/AI to take cover.
- npc/Cover Group – allows you to activate/deactivate cover groups.
Obstacle
Unlike the player, enemies/AI are not affected by Obstacle Restrictors. They have their own type of obstacles called the Obstacle Shape/Area/Proxy.
To add an obstacle shape/proxy to the scene:
- Look for AI → Obstacle Shape/Area/Proxy in the Entities Toolbar.
An obstacle shape/area should look like a thin blue rectangle (or red if it's not in the navmesh), and the proxy should look like a blue transparent cube.
There are two ways you can set up an Obstacle Shape to block an NPC.
- By toggling the "Persistent" checkbox in its properties windows. This will set the obstacle as "Always On".
- Via VS blocks (allows you to activate/deactivate obstacles).
Note:
- Multiple Obstacle Shapes/Areas can be connected to one Obstacle Proxy.
- Obstacle Shapes/Areas must have a Half-Size of 0.001 on the Z axis.
VS Blocks
- NPC/Obstacle – allows you to activate/deactivate an obstacle proxy.
Mental States
Mental State is how the engine sets the AI functions. It's coded into the basic AI functionality and cannot be changed via VS.
It can range from Free to Danger and it's used for all AI.
There are 6 mental states:
Mental State | Description |
---|---|
Free | All clear, no enemy in the perimeter. Normal routine. |
Disturbed | All clear, no enemy within the perimeter. Some sound cues and VOs (e.g. "Hmm?"). |
Light Alert | Hears/sees something, but is not sure. Will stay at the same place and look at the source of the sound/shadow. From here, it can downgrade to Free ("It was just in my head") or upgrade to Alert ("Something is definitely not right"). |
Alert | Will search the area where the AI saw the shadow or heard the sound. If a dead body is found, it will upgrade to Uber Alert. |
Uber Alert | There is an enemy within the perimeter, but the AI doesn't know it's precise location. From here, it's impossible to downgrade to Alert. The only options the player has are either to leave the area or kill the enemy. |
Danger | Full engage/shooting mode. Knows where the enemy is and will shoot/attack. |
You can debug the AI mental state with the "draw_mental_state" console command. This will show the mental state for all enemies (0 for off, 1 for selected, 2 for all).
VS Blocks
You can always check the mental state of an AI.
For example, if an AI is Free, the AI can follow a certain patrol path. Or if it's in Danger, it will not follow the path and instead take cover and engage into combat with an enemy.
For this, use the node "mental state". This trigger will be activated when the selected range of states is met.
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.