继承模组制作

本页面所适用的版本可能已经过时,最后更新于3.3.0


Succession type customization is very limited. Theoretically, you could use a 'vote' type succession without voters to choose a very specific heir. Handing out titles in a specific manner is not possible.[Needs verification]

Succession law format

Succession laws go in /common/laws.

succession_laws = {  # Must wrap in a succession laws block.

    <succession_name> = {
        # Modifiers applied to the ruler.
        child_opinion = 42

        potential = {
            # Conditions for the succession to be visible in the UI.
        }

        allow = {
            # Conditions that allow the succession to be implemented.
        }

        effect = {
            # What happens when the succession is implemented.
            succession = primogeniture         # Plain succession without voting.

            succession = {                     # The heir is selected by vote.
                base_type = <base_type_name>   # See "Base succession type" below
                voting_rules = <voting_rules>  # Defined in /common/succession_voting
            }

            # Dunno. Fix me!!
            elective_voting_rules = ???
        }

        revoke_allowed = {
            # ???
            always = no
        }
    }
}

Base succession type

All succession types must use a hard-coded 'base type', which determines who the heirs are, if there are voters, and what titles the heirs receive upon death of the current ruler.

Name Description
gavelkind The titles of the ruler are divided among his children, with the oldest getting the primary title. If the ruler has no children who can inherit, the law defaults to Primogeniture. You get no Prestige penalty for having unlanded sons, and can have a 30% larger demesne. Gavelkind is a very popular law with everyone except the oldest child. Destruction of titles while under Gavelkind succession is not allowed.;
elective_gavelkind Elective. Titles are divided up amongst the ruler's children, with the elected heir getting the primary title.
tanistry Elective. The ruler and all vassals at one and two ranks below can nominate an heir - the Tanist - from among the members of the ruler's dynasty. Vassals will tend to favor older members from other branches of the family, especially claimants.
feudal_elective Elective. All titles go to the elected heir.
seniority All titles go to the oldest living member of the ruling dynasty.
primogeniture All titles go to the oldest child of the ruler.
ultimogeniture All titles go to the youngest child of the ruler.
turkish_succession The most powerful child of the ruler succeeds, though other influential children are likely to intervene... The law is very popular with your offspring, with the exception of the oldest one. The rest of your dynasty also approves. This succession is likely the one used by Iqta governments.[Needs verification]
papal_succession Elective. The Pope is elected by the College of Cardinals depending on age, piety, popularity and other factors.
appointment On death, all titles revert back to the liege. The succession of duchy and kingdom viceroyalties.
open_elective Elective. All vassals and courtiers get a vote and decide on a successor from among themselves.
catholic_bishopric If the liege lord has nominated a successor, he succeeds. Otherwise, the Papal Candidate is chosen.
patrician_elective Elective. This is the succession type in the great naval Merchant Republics. The next Doge is determined from among the heads of the five grand Patrician families depending on Age, Prestige, and invested Campaign Funds.
nomad_succession Under Nomad Succession, the son or brother with the most Prestige normally inherits, but prestigious Clan leaders also stand a chance if their Population is bigger than the Khagan's. Wrong-culture characters are disqualified and adults have precedence over children. If the Khagan's primary heir is still a child, the Khaganate is lost to one of the Clan chiefs. Clan chiefs with more Prestige than the heir get Claims on the Khaganate.
offmap_succession This succession type generates a character of China's culture and religion. They have decent (4-10) stats, and good (7-11) stewardship, and will always have a Stewardship education. The offmap power defined in the top liege's government is used to determine the culture and religion. Will not function if this isn't defined

Succession voting

Succession voting scripts go in /common/succession_voting.

<succession_voting_name> = {

    # ROOT is the potential elector, FROMFROM is the title.
    elector_selection = {      # Determine who is allowed to vote.

        days = -5              # This has nothing to do with days. This is the current character's score.
                               # A positive score means they are allowed to vote, and a negative score means
                               # they are not. This line by itself means no-one is allowed to vote.

        additive_modifier = {
            value = 10         # Add 10 score if ...
            FROMFROM = {       # this character is the current ruler.
                holder_scope = {
                    character = ROOT
                }
            }
        }
    }

    # ROOT is the elector, FROMFROM is the title.
    elector_vote_strength = {  # Determine how many votes electors get.

        days = 1               # This has nothing to do with days. This is the number of votes the elector gets.
    }

    # ROOT is the title holder, FROM is the potential candidate, FROMROM is the title.
    candidate_trigger = {      # Determines who can be voted for.

        dynasty = FROM         # This character is a valid candidate if they are of the same dynasty as the ruler (includes the ruler).
    }

    # ROOT is the elector, FROM is the candidate.
    candidate_vote_score = {   # Determines the score an elector will assign to a candidate.
                               # The candidate with the highest score will recieve the elector's votes.

        days = 0               # Yes, days means score again.

        additive_modifier = {  # Add or subtract score in additive_modifiers.
            value = 999
            localisation_key = tooltip_feudal_elector_vote_myself  # Text that will appear in the UI related to elections.
            character = FROM   # If we are the candidate, vote for ourself!
        }
    }
}

Localisation

Standard localisation rules apply.

<succession_name> for the name, <succession_name>_desc for the description.