132 lines
7 KiB
Text
132 lines
7 KiB
Text
In this folder, law groups and laws can be defined.
|
|
|
|
== Inheritance ==
|
|
Any heir that goes up one or more tier due to inheritance gets the laws of the dead ruler.
|
|
Note that currently the law conditions are not checked in any way for law inheritance.
|
|
|
|
== Structure ==
|
|
All script has the ruler as ROOT.
|
|
|
|
law_group_name = {
|
|
default = law_name # Optional. New rulers will by default use this law, as long as its "should_start_with" trigger returns true or is not defined
|
|
|
|
cumulative = yes # If set, each subsequent law in the group will provide all effects of the previous law
|
|
|
|
flag = some_arbitrary_flag # See below for flags treated specially. Also can check it in the data/GUI system with LawGroup.HasFlag('some_arbitrary_flag')
|
|
|
|
law_name = {
|
|
can_keep = { # Requirements for keeping the law in the ruler's scope. If this invalidates, the law will be replaced with the default law (see own section) within a month. Also checked after changing faith since doctrinal changes are likely to invalidate laws. Always true if not specified.
|
|
}
|
|
|
|
can_have = { # Requirements for adopting the law in the ruler's scope. If this is true, the character is allowed to adopt the law and the law will show as available (but it can be currantly disabled if can_pass is false). Always true if not specified.
|
|
}
|
|
|
|
can_pass = { # Requirements for adopting the law in the ruler's scope. For more temporary conditions, e.g. being at war ("I can have the law, but can't pass it right now"). Always true if not specified.
|
|
}
|
|
|
|
should_start_with = { # If these conditions are true, this is a valid law to start with. Note that it always includes the can_keep check.
|
|
}
|
|
|
|
can_title_have = { # Requirements for titles being able to have this law, in the title's scope. Always false if not specified
|
|
}
|
|
|
|
should_show_for_title = { # Should the law be shown in the UI for titles?
|
|
}
|
|
|
|
pass_cost = { gold/piety/prestige = ... } # Cost of enacting this law
|
|
|
|
revoke_cost = { gold/piety/prestige = ... } # Cost of revoking or clearing this law
|
|
|
|
modifier = { # Modifier applied to the ruler when this law is active
|
|
}
|
|
|
|
flag = some_arbitrary_flag # See below for flags treated specially. Also can be checked in script with has_realm_law_flag = some_arbitrary_flag
|
|
|
|
triggered_flag = { # Checks and adds flag only if the trigger's condition is met. Both trigger and flag *must* be specified within this block
|
|
trigger = { <trigger> } # Some trigger (has character scope)
|
|
flag = some_arbitrary_flag # See below for flags treated specially. Also can be checked in script with has_realm_law_flag = some_arbitrary_flag
|
|
}
|
|
|
|
on_pass = { # Effect run on ruler when the law is added. Does *NOT* get run when default laws are initialized, nor when inheriting a law from someone else. If this is done on a title, the title is accessible as scope:title
|
|
}
|
|
|
|
on_revoke = { # Effect run on ruler when the law is removed. Does *NOT* get run when law is removed due to inheriting a law from someone else. If this is done on a title, the title is accessible as scope:title
|
|
}
|
|
|
|
# Succession rules. Any new law with a rule set will override the previous law's rule.
|
|
# Overriding is in law definition order
|
|
succession = {
|
|
order_of_succession = inheritance/election/appointment/theocratic/company/generate/player_heir/noble_family
|
|
|
|
# For inheritance:
|
|
title_division = partition/single_heir # only "traversal_order = children" supports partition
|
|
|
|
traversal_order = children/dynasty_house/dynasty
|
|
|
|
rank = oldest/youngest
|
|
|
|
# For theocratic & company only:
|
|
pool_character_config = key # entry in common/pool_character_selectors, used when choosing a character from the pool or generating a new one
|
|
|
|
# For election only:
|
|
election_type = key # entry in common/succession_election
|
|
|
|
# For appointment only:
|
|
appointment_type = key # entry in common/succession_appointment
|
|
|
|
# Generic rules:
|
|
gender_law = male_only/male_preference/equal/female_preference/female_only
|
|
|
|
faith = same_faith/same_religion/same_family # Faith restrictions on who can inherit. If no one fulfilling this is found, the restriction is ignored (but titles with the flag destroy_if_invalid_heir = yes will be destroyed)
|
|
|
|
create_primary_tier_titles = yes # If set, then under partition all titles you can create of your primary tier will be created for free, resulting in a more split-up realm
|
|
|
|
primary_heir_minimum_share = 0.5 # The primary heir will get at least this portion of titles, which means if there's a lot of heirs the primary still gets a lot of land
|
|
|
|
exclude_rulers = yes # If set, the title can not be inherited by rulers (anyone with titles)
|
|
|
|
limit_to_courtiers = no # If set, only immediate courtiers and away courtiers of a ruler will be allowed to inherit
|
|
}
|
|
|
|
ai_will_do = { ... } # Script value in ruler scope. If above 0, the AI will enact this law if able. Law enactment is checked in the RARE_TASK_TICK. If multiple laws are possible, the AI will enact the one with the highest score
|
|
}
|
|
|
|
another_law_name = {}
|
|
}
|
|
|
|
== Default law ==
|
|
All rulers have a single law from each group.
|
|
If a group has a default set, that law will be checked first.
|
|
Otherwise, or if it is invalid, the laws are checked in definition order.
|
|
The first checked law where "should_start_with" returns true (or does not exist) gets used. Note that "can_pass" is ignored entirely.
|
|
When a default law is set, "on_pass" is *not* executed
|
|
|
|
== Title Succession Laws ==
|
|
Laws are usually defined for realm. However some succession laws are valid for only titles, or for both realms and titles:
|
|
Title only:
|
|
- order_of_succession = elective
|
|
Realm only:
|
|
- order_of_succession = theocratic/company
|
|
- order_of_succession = inheritance + title_division = partition
|
|
Realm & Title:
|
|
- order_of_succession = inheritance + title_division = single_heir
|
|
|
|
== Associated loc ==
|
|
The key of the law will be used as its name. E.G., law_name: "Law Name"
|
|
The key plus "_effects" can optionally be defined to provide custom effects. E.G., law_name_effects: "Does some law thingy"
|
|
The key plus "_effects_not_in_prev" can optionally be defined to provide custom effects that should *not* be included when listing effects inherited from earlier laws. E.G., law_name_effects_not_in_prev: "Does some law thingy"
|
|
|
|
CHARACTER.GetActiveLawInGroupWithFlag('realm_law') - Will get the character's active law in a group. The group must have the given flag. Note that it does not work for dead characters
|
|
|
|
== Hardcoded flags ==
|
|
Some flags have special meaning, and are used by the game code.
|
|
|
|
Law Groups:
|
|
flag = realm_law - Will show up in My Realm window
|
|
|
|
Laws:
|
|
flag = titles_cannot_leave_realm_on_succession - Disables titles leaving realm when received on succession by someone outside the realm - the respective heirs will be disqualified from succession
|
|
flag = men_can_have_multiple_spouses - Allows multiple spouses (if also allowed by faith)
|
|
flag = men_can_have_consorts - Allows consorts (if also allowed by faith)
|
|
flag = women_can_have_multiple_spouses - Allows multiple spouses (if also allowed by faith)
|
|
flag = women_can_have_consorts - Allows consorts (if also allowed by faith)
|