so there will have to be a few new things added,
for now i tried a lobbyself with just a copy of the code from lobbyfriendly and lobbyenemy in getlobbyviability, since it there is no difference between the two. they all return 0.0f
also upon reading the code for executediplomatic action, there is no code for savings demand. but the AI uses it anyway

added some more TraceVerbose to let it show on the console when it uses certain functions.
edit: added some code for ExecuteDiplomacyAction with a case for treaties and allowed the AI to actually get a weight for them.
nothing happens yet, as the code only outputs to the console, but i can see the AI offering incorporate treaties to other AI. a step in the right direction i think.
+ what i said about the ai offering treaties, 5-9 thingy, wasn't correct. there are two conditions that can lead to the AI offering a treaty. one is round-robin, and the other is a random roll.
edit 2:
tried to add actual treaties to offer, somehow crashed when it tried to get the cost for an armistice treaty. my skill in programming is far too lacking to find out why...
getting the cost should work, as the game does it when a player looks to offer an armistice AND i have now observed it using said function successfully with output to the log.
getting this to work without a decompiled sots2.exe is a bitch since you can't see what is in all the variables
edit 3:
issue is resolved. the AI can now get the cost.
however... the issue with getting the weights for a diplomatic action (specifically a treaty) remains. but ONLY when the second condition to offer a treaty is used. the case being that the round-robin method only compares the current diplomatic state to the preferred one (based on current relations), and directly offers a treaty without getting weights for its actions.
i've tried adding every possible treaty to the diplomacyweight.xml in every diplomacyreaction, but to no avail... i'll keep working on it.