In Progress Multiple DefaultSettlementTaxModel.cs bugs

Users who are viewing this thread

Version number
1.2.11
Branch
Main
Modded/unmodded
No, I didn't use any mods.

Leonion

Master Knight
Code:
private void CalculatePolicyGoldCut(Town town, float rawTax, ref ExplainedNumber explainedNumber)
        {
            if (town.MapFaction.IsKingdomFaction)
            {
                Kingdom kingdom = (Kingdom)town.MapFaction;
                if (kingdom.ActivePolicies.Contains(DefaultPolicies.Magistrates))
                {
                    explainedNumber.Add(-0.05f * rawTax, DefaultPolicies.Magistrates.Name, null);
                }
                if (kingdom.ActivePolicies.Contains(DefaultPolicies.Cantons))
                {
                    explainedNumber.Add(-0.1f * rawTax, DefaultPolicies.Cantons.Name, null);
                }
                if (kingdom.ActivePolicies.Contains(DefaultPolicies.Bailiffs))
                {
                    explainedNumber.Add(-0.05f * rawTax, DefaultPolicies.Bailiffs.Name, null);
                }
                if (kingdom.ActivePolicies.Contains(DefaultPolicies.TribunesOfThePeople))
                {
                    explainedNumber.Add(-0.05f * rawTax, DefaultPolicies.TribunesOfThePeople.Name, null);
                }
            }
        }
1) Bailiffs kingdom policy claims that it only affects taxes from towns, but de facto it affects taxes from castles as well (there is no IsTown check in the code).
2) Magistrates kingdom policy claims that it only affects taxes from towns, but de facto it affects taxes from castles as well.
3) Tribunes of the people kingdom policy claims that it only affects taxes from ruler's (monarch?) towns, but de facto it affects taxes from castles as well, including castles owned by non-monarch clans.

Code:
if (town.IsTown)
            {
                if (PerkHelper.GetPerkValueForTown(DefaultPerks.Scouting.DesertBorn, town))
                {
                    PerkHelper.AddPerkBonusForTown(DefaultPerks.Scouting.DesertBorn, town, ref result);
                }
                if (town.Governor != null && town.Governor.GetPerkValue(DefaultPerks.Steward.PriceOfLoyalty))
                {
                    int num = town.Governor.GetSkillValue(DefaultSkills.Steward) - Campaign.Current.Models.CharacterDevelopmentModel.MinSkillRequiredForEpicPerkBonus;
                    result.AddFactor(DefaultPerks.Steward.PriceOfLoyalty.SecondaryBonus * (float)num, DefaultPerks.Steward.PriceOfLoyalty.Name);
                }
            }
4) Desert Born Scouting 75 perk doesn specify which taxes it affects (so should affect all taxes) but de facto only affects taxes from towns, not castles
4) Price of Loyalty Steward 275 perk doesn't specify which taxes it affects (so should affect all taxes) but de facto only affects taxes from towns, not castles
FzjKFux.png
 
The issue you have reported has been forwarded to our QA team for further investigation. We might need additional information regarding this issue, such as screenshots or videos, save files or dump reports. Thanks for reporting and sorry for any inconvenience!
 
Back
Top Bottom