Diplomacy AI Development

I think it's more than a speedbump, you get a "tourism cut", economic cut, when you can't trade you can't have a good diplo modifier that can go up to (+40), declarations o war and conquering cities doesn't add so much penalties. If you count the visible and invisible penalties you get a game changing mechanic you can recover from but it is not a speedbump, at least it's my honest opinion. If you make the sanction stronger you can "break" the game
I agree that sanctions do their job nicely right now and shouldn't be adjusted IMO. The happiness/economy loss from luxuries/trade alone can be a huge hit to a civ. I don't really like the temporary idea either.
 
I think it's more than a speedbump, you get a "tourism cut", economic cut, when you can't trade you can't have a good diplo modifier that can go up to (+40), declarations o war and conquering cities doesn't add so much penalties. If you count the visible and invisible penalties you get a game changing mechanic you can recover from but it is not a speedbump, at least it's my honest opinion. If you make the sanction stronger you can "break" the game by sactioning those who are in the head of the race (buying some votes for example) and being the "only" major State in the world, and just cleaning the Civs in front of you. AHAH Why would you think with the temporary sactions would make it a lot weaker? In your opinion it would be less fun? I just want to know diferent opinions so we can think of a better alternative ahah

Temporary sanctions make it too much like a timeout instead of a serious punishment for angering other civs. It makes the optimal strategy “wait it out” instead of trying to power through it or get it overturned in the WC. It’s a diplomatic weapon and weakening it indirectly nerfs diplomacy by nerfing the resolution itself, but also by forcing the proposal to be voted on multiple times instead of advancing the game by voting on other resolutions. WC is already bogged down enough with repeated votes on big proposals because they are hard to pass.
 
IMO limiting defensive pacts to 1 really removes a lot of the value of investing in diplomacy, particularly in games with many civs (e.g. larger maps). I think limiting them to 3 for example would be reasonable though.
 
Code:
bool CvDiplomacyAI::IsGoodChoiceForDefensivePact(PlayerTypes ePlayer)
{
   // Do we already have a DP?
   if (GET_TEAM(GetPlayer()->getTeam()).IsHasDefensivePact(GET_PLAYER(ePlayer).getTeam()))
   {
       return false;
   }
   if (!GET_TEAM(GetPlayer()->getTeam()).isDefensivePactTradingAllowedWithTeam(GET_PLAYER(ePlayer).getTeam()) ||      // We have Tech & embassy to make a DP
       !GET_TEAM(GET_PLAYER(ePlayer).getTeam()).isDefensivePactTradingAllowed()) // They have Tech & embassy to make a DP
   {
       return false;
   }

   // Humans on our team?
   if (GetPlayer()->IsAITeammateOfHuman())
       return false;
  
   // Are we at war?
   if (GET_TEAM(GetPlayer()->getTeam()).isAtWar(GET_PLAYER(ePlayer).getTeam()))
       return false;
  
   // Did we just meet them? Let's not make a DP quite yet.
   if (IsTooEarlyForDoF(ePlayer))
       return false;

   //No DPs if last two!
   int iNumMajorsLeft = GC.getGame().countMajorCivsAlive();
   if (iNumMajorsLeft <= 2)
       return false;

   // If we're targeting them for a coop war, don't make a DP with them!
   if (GetGlobalCoopWarAgainstState(ePlayer) == COOP_WAR_STATE_SOON)
       return false;
  
   int iValue = 0;

   int iNumDPsAlreadyWanted = GetNumDefensivePactsWanted(ePlayer);
   int iLoyalty = GetPlayer()->GetDiplomacyAI()->GetLoyalty();
   int iNumCivs = 0;

   PlayerTypes eLoopTest;
   for (int iPlayerLoop2 = 0; iPlayerLoop2 < MAX_MAJOR_CIVS; iPlayerLoop2++)
   {
       eLoopTest = (PlayerTypes)iPlayerLoop2;
       if (IsPlayerValid(eLoopTest) && (eLoopTest != GetPlayer()->GetID()))
       {
           iNumCivs++;
       }
   }
   iLoyalty = ((iLoyalty * iNumCivs) / 40);
   if (iLoyalty <= 0)
   {
       iLoyalty = 1;
   }
  
   // Going for science victory? More DP willingness!
   if (GetPlayer()->GetCurrentEra() >= 3 && (IsGoingForSpaceshipVictory() || IsCloseToSSVictory()))
   {
       iLoyalty *= 2;
   }
  
#if defined(MOD_DIPLOMACY_CITYSTATES_RESOLUTIONS)
   //Increase this to encourage more DPs below.
   if (MOD_DIPLOMACY_CITYSTATES_RESOLUTIONS && GetPlayer()->GetDefensePactsToVotes() > 0)
   {
       iLoyalty *= iNumCivs;
   }
#endif

   //Capped?
   if (iLoyalty <= (GetNumDefensePacts() + iNumDPsAlreadyWanted))
       return false;

   iValue = GetDefensivePactValue(ePlayer);

   if (GetMostValuableDefensivePact(/*bIgnoreDPs*/ false) == ePlayer)
       iValue += 10;
   else if (GetMostValuableDefensivePact(/*bIgnoreDPs*/ true) == ePlayer)
       iValue += 3;

   if (iValue > 25)
   {
       return true;
   }
  
   return false;
}
#endif

Loyalty ranges between 1 and 10.
 
IMO limiting defensive pacts to 1 really removes a lot of the value of investing in diplomacy, particularly in games with many civs (e.g. larger maps). I think limiting them to 3 for example would be reasonable though.
Limiting them to 3 would change nothing. In fact based on what Recursive posted I highly suspect the limit is already at 2 or 3.

A single defensive pact can double or greater your military power when defending. That sounds like plenty of worth in diplomacy on that front. Freezing out warmongers entirely is a problem, and the goal is to get some AIs left on the fringes that can't get a DP so warmongers have some options. (Even if not the ones they want.)

I strongly suspect that part of the reason AI warmongers tend to flounder is defensive pacts, but I don't have the data for that.

So what is the current limit? Looks like it's calculated somewhere else.
 
Limiting them to 3 would change nothing. In fact based on what Recursive posted I highly suspect the limit is already at 2 or 3.

A single defensive pact can double or greater your military power when defending. That sounds like plenty of worth in diplomacy on that front. Freezing out warmongers entirely is a problem, and the goal is to get some AIs left on the fringes that can't get a DP so warmongers have some options. (Even if not the ones they want.)

I strongly suspect that part of the reason AI warmongers tend to flounder is defensive pacts, but I don't have the data for that.


So what is the current limit? Looks like it's calculated somewhere else.

Base limit = (Loyalty * # of players on other teams that are alive and have > 0 cities) / 40, minimum 1

If AI is in the Renaissance and is going for, or close to, a Science Victory, base limit is doubled.

No limit if AI has the ideology NW that grants extra WC votes from Defensive Pacts.
 
Base limit = (Loyalty * # of players on other teams that are alive and have > 0 cities) / 40, minimum 1

If AI is in the Renaissance and is going for, or close to, a Science Victory, base limit is doubled.

No limit if AI has the ideology NW that grants extra WC votes from Defensive Pacts.
That's pretty complicated. What is the normal cap?

Regardless however I think problems with defensive pacts come about when everyone gets too buddy buddy. I'd like to see a hard limit, that can be increased with a few exceptions.
 
That's pretty complicated. What is the normal cap?

Regardless however I think problems with defensive pacts come about when everyone gets too buddy buddy. I'd like to see a hard limit, that can be increased with a few exceptions.

With 8 civs on a standard map and an average loyalty of 5/10, the limit is 1 (or 2 if going for/close to science victory).

Base limit = 5 * 7 / 40 = 0.875 = 1

Higher map sizes or loyalty flavors result in more DPs, as does science victory pursuit.
 
So, I just realized that defensive pacts even completely ignores peace-treaties and how they prevent you from declaring war over all. So yeah.... seriously... even limiting defensive pacts to 1 per civ probably still leaves them way too good.
 
Am I the only one who almost never declares war on anyone and just waits for the AI to declare war on me/my DP partner? Or is it not viable in higher difficulties (Emperor+)?
 
It is. I don't declare wars if I play tall peaceful games.
I mean even in authority warmongering games. After conquering the neighbour I often get so strong that at least one person hates me, then I go conquer that one, and the cycle repeats until I take over the world.
 
Am I the only one who almost never declares war on anyone and just waits for the AI to declare war on me/my DP partner? Or is it not viable in higher difficulties (Emperor+)?
Same here. Yet I always somehow end up accidentally conquering half of the world :)

On emperor, but I have to confess, I toned down the war weariness and turned off the war fervor resistance or whatever the penalty on unit strength for warmongers is.
 
When I play wide I often declare wars myself, especially when other civs are too afraid to start a war with me.
 
Am I the only one who almost never declares war on anyone and just waits for the AI to declare war on me/my DP partner? Or is it not viable in higher difficulties (Emperor+)?
That's what I do as well, would I be doing it if I could possibly declare a war myself without DoWing half the civs in the game? Maybe?
Yeah there are definitely ways around DPs, but the fact that the most viable strategy is to cheese the DP is kinda another point in the 'DPs are OP'-camp.
 
I'm not really seeing a clear consensus on anything other than a general feeling that they're too OP - but I wonder about what the majority of players think, not just the experienced vocal minority on these forums.

The DP mechanics were designed by Firaxis. A few things are edited (like not receiving backstabbing penalties) but overall it's their design, including allowing them to break peace treaties.

I can implement a solution, but I'm not the best when it comes to finding solutions to balance issues...
 
I'm not really seeing a clear consensus on anything other than a general feeling that they're too OP - but I wonder about what the majority of players think, not just the experienced vocal minority on these forums.

The DP mechanics were designed by Firaxis. A few things are edited (like not receiving backstabbing penalties) but overall it's their design, including allowing them to break peace treaties.

I can implement a solution, but I'm not the best when it comes to finding solutions to balance issues...
The DP system barely worked in the original game though.
 
I'm not really seeing a clear consensus on anything other than a general feeling that they're too OP - but I wonder about what the majority of players think, not just the experienced vocal minority on these forums.

The DP mechanics were designed by Firaxis. A few things are edited (like not receiving backstabbing penalties) but overall it's their design, including allowing them to break peace treaties.

I can implement a solution, but I'm not the best when it comes to finding solutions to balance issues...
Want me to post a thread with a poll for greater visibility? I agree you're probably not getting a representative sample in this thread on page 19.
 
@Recursive There is one possibility. It is also how defense pacts usually worked historically in real life. It would also let to more sensible, consistent diplomacy and alliances. Make them specific to an enemy. I other words make them not general, triggered when anyone declares on one of them, but respective to and triggered only if their mutual enemy or power which they fear declares. It would be more the reversal of do you want to declare on someone. But I don't think it's possible to change so I don't dare to ask for it. Just reducing the number should suffice.
 
Top Bottom