• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
how to edit the ai file?

See in the Modding Documentation folder, the file, AI Files Modifiers.txt. This will explain it all. Basically you change the value of your item of interest and then play the game to see the effect.
You can also look at the AI files in the AI or switch folder in dh and find whatever you need probably in there already.