Here are some tutorials I wrote on how to create simple campaign AI:
- Creating simple AI scripts for your custom campaigns
- Tribute-based objectives with AI scripting
- Using goals to clean up AI scripts
Also, I don’t recommend using AI scripts from the DLC campaigns for reference (i.e. campaigns from Lords of the West onwards), as they are a lot more complex than the non-DLC campaign scripts.