Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## UnitAISettings :: struct

Used by UnitPrototype and SpiderUnitPrototype.

## Properties

- default
- sorted

destroy_when_commands_fail optional | :: bool | If enabled, units that repeatedly fail to succeed at commands will be destroyed.
If enabled, units that repeatedly fail to succeed at commands will be destroyed.
allow_try_return_to_spawner optional | :: bool | If enabled, units that have nothing else to do will attempt to return to a spawner.
If enabled, units that have nothing else to do will attempt to return to a spawner.
do_separation optional | :: bool | If enabled, units will try to separate themselves from nearby friendly units.
If enabled, units will try to separate themselves from nearby friendly units.
path_resolution_modifier optional | :: int8 | Must be between -8 and 8.
Must be between -8 and 8.
strafe_settings optional | :: PrototypeStrafeSettings |

allow_try_return_to_spawner optional | :: bool | If enabled, units that have nothing else to do will attempt to return to a spawner.
If enabled, units that have nothing else to do will attempt to return to a spawner.
destroy_when_commands_fail optional | :: bool | If enabled, units that repeatedly fail to succeed at commands will be destroyed.
If enabled, units that repeatedly fail to succeed at commands will be destroyed.
do_separation optional | :: bool | If enabled, units will try to separate themselves from nearby friendly units.
If enabled, units will try to separate themselves from nearby friendly units.
path_resolution_modifier optional | :: int8 | Must be between -8 and 8.
Must be between -8 and 8.
strafe_settings optional | :: PrototypeStrafeSettings |

## Properties

### destroy_when_commands_fail :: bool optional

Default: `false`

If enabled, units that repeatedly fail to succeed at commands will be destroyed.

### allow_try_return_to_spawner :: bool optional

Default: `false`

If enabled, units that have nothing else to do will attempt to return to a spawner.

### do_separation :: bool optional

Default: `true`

If enabled, units will try to separate themselves from nearby friendly units.

### path_resolution_modifier :: int8 optional

Default: `0`

Must be between -8 and 8.

### strafe_settings :: PrototypeStrafeSettings optional

Type used in

- SpiderUnitPrototype::ai_settings
- UnitPrototype::ai_settings