What's the problem with diplomatic victory

I am still waiting for the Mother of all Complaint Threads - "I had to attack a CS-gifted MoV to prevent a diplomatic victory, and now I'm labeled a warmonger!"
 
This is indeed a good point, and made me search inside the code, and unless I am missing something, there might be a pseudo-bug related to this:

Code:
////////////////////////////////////
	// DIPLO GRAND STRATEGY
	////////////////////////////////////

	if(IsGoingForDiploVictory())
	{
		viApproachWeights[MINOR_CIV_APPROACH_CONQUEST] += /*-20*/ GC.getMINOR_APPROACH_WAR_DIPLO_GRAND_STRATEGY();
		viApproachWeights[MINOR_CIV_APPROACH_IGNORE] += /*-15*/ GC.getMINOR_APPROACH_IGNORE_DIPLO_GRAND_STRATEGY();
		viApproachWeights[MINOR_CIV_APPROACH_BULLY] += -15; //antonjs: todo: constant/XML

		// Neighbors and Close: +5 to Protective
		if(GetPlayer()->GetProximityToPlayer(ePlayer) >= PLAYER_PROXIMITY_CLOSE)
			viApproachWeights[MINOR_CIV_APPROACH_PROTECTIVE] += /*5*/ GC.getMINOR_APPROACH_PROTECTIVE_DIPLO_GRAND_STRATEGY_NEIGHBORS();
	}

Here the Diplo AI modifies the weights for different approaches to each Minor civ (CS) according to their grand strategy; if it is going for diplo, it decreases the weights (likelihood) of CONQUEST,IGNORE and BULLY, and if the CS is a neighbour, increases the weight of PROTECTIVE.


Now:

Code:
// Calculate desirability to give this minor gold
			if(bWantsToMakeGoldGift && !bWantsToBuyoutThisMinor)
			{
				int iValue = /*100*/ GC.getMC_GIFT_WEIGHT_THRESHOLD();
				// If we're not protective or friendly, then don't bother with minor diplo
				if(eApproach == MINOR_CIV_APPROACH_PROTECTIVE || eApproach == MINOR_CIV_APPROACH_FRIENDLY)
				{
......

// Diplo victory makes us more likely to spend gold
					if(IsGoingForDiploVictory())
						iValue += /*100*/ GC.getMC_GIFT_WEIGHT_DIPLO_VICTORY();
					// double up if this is the home stretch
					if(GC.getGame().IsUnitedNationsActive())
					{
						iValue += /*100*/ GC.getMC_GIFT_WEIGHT_DIPLO_VICTORY();
					}

Later in the same file, the diplo AI processes the "use money gift" logic for each CS; the IF condition is troublesome (and reflected by the comment). The Diplo AI will only process the money gift logic if its approach to the specific CS is either FRIENDLY or PROTECTIVE; there is no other provision. The test for the AI going for diplo victory is INSIDE the initial IF condition, meaning that it is considered ONLY if the approach to the CS is either FRIENDLY or PROTECTIVE.

Now, couple both code snippets together, and you can see that the end result of this logic is that the AI will only consider neighbours as potential customers for the diplo victory, or some other CS that have been tagged with the FRIENDLY approach by some other reasons and not by the going for diplo victory logic. A human approach is "buy whatever CS is cheaper to buy and easier to sustain until vote for diplo, regardless of proximity or even protection".

That's why it is too easy for us right now.

That looks like a faulty (maybe "incomplete" is a better word) logic, a pseudo bug.

Yeah, using the Human approach would be better for a Diplo victory AI (ie Diplo Victory + UN ready increases likelyhood to spend gold on a CS.. so does Friendly/Protected.. and then likelihood is also increased by "cheapness" ie low influence needed to reach ally status with a bonus for discounts)
(also using a Human approach for a "Diplo spoiler"... ie when the UN is active.. increased chance to either Conquer OR Buy CS that are allies of a delegate leader ..prioritizing the buy on the one(s) that is/are cheapest for me to steal from them.)
 
Top Bottom