Been looking at how to make the minor AI more interesting. Currently they just sit there and spawn units that just sit there. This is extremely boring. Looking through the files in ..\Public\MinorFactions sheds a little light on possible way to make them more interesting.


I've done some experimenting in the files to see what some of these 'terms' do and I can't seem to understand what they do (majority of them). Specifically looking at the items in FleetMissionDefinitions.xml.


BehaviorTree:


If I set the minor units to 'Roam' they will roam as expected. Can even limit the roam distance with 'RoamDistance'

If I set them to anything else they seem to be unresponsive. Even if they are declared war upon they will not attack to defend themselves. This is sad.

Through experimentation I found that setting them to 'RoamAndBlocadeOnly' they will roam but you cannot attack them.

Also through experimentation I found that setting them to 'RoamAndAttack' they will roam and attack you if you are on same tile as them. This is better than stale minor AI.


Where can I find what all the available BehaviorTree items are and what they are supposed to do?

Where can I find what all the available ActionLevel items are and what they are supposed to do?


Through the modding tools I've seen that pirates do not obey the defined FleetMissions in MinorStateDefinitions.xml. I changed the file so that each group only has one entry and that it's only FleetMissionRefence was DefendSystem (which appears to do absolutely nothing). Pirates then should only have that FleetMissionReference but they are able to choose others. Where is this defined? I see pirates referenced in this file in those FleetMissions definitions.


These are the notes I've compiled in my modified file while trying to understand the minor AI. I even made new FleetMissionDefinitions to see what would happen:


 <!-- TDW: RoamAndAttack works. Units roam and will attack -->
<!-- TDW: DefendSystem - doesn't seem to work. Will not attack even when attacked or declared war on -->
<!-- TDW: IdleAttack - I made - doesn't seem to work. Will not attack even when attacked or declared war on -->
<!-- TDW: RoamAttacknone - I made - doesn't seem to work. Will not attack even when attacked or declared war on -->
<!-- TDW: FindAndAttack - doesn't seem to work. Will not attack when attacked or declared war on -->
<!-- TDW: RoamAndBlockade - causes an attack but no blockading -->
<!-- TDW: RoamAndBlocadeOnly - causes roam but no blockading. Will not attack when declared war on. Cannot attack units -->
<!-- TDW: Chase - does not seem to work. Will not attack when declared war on. Will not chase when attacked and retreated -->


I would love to be able to make the minor AI units able to blockade. It would be nice to see them roam and when they see a unit coming blockade the tile to stop their movement and once they are stopped they (minor AI unit) keeps roaming. From the ActionLevel items I see blockade in their names but it doesn't seem to do anything.


If anyone can shed some light on this it would be appreciated. Thanks.