AI Defensive

From Space Engineers Wiki
Jump to navigation Jump to search
AI Defensive
Icon Block AI Defensive.png

Category: Functional
Function: makes a drone defensive

Fits small grid
Mass: 156.0 kg
Power: 0.01 MW
PCU: 25
Size: 1x1x1
Time to Build: 10 sec

Fits large grid
Mass: 900.0 kg
Power: 0.01 MW
PCU: 25
Size: 1x1x1
Time to Build: 24 sec

Data Controls: [edit] [purge] (?)

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.

Usage

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.

How to make the drone be defensive

  1. Under Defend Against select whether you want this drone to react only to "Enemies" or to "Enemies and Neutrals".
  2. 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.
  3. Under Lock target, choose whether you want the drones to target lock enemies that meet the “Defend Against” and “With Subsystem” conditions.
  4. Choose whether you want the drone to Target Characters (boarders on foot or with jetpacks) as well, or just drones and ships.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.

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.

Recipe

Icon Block AI Defensive.png AI Defensive
ComponentLarge Ship/Station
Required
Large Ship/Station
Optional
Small Ship
Required
Small Ship
Optional
Icon Item Interior Plate.png Interior Plate202
Icon Item Computer.png Computer2010
Icon Item Motor.png Motor42
Icon Item Detector Components.png Detector Components204
Icon Item Construction Comp..png Construction Comp.305
Icon Item Steel Plate.png Steel Plate202



Functional Blocks