Greetings!
I'm currently building the script for the new treaty system that the AI will use in the Balance Mod. So far I've identified the types of treaty packages the AI might offer and most of the conditions that might by included in the proposals.
If it chooses to propose a treaty, the AI will consider it's anger level towards the other player along with modifiers from the type of AI it is (aggressive, neutral, peaceful), the score difference, and if it is currently in any wars. I may also factor in the game date.
Once the anger level is computed, then a series of conditional statements will choose a corresponding treaty type.
There are a number of treaty "classes" so far that I've outlined - although the actual names are picked from a list of appropriate choices. A number of terms are preset, although some types and/or stipulations will have some randomness.
Partnership:
Requires good relations and features trade, sharing of most items, mutual defense, etc. Only for the best of friends.
Military Alliance:
Similar to partnership, but with sharing focused on military items like share supply or enemy designs plus a few non-military items added by chance.
Mutual Defense:
Only picked if the AI is at war with someone. Terms will be similar to military alliance, but with fewer bonus terms.
Cooperation:
A more random trade agreement with a bit more sharing of non-resource or research items.
Trade & Research:
A trade agreement with some technology exchange.
Trade:
Mostly resource trade and a few other good faith items thrown in randomly such as share resupply or maps etc.
Free Navigation:
A friendlier version of a non-aggression pact
Non-Aggression
A typically early game treaty used to prevent hostilities and form a building block for more constructive treaties if things go positive
Non-Interference:
A highly specific agreement to stay out of each others' space - more likely to be proposed by aggressive races
Protectorate:
A not so mean treaty generally offered by peaceful races to much weaker empires... only small tariffs and some one-sided stipulations
Subjugation:
A meaner treaty offered by more aggressive races to much weaker empires... more severe tariffs and more one-sided conditions
Potential types not quite worked in yet:
Population Exchange:
A concise agreement to exchange population through migration
Technology Exchange:
Like above, but for technology