The NPC Attack Manager is responsible for the NPC faction’s offensive behavior.
When creating a new NPC Manager object using the RTS Engine menu. The NPC Attack Manager is a component of the new NPC Manager’s “NPCArmyManagers” child object.
Picking a Target Faction:
- Can Attack: Enable to allow the NPC faction to attack other factions.
- Attack Resources: A list that defines the resource types that the NPC faction will base its decision upon when picking one to attack.
- Target Faction Type: Pick how the NPC faction chooses a target faction to attack:
- Random: The NPC faction will randomly pick another faction to attack.
- Most Attack Resources: The NPC faction will pick the faction with the most total amount of the resource types specified in the Attack Resources field.
- Least Attack Resources: The NPC faction will pick the faction with the least total amount of the resource types specified in the Attack Resources field.
- Set Target Faction Delay (in seconds): Delay time before the faction picks a target faction to attack.
Launching an Attack:
- Launch Attack Reload Range (in seconds): When the NPC faction has target, this field defines how often this component checks whether it can launch an attack or not.
- Launch Attack Resources: Specify the resource types and the minimum amount required of these resources that the NPC faction must have before launching an attack towards its target faction.
- Attack Order Reload Range (in seconds): When the NPC faction is carrying an attack, this field defines how often will this component give orders (on which buildings and units in the target faction’s territory to attack) to the units doing the attack.
- Send Only Idle: Only send attack units that are idle (and not performing another task at the time of the attack launch) to attack?
- Target Picker: Allows to specify unit/building codes and categories that the NPC faction will prioritize engagement to while attacking its target faction. Check the Attack Target Picker documentation page for more information.
- Cancel Attack Resources: When the NPC faction is engaging in an attack and one of the resource types defined in this field have an amount below the value specified in this field, the NPC faction will cancel its attack.