Skip to content

Kingdoms

Notes

Kingdom can exist without owning a Town. Castle is enough. (It was stated somewhere otherwise)

With the existing Culture to create a Kingdom it is necessary to have:

  • Castle or Town
  • 1 Clan - the owner of the Castle/Town
  • 1 Lord - the owner of the Clan/Kingdom

XML info on relations here.

Not necessary:

  • Spouse
  • Dead lords

All Kingdoms

foreach (Kingdom kingdom in Kingdom.All) { // do smthg }

Strength

float       TotalStrength [get]

Policies

Can be set in spkingdoms.xml

<policies>
    <policy     id="policy_royal_guard" />
</policies>

Full list here

In the code:

public class DefaultPolicies

LandTax
StateMonopolies
SacredMajesty
Magistrates
DebasementOfTheCurrency
PrecarialLandTenure
CrownDuty
ImperialTowns
RoyalCommissions
RoyalGuard
WarTax
RoyalPrivilege
Senate
LordsPrivyCouncil
MilitaryCoronae
FeudalInheritance
Serfdom
NobleRetinues
CastleCharters
Bailiffs
HuntingRights
RoadTolls
Marshals
CouncilOfTheCommons
ForgivenessOfDebts
Citizenship
TribunesOfThePeople
GrazingRights
Lawspeakers
TrialByJury
Cantons

Add a policy:

kingdom.AddPolicy(DefaultPolicies.RoyalGuard);

Remove a policy:

kingdom.RemovePolicy(DefaultPolicies.RoyalGuard);

Check if kingdom has policy

if (kingdom.HasPolicy((DefaultPolicies.RoyalGuard) {}
if (Kingdom.ActivePolicies.Contains(DefaultPolicies.CastleCharters))) {}

Find a Kingdom

public static Kingdom FindKingdomByStringID(string stringID)
{
    foreach (Kingdom kingdom in Kingdom.All)
    {
        if (kingdom.StringId == stringID)
        {
            return kingdom;
        }
    }
    return null;
}