Oh, ok, so here is the corresponding code:
Code:
public override int GetInfluenceRequiredToOverrideKingdomDecision(
DecisionOutcome popularOption, DecisionOutcome overridingOption, KingdomDecision decision)
{
float totalSupportPoints1 = popularOption.TotalSupportPoints;
float totalSupportPoints2 = overridingOption.TotalSupportPoints;
float num1 = 0.0f;
if (decision.Kingdom.RulingClan == Clan.PlayerClan)
{
if ((double) totalSupportPoints1 == (double) totalSupportPoints2 + 1.0)
{
++totalSupportPoints2;
num1 += (float) decision.GetInfluenceCostOfSupport(Supporter.SupportWeights.SlightlyFavor);
}
else if ((double) totalSupportPoints1 == (double) totalSupportPoints2 + 2.0)
{
totalSupportPoints2 += 2f;
num1 += (float) decision.GetInfluenceCostOfSupport(Supporter.SupportWeights.StronglyFavor);
}
else if ((double) totalSupportPoints1 > (double) totalSupportPoints2 + 2.0)
{
totalSupportPoints2 += 3f;
num1 += (float) decision.GetInfluenceCostOfSupport(Supporter.SupportWeights.FullyPush);
}
}
if ((double) totalSupportPoints1 > (double) totalSupportPoints2)
{
float num2 = (totalSupportPoints1 - totalSupportPoints2) *
(float) decision.GetInfluenceCostOfSupport(Supporter.SupportWeights.FullyPush);
if (decision.Kingdom.ActivePolicies.Contains(DefaultPolicies.RoyalPrivilege))
num2 *= 0.8f;
if (decision.Kingdom.RulingClan != Clan.PlayerClan)
num2 *= 0.8f;
num1 += num2;
}
return (int) num1;
}
}
1) Royal Privilege is used while Peerage is not.
2) Now I understand the formula yet don't like it at all:
In Example #1, every 10 influence (SlightlyFavor for this voting) from a lord gives +1 to totalSupportPoints1, every 40 influence (StronglyFavor) gives +2, and every 100 influence (FullyPush) gives +3.
So we get 3 * 100 + 6 * 40 + 5 * 10 = 590 influence spent, which will convert to totalSupportPoints1 = 3 * 3 + 6 * 2 + 5 * 1 = 26 support points.
Since 26 > 0 + 2, we get totalSupportPoints2 = 3 and num1 = 100 (FullyPush). This represents you normal vote and till that moment everything is fine.
But next we multiply every support point by 100 (FullyPush, which for the lords was equivalent to 3 points) and apply RoyalPrivilege 0.8 coefficient, which results in 2400 influence cost.
TL;DR:
In other words, every 10 influence (SlightlyFavor) of a lord takes full 100 influence of a ruler to override, every 40 influence (StronglyFavor) takes 2*100 influence of a ruler to override, and every 100 influence (FullyPush) requires 3*100 to override.
I hope it's a bug, but not a game design.
My guess is that there was supposed to be:
float num2 = (totalSupportPoints1 - totalSupportPoints2) * (float) decision.GetInfluenceCostOfSupport(Supporter.SupportWeights.FullyPush) / 3f;