Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. NPC Factions
  4. NPC Population Manager

NPC Population Manager

The NPC Population Manager is responsible for managing faction resources.

When creating a new NPC Manager object using the RTS Engine menu. The NPC Population Manager is a component of the new NPC Manager’s “NPCOtherManagers” child object.

  1. Population Buildings: Drag and drop the building prefabs with component that you want the NPC faction to use as the main population buildings (these buildings will be placed when the faction wants to increase its population slots). If the NPC Manager that this component belongs to is supposed to be used for different NPC types or different faction types then you can have buildings that play for those different types in this list because they will be filtered once this component is initialized (meaning only the buildings that fit the faction type and NPC type will be activated and used by the NPC faction). Make sure that buildings in this list have their regulator data correctly defined.
  2. Target Population Range: The target population slots amount that the faction will attempt to reach.
  3. Monitor Population Reload Range (in seconds): How often does the NPC faction attempt to update its population and reach its goal?
  4. Population On Demand:
    1. Enabled: Can other NPC components request to increase the faction’s population?
    2. Acceptance Range (between 0.0 and 1.0): If requesting to increase the faction’s population is allowed, this defines if that request will be accepted (the higher, the more chance that the request will be accepted with 0.0 -> never accepted and 1.0 -> always accepted).
  5. Auto Place: Allow this component to automatically request to place population buildings?
  6. Min Free Population Slots: The minimum amount of population slots allowed before this component starts automatically requesting to place population buildings. Only if Auto Place is enabled.

How can we help?