violent assault on admin

This commit is contained in:
Magpie490 2025-02-18 22:43:49 +00:00
parent e36f3835ea
commit 8f04b459c7
20 changed files with 6989 additions and 0 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,232 @@
title_succession_laws = {
#Default Feudal Elective
feudal_elective_succession_law = {
can_have = {
government_has_flag = government_is_feudal
highest_held_title_tier >= tier_duchy
NOR = { #Cultures have their special flavor.
culture = { has_cultural_parameter = witenagemot_succession_enabled }
culture = { has_cultural_parameter = scandinavian_elective_enabled }
culture = { has_cultural_parameter = tribal_elective_enabled } #FP3 addition
}
}
can_pass = {
can_change_title_law_trigger = yes
}
can_title_have = {
can_title_have_law_general_trigger = yes
}
succession = {
order_of_succession = election
election_type = feudal_elective
}
flag = elective_succession_law
title_allegiance_opinion = 10
revoke_cost = {
prestige = change_title_succession_law_prestige_cost
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
}
}
#HRE Succession
princely_elective_succession_law = {
can_have = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
}
highest_held_title_tier = tier_empire
}
can_pass = {
can_change_title_law_trigger = yes
}
can_title_have = {
this = title:e_hre
can_title_have_law_general_trigger = yes
}
succession = {
order_of_succession = election
election_type = princely_elective
}
flag = elective_succession_law
title_allegiance_opinion = 10
modifier = {
vassal_limit = 20
minority_opinion = -15
}
revoke_cost = {
prestige = change_hre_title_succession_law_prestige_cost
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
}
}
#Witenagemot
saxon_elective_succession_law = {
can_have = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
government_has_flag = government_is_tribal
}
highest_held_title_tier >= tier_kingdom
}
can_pass = {
can_change_title_law_trigger = yes
culture = { has_cultural_parameter = witenagemot_succession_enabled }
}
can_title_have = {
can_title_have_law_general_trigger = yes
}
succession = {
order_of_succession = election
election_type = saxon_elective
}
flag = elective_succession_law
title_allegiance_opinion = 5
revoke_cost = {
prestige = change_title_succession_law_prestige_cost
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
}
}
#Thing
scandinavian_elective_succession_law = {
can_have = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
government_has_flag = government_is_tribal
}
highest_held_title_tier >= tier_duchy
}
can_pass = {
can_change_title_law_trigger = yes
culture = { has_cultural_parameter = scandinavian_elective_enabled }
}
can_title_have = {
can_title_have_law_general_trigger = yes
}
succession = {
order_of_succession = election
election_type = scandinavian_elective
}
flag = elective_succession_law
title_allegiance_opinion = 5
revoke_cost = {
prestige = change_title_succession_law_prestige_cost
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
}
}
#Tanistry
gaelic_elective_succession_law = {
can_have = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
government_has_flag = government_is_tribal
}
highest_held_title_tier >= tier_duchy
}
can_pass = {
can_change_title_law_trigger = yes
custom_description = {
OR = {
culture = { has_cultural_pillar = heritage_brythonic }
culture = { has_cultural_pillar = heritage_goidelic }
}
text = succession_laws_must_have_valid_tanistry_culture
}
}
can_title_have = {
can_title_have_law_general_trigger = yes
}
succession = {
order_of_succession = election
election_type = gaelic_elective
}
flag = elective_succession_law
title_allegiance_opinion = 5
revoke_cost = {
prestige = change_title_succession_law_prestige_cost
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
}
}
#Jirga elective
tribal_elective_succession_law = { #FOR FP3
can_have = {
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
government_has_flag = government_is_tribal
}
highest_held_title_tier >= tier_kingdom
}
can_pass = {
can_change_title_law_trigger = yes
culture = { has_cultural_parameter = tribal_elective_enabled }
}
can_title_have = {
can_title_have_law_general_trigger = yes
}
succession = {
order_of_succession = election
election_type = tribal_elective
}
flag = elective_succession_law
title_allegiance_opinion = 5
revoke_cost = {
prestige = change_title_succession_law_prestige_cost
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
}
}
#Player Heir
temporal_head_of_faith_succession_law = {
can_title_have = {
is_temporal_head_of_faith_trigger = yes
}
should_show_for_title = { # Never show this in the UI, just apply it through script
always = no
}
can_remove_from_title = {
custom_description = {
text = succession_laws_must_not_be_temporal
is_temporal_head_of_faith_trigger = no
}
}
succession = {
order_of_succession = player_heir
}
}
#Noble Family Succession
noble_family_succession_law = {
can_title_have = {
is_noble_family_title = yes
}
should_show_for_title = { # Never show this in the UI, just apply it through script
always = no
}
can_remove_from_title = {
always = no
}
succession = {
order_of_succession = noble_family
}
flag = can_designate_heirs
}
}

View file

@ -0,0 +1,463 @@
#####################
# ADMINISTRATIVE LAWS
#####################
@admin_law_cooldown_value = 5
province_war_law = {
default = province_war_law_0
cumulative = yes
flag = admin_law
province_war_law_0 = {
modifier = {
}
flag = uses_imperial_bureaucracy
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_war_law_0 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_war_law_0 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
}
province_war_law_1 = {
modifier = {
}
flag = uses_imperial_bureaucracy
flag = admin_vassal_wars_restricted
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = have_bureaucracy_1_or_higher
OR = {
has_realm_law = imperial_bureaucracy_1
has_realm_law = imperial_bureaucracy_2
has_realm_law = imperial_bureaucracy_3
}
}
}
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_war_law_1 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = admin_law_cooldown_desc
NOT = { has_variable = admin_law_cooldown }
}
}
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_war_law_1 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
pass_cost = {
prestige = {
add = admin_law_prestige_cost
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
ai_will_do = {
if = {
limit = {
ai_has_warlike_personality = yes
}
value = 1
}
if = {
limit = {
has_realm_law = province_war_law_0
ai_has_economical_boom_personality = yes
}
value = 1
}
}
}
province_war_law_2 = {
modifier = {
}
flag = uses_imperial_bureaucracy
flag = admin_vassal_wars_permission_only
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = have_bureaucracy_2_or_higher
OR = {
has_realm_law = imperial_bureaucracy_2
has_realm_law = imperial_bureaucracy_3
}
}
}
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_war_law_2 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = admin_law_cooldown_desc
NOT = { has_variable = admin_law_cooldown }
}
}
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_war_law_2 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
pass_cost = {
prestige = {
add = admin_law_prestige_cost
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
ai_will_do = {
if = {
limit = {
has_realm_law = province_war_law_1
ai_has_economical_boom_personality = yes
}
value = 1
}
}
}
province_war_law_3 = {
modifier = {
}
flag = uses_imperial_bureaucracy
flag = admin_vassal_wars_banned
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = have_bureaucracy_3
has_realm_law = imperial_bureaucracy_3
}
}
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_war_law_3 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = admin_law_cooldown_desc
NOT = { has_variable = admin_law_cooldown }
}
}
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_war_law_3 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
pass_cost = {
prestige = {
add = admin_law_prestige_cost
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
ai_will_do = {
value = 0
}
}
}
province_border_law = {
default = province_border_law_0
cumulative = no
flag = admin_law
province_border_law_0 = {
modifier = {
}
flag = uses_imperial_bureaucracy
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_border_law_0 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_border_law_0 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
ai_will_do = {
value = 1
}
}
province_border_law_1 = {
modifier = {
administrative_government_vassal_opinion = -5
}
flag = uses_imperial_bureaucracy
flag = admin_vassal_border_restricted
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = have_bureaucracy_2_or_higher
OR = {
has_realm_law = imperial_bureaucracy_2
has_realm_law = imperial_bureaucracy_3
}
}
}
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_border_law_1 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = admin_law_cooldown_desc
NOT = { has_variable = admin_law_cooldown }
}
}
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_border_law_1 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
pass_cost = {
prestige = {
add = admin_law_prestige_cost
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
ai_will_do = {
value = 0
if = {
limit = {
OR = {
ai_has_cautious_personality = yes
ai_has_economical_boom_personality = yes
}
}
add = 2
}
}
}
province_border_law_2 = {
modifier = {
administrative_government_vassal_opinion = -10
}
flag = uses_imperial_bureaucracy
flag = admin_vassal_border_limit
can_keep = {
realm_law_use_imperial_bureaucracy = yes
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = have_bureaucracy_3
has_realm_law = imperial_bureaucracy_3
}
}
trigger_if = {
limit = {
is_independent_ruler = no
}
liege = { has_realm_law = province_border_law_2 }
}
}
can_pass = {
trigger_if = {
limit = {
is_independent_ruler = yes
}
custom_tooltip = {
text = admin_law_cooldown_desc
NOT = { has_variable = admin_law_cooldown }
}
}
trigger_if = {
limit = {
is_independent_ruler = no
liege = { has_realm_law = province_border_law_2 }
}
custom_tooltip = {
text = imperial_bureaucracy_pending_law_change
always = no
}
}
}
pass_cost = {
prestige = {
add = admin_law_prestige_cost
}
}
on_pass = {
## Set cooldown
set_variable = {
name = admin_law_cooldown
years = @admin_law_cooldown_value
}
}
ai_will_do = {
value = 0
}
}
}

132
common/laws/_laws.info Normal file
View file

@ -0,0 +1,132 @@
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)