Resolved Peerage not working and override influence costs are incorrect

Users who are viewing this thread

Version number
e1.5.5
Branch
Beta
Modded/unmodded
No, I didn't use any mods.
Summary: Influence cost calculation for ruler decisions is incorrect and Peerage policy has no effect.
Update: see next message for better description.

How to Reproduce: My game was started in e1.5.2, but works for a fresh e1.5.5 game as well.
Become a faction ruler, vote for something unpopular, reload, get Peerage, vote again to see almost no difference, denounce Peerage, vote again.

Media (Screenshots & Video):
After the death of Derthert I became a ruler of already established and developed Vlandia (43 towns/castles, 17 clans).
Active policies are: Peerage, Feudal Inheritance, Castle Charters, Noble Retinues, Marshals, Senate, Hunting Rights, Sacred Majesty.

Example #1, declare a war (0% support):
Tier 4+ clans against: 3*100 + 5*40 + 3*10 = 530
Tier 3 clans against: 1*40 + 2*10 = 60
If the votes of 4+ have double effect it should be 2*530 + 60 = 1120
If the ruler cost for overriding popular decision is doubled, it should be 2*1120 = 2240.
For me the cost is 2400, which is close to what expected.


Example #2, disavow Peerage (0% support):
Tier 4+ clans against: 3*40 + 8*10 = 200
Tier 3 clans: 3*10 = 30
With multipliers it should be 2*200 + 30 = 430.
If the cost is double: 2*430 = 860.
But the cost to denounce is 1500.


Example #3, declare a war after denouncing Peerage:
No difference with example #1 (one 40 switched to 10 and the sum changed from 2400 to 2300).
 
Last edited:
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;
 
Last edited:
Great work! Forwarded to the QA team for further investigation. We will reach out again if we need more information. Thanks for reporting and sorry for any inconvenience!
 
Back
Top Bottom