The NPC Defense Manager is responsible for managing the faction’s defensive behavior.
When creating a new NPC Manager object using the RTS Engine menu. The NPC Defense Manager is a component of the new NPC Manager’s “NPCArmyManagers” child object.
- Defense Ratio Range (between 0.0 and 1.0): When the NPC faction is carrying an attack, this field defines the ratio of the units to the total army units that will stay in the faction’s territory for defensive purposes.
- Cancel Attack On Defense (in seconds): If the NPC faction is attacked while it is carrying an attack and this field is enabled, the NPC faction would stop the attack and retreat in order to defend its territory.
- Cancel Defense Reload Range: A timer that defines how often will the NPC faction check if it’s under attack or not. When the NPC faction is no longer under attack, it will leave defensive mode and will be able to carry an attack.
- Unit Support Enabled: When enabled, units that get attack will be able to request support from army units in range.
- Unit Support Range: Defines the range from which units will be called to provide support for the behavior defined in the above field.