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:
- Create an AI controller deriving from
RTSPlayerAIController
. - Set the Player Behavior Tree Asset of your new player AI controller to
BT_RTSPlayerBehaviorTree
(or create your own one). - Set the Player Blackboard Asset of your new player AI controller to
BB_RTSPlayerBlackboard
(or create your own one). - 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.
- 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.
- Add your resource types to the
PlayerResourcesComponent
of your player AI controller. - Check Gives Bounty if killing actors owned by the AI should yield bounties (e.g. for neutral players).
- Use your player AI controller in your game mode.
- At your game mode, set Num AI Players to the number of AI players you want to spawn.