Page 1 of 1
Possible to mod to cut down on border gore?
Posted: Fri Jul 03, 2020 7:51 pm
by Scobie
So, started playing this game not long ago, enjoying it a lot so far. I'm probably getting a bit ahead of myself here, but I was wondering if it'd be possible to mod the AI to be less likely to accept deals that would leave them with provinces cut off from their capital, so that kingdoms are less likely to get chopped in half or end up with little bits of themselves in each other's territory. It's daft but this sort of thing really irks me, and I love the game otherwise.
Re: Possible to mod to cut down on border gore?
Posted: Mon Jul 06, 2020 7:13 am
by Pocus
The interest in a region for the AI, in peace or transaction treaty is given using this line of code
interest = DivideAndRound(Region_Worth(candidateID) * Region_CountAdjacentOwner(creatorID, candidateID) * 25, 100);
Diplomacy.bsf, line 12633
That is, 0 interest if not neighbour at all to its territory, and +25% per owned neighbouring region
Re: Possible to mod to cut down on border gore?
Posted: Mon Jul 06, 2020 12:18 pm
by Scobie
That's awesome, thanks a lot!