Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 1.3 KB

AIPlayers.md

File metadata and controls

13 lines (11 loc) · 1.3 KB

AI Players

The plugin provides basic support for AI players as well. Currently, this doesn't go beyond fulfilling basic build orders, so you'll probably want to extend that, e.g. by determining when to attack other players, and where. At least, this should get you started:

  1. Create an AI controller deriving from RTSPlayerAIController.
  2. Set the Player Behavior Tree Asset of your new player AI controller to BT_RTSPlayerBehaviorTree (or create your own one).
  3. Set the Player Blackboard Asset of your new player AI controller to BB_RTSPlayerBlackboard (or create your own one).
  4. Set up the Build Order of your new player AI controller. The AI will produce the specified actors in order, automatically skipping actors that are already available and replacing those that have been destroyed.
  5. Set up the Primary Resource Type of your new player AI controller. The AI will try and prevent blocking paths between its main building and resource sources of that type.
  6. Add your resource types to the PlayerResourcesComponent of your player AI controller.
  7. Check Gives Bounty if killing actors owned by the AI should yield bounties (e.g. for neutral players).
  8. Use your player AI controller in your game mode.
  9. At your game mode, set Num AI Players to the number of AI players you want to spawn.