Each NPC faction type is managed by one main component: NPC Manager.
To create a new NPC faction type, click on the ‘RTS Engine’ menu and then click on ‘New NPC Manager’. This will spawn a new object in the scene which only has the NPC Manager as a component and other NPC components attached to its child objects.
- Name: Provide a name for the NPC faction type which will be visible when selecting a difficulty level for a NPC faction in the menus.
- Code: A unique code for each NPC faction type.
- Prefab Path: Drag and drop the NPC Manager into the project tab to create its prefab, remove the object in the scene and start manipulating the prefab from now on. Finally, input the prefab’s path in this field.
- ‘Refresh Regulators’ button: This button will create/refresh the NPC Unit Regulators and the NPC Building Regulators by scanning the unit/building prefabs in the resource folders. The regulators will then be created inside a folder under the name: ‘NPC_MANAGER_CODE_regulators’ (with NPC_MANAGER_CODE = the actual code that has been entered in the ‘Code’ field above) in the provided prefab path. Two sub folders under the names ‘Unit Regulators’ and ‘Building Regulators’ will respectively hold the unit regulators and building regulators. Make sure to click on this button every time you add new unit/building prefabs.