The AI Defensive block is a functional Automaton block in Space Engineers. Use this block for the easy automation of complex defensive behaviors such as when (and how) a drone shall flee combat, and what locations to fall back to. You choose what the Defensive AI shall consider a potential threat.
This AI Block is of type "Combat" and provides waypoints to AI Blocks of type "Move". For other Combat blocks, see AI Offensive.
When an AI block of type "Combat" detects an enemy within 2500m (line of sight), it deactivates any AI blocks of type "Task" and activates itself; when no enemies are nearby, it returns control to the AI Task block.
Construction[]
If Progression is on, build a Basic Assembler and some lighting blocks first to unlock this block. The block is 1x1x1 blocks in size and it exists for small and large grid. It can attach to other blocks on all sides. The block is not expensive and can be built in early game, similar to an ore detector. AI Blocks require 10 kW of power to work.
Requirements[]
The AI Defensive block depends on the presence of other AI Blocks: Build an AI Flight block and configure it as well.
Enemy detection depends on faction standing.
Usage[]
- Under Defend Against select whether you want this drone to react only to "Enemies" or to "Enemies and Neutrals".
- Under With Subsystem, choose whether you want the drone to consider only enemies a threat that have Power Blocks, or Propulsion, or Weapons. By default any enemy block is considered a threat, even unarmed/drifting/powerless.
- Under Lock target, choose whether you want the drones to target lock enemies that meet the “Defend Against” and “With Subsystem” conditions.
- Choose whether you want the drone to Target Characters (boarders on foot or with jetpacks) as well, or just drones and ships.
- Choose a Flee trigger to give the drone a retreat strategy:
- Never - The drone never flees.
Examples: Cheap mass-produced PBW and guided Decoys. - Always - The drone flees when it detects an enemy within 2500m, and the "Defend Against" and "Subsystem" conditions are met.
Example: An unarmed mining drone with valuable cargo retreats when an armed enemy with (Weapon subsystems) approaches. - When being target locked - The drone only flees when an enemy meets the "Defend Against" and "Subsystem" conditions and also target locks the drone.
Example: Disable this for decoying/tanking drones. Enable this if the drone participates in the battle but isn't tanky enough to withstand focused attention. - When taking damage - the drone only flees when it detects an enemy within 2500m and the "Defend Against" and "Subsystem" conditions are met and it receives damage.
Example: If a drone is tanky, it doesn't mind being target locked and drawing attention from its fellow drones, but it smartly retreats before it risks destruction.
- Never - The drone never flees.
- Choose a Flee Destination
- Away from Target – Flee in a random direction, opposite from the threat
- Flee distance – Flee up to this distance from the last known location of the threat.
- Random Deviations Angle – serpentine to become hard to track.
- Random Deviations Interval – How often the AI will do Random Deviations.
- To GPS / Beacon – travel to the selected GPS / Beacon coordinates.
- Flee To: Select a waypoint to return to when the flee action is triggered.
- Flee waypoint size: The grid must arrive at or within this waypoint. The waypoint can be resized via a slider from 0 to 500m.
- Away from Target – Flee in a random direction, opposite from the threat
- Click Set Up Actions to define actions it should do when it detects a target (first slot), and when it loses sight of the target (second slot).
Tips: Use Timer Blocks to define several actions. The action can also be to switch on AI Offensive behaviour instead of (default) fleeing. - Under Flee to, select a retreat location from a list of your beacons or GPS coords. This could be the hangar of a support ship with welders and ammo supplies.
- Flee waypoint size: Choose a value between 0 to 500 metres.
- If the drone can retreat to a Safe Zone, set this to a bit less than the Safe Zone radius.
- If you want the drone to be refueled/repaired/restocked, set this to zero because it needs to dock exactly to the Connector on the waypoint.
- Switch on AI Behavior to make this the active block of its type.
Tip: Add an Event Controller that monitors an attack drone's status and enables the defensive behaviour only when the drone has lost too many weapon blocks or has run out of power or ammo.
Recipe[]
AI Defensive | ||||
---|---|---|---|---|
Component | Large Ship/Station Required | Large Ship/Station Optional | Small Ship Required | Small Ship Optional |
Interior Plate | 20 | — | 2 | — |
Computer | 20 | — | 10 | — |
Motor | 4 | — | 2 | — |
Detector Components | 20 | — | 4 | — |
Construction Comp. | 30 | — | 5 | — |
Steel Plate | — | 20 | — | 2 |