Ok, I looked through both variants. K-Mod code is well commented and comprehensible, so no problems on that part. AD code is less comprehensible, but that is not a problem too since we are using K-Mod as a base. Now, about trade types - in AD AI_counterPropose there are only 2 extra trade types that are being considered for counter-offer - TRADE_CONTACT and TRADE_MILITARY_UNIT. Do you want to replicate this or do you want it to consider all of extra types excluding POW and CORPORATION? In second case some decisions need to be made about when it is appropriate to offer different types (it might be a bit strange to offer election votes when trying to end war, for example... or maybe it's ok, not sure since i'm not a politician

).