Well, like I said, I haven't looked at buildings before. But it looks like they have similar structure to ships.
planetModuleRoleType "WEAPONDEFENSE"
This is what you'd want to be changing. However, I don't think you can give buildings multiple roletypes. You'd find something the AI builds often (e.g. research centers) and give the same roletype to the building you want them to build more often. Chances are, though, the game will crash if they lack some critical stuff e.g. if you just entirely removed the trade center roletype, assuming you have one. In the best case scenario they'd have both. This can be done with ships, but buildings might be significantly more annoying.
Unfortunately, the way the Ai actually handles building everything is entirely hardcoded. It's not really an AI at all, to be honest.