Skip to content

Commit

Permalink
Setup succession laws (#2453)
Browse files Browse the repository at this point in the history
Co-authored-by: IhateTrains <[email protected]>
  • Loading branch information
tanner918 and IhateTrains authored Jan 21, 2025
1 parent 5c9786d commit da36649
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 23 deletions.
18 changes: 13 additions & 5 deletions ImperatorToCK3/Data_Files/configurables/government_map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
# ck3 = CK3 government ID
# ir = Imperator government ID
# irCulture = Imperator culture ID (optional)
# has_ck3_dlc = CK3 DLC ID (optional, supported IDs: roads_to_power)
# has_ck3_dlc = CK3 DLC ID (optional; supported IDs: roads_to_power)
# ck3_title_rank = CK3 title rank tag is converted to (optional; allows b,c,d,k,e)
#}
# multiple entries allowed for: ir, irCulture, has_ck3_dlc
# multiple entries not allowed for: ck3

# NOTE: ck3_title_rank allows all possible rankings in one entry. So for example, ck3_title_rank = ke will work for kingdoms and empires

## Cultural Mappings
# Chinese, for some regional variety, and because I think it makes sense ~~tanner918
## Need to think about what to do for the Chinese Imperial tags. Like if a tag with one of these cultures has imperium or imperial_cult government. Should that be used in place of the "Mandate of Heaven" mapping below (if I ever get to that) or should they still be mapped to chinese_government since they aren't "proclaiming the mandate of heaven" in the campaigns "LORE". For now will let that map to admistrative below since they are supposed to be rare government forms
# RoA Chinese, for some regional variety, and because I think it makes sense ~~tanner918
link = { ck3 = chinese_government
ir = dictatorship
ir = despotic_monarchy
Expand Down Expand Up @@ -49,6 +51,7 @@ link = { ck3 = theocracy_government
}
link = { ck3 = administrative_government
has_ck3_dlc = roads_to_power
ck3_title_rank = e # limiting rank to empires for now since kingdom-level admin realms have a few issues at the moment that need to be looked at
ir = imperium
ir = imperial_cult
}
Expand Down Expand Up @@ -83,19 +86,24 @@ link = { ck3 = feudal_government ir = rhodian_dictatorship }

link = { ck3 = feudal_government ir = samaritan_judgedom } # This government is defined in the files, but doesn't seem to actually get used anywhere, so it seems impossible to actually get, but will map just in case ~~tanner918

link = { ck3 = administrative_government ir = chinese_empire has_ck3_dlc = roads_to_power } # This government seems like it represents the Mandate of Heaven. In RoA, that is just represented by whoever owns e_celestia_china and they use the administrative_government for now, though they might make a new government for China. chinese_empire Description: "As shown by the reigns of the Shang and Zhou Dynasties, in which the divine authority of the Emperor was demonstrated for all under Heaven to see, the Imperial Form of government remains the supreme achievement of political life, all but ensuring peace and prosperity for conscientious stewards of the Mandate of Heaven." ~~tanner918
link = { ck3 = chinese_government ir = chinese_empire }
link = { ck3 = administrative_government ir = chinese_empire has_ck3_dlc = roads_to_power ck3_title_rank = e } # This government seems like it represents the Mandate of Heaven. In RoA, that is just represented by whoever owns e_celestia_china and they use the administrative_government for now, though they might make a new government for China. chinese_empire Description: "As shown by the reigns of the Shang and Zhou Dynasties, in which the divine authority of the Emperor was demonstrated for all under Heaven to see, the Imperial Form of government remains the supreme achievement of political life, all but ensuring peace and prosperity for conscientious stewards of the Mandate of Heaven." ~~tanner918
link = { ck3 = chinese_government ir = chinese_empire } # RoA
link = { ck3 = feudal_government ir = chinese_empire } # Fallback

link = { ck3 = feudal_government ir = yamato_empire } # Might change this to administrative, need to see the exact requirements to get this to decide ~~tanner918

link = { ck3 = chinese_government ir = enfeoffment_zhourites } # For now will map to RoA chinese_government, but might change if I determine another mapping is better. Description: "The system of governance created by our predecessors in the Shang Dynasty remains a viable way of ruling the people to this very day. By creating a vast, decentralized bureaucratic state, in which lands and authority are meted out to powerful vassals in return for oaths of submission, true peace can be secured." ~~tanner918
link = { ck3 = feudal_government ir = enfeoffment_zhourites } # Fallback

link = { ck3 = chinese_government ir = chinese_duhufu } # For now will map to RoA chinese_government, but might change if I determine another mapping is better. Description: "In order to properly adminster the hinterlands, special types of administrative districts known as 'Duhufu' are established as ways to entrench the Imperial power in the lands that are distant from our capital. The governor of a Duhufu has unquestioned military and economic authority, carrying out the commands of their superiors with one voice." ~~tanner918
link = { ck3 = feudal_government ir = chinese_duhufu } # Fallback

link = { ck3 = nomadic_government ir = steppe_horde }
link = { ck3 = tribal_government ir = steppe_horde } # Fallback

link = { ck3 = feudal_government ir = pirate_kingdom } # No description but seems to be a reward for missions for realms that have Duuchuu as their primary culture, it is called a "Piratical Monarchy" so will just map to feudal for now ~~tanner918

link = { ck3 = republic_government ir = punic_republic }

link = { ck3 = nomadic_government ir = steppe_empire } # Might change this to administrative, need to see the exact requirements to get this to decide ~~tanner918
link = { ck3 = tribal_government ir = steppe_empire } # Fallback
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ heritage_goidelic = e_britannia
heritage_romano_british = e_britannia
heritage_frankish = e_france
heritage_latin = e_italy
heritage_venetic = e_italy
heritage_italic = e_italy
heritage_north_germanic = e_scandinavia
heritage_north_germanic = e_germany
heritage_east_germanic = e_germany
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,6 @@ imperator_invictus = {
link = { imp = 9107 imp = 9108 imp = 9109 ck3 = 7223 } # Oirpata, Opoin, Oitosyros -> Kyz Imchik
link = { imp = 8942 ck3 = 7224 } # Kamekol -> Jaksybai
link = { imp = 8941 ck3 = 7222 } # Chokun -> Taisugan
link = { imp = 5971 ck3 = 616 } # Even More Steppes Impassable -> Pecheneg
link = { imp = 9089 imp = 9090 imp = 9095 imp = 9098 imp = 8952 imp = 8948 imp = 8945 imp = 8949 imp = 8950 imp = 8951 imp = 8955 imp = 8954 imp = 8953 imp = 8958 imp = 8957 ck3 = 5513 } # Api, Tabiti, Tavah, Datah, Burli, Kazanka, Ardembey, Dymar, Sasyktau, Zhanashu, Sapargali, Sapak, Nausha, Sasan, Kokkamys -> Ryn Desert
link = { imp = 9091 imp = 9094 imp = 9092 ck3 = 617 } # Xsay, Arya, Airma -> Uzens
link = { imp = 9093 ck3 = 608 } # Wantah -> Ukek
Expand Down Expand Up @@ -3829,7 +3828,7 @@ imperator_invictus = {
link = { imp = 3498 imp = 3502 imp = 5055 ck3 = 2663 } # Makopsis, Lesa, IMPASSIBLE TERRAIN 055 -> ARDARA
link = { imp = 3491 imp = 3495 ck3 = 2661 } # Lacon, Hydata -> ISILI
link = { imp = 3504 imp = 3506 imp = 3505 ck3 = 2658 } # Phausiane, Longones, Tibula -> OLBIA
link = { imp = 3489 imp = 3503 ck3 = 2657 } # Kares, Thorp� -> GALTELLI
link = { imp = 3489 imp = 3503 ck3 = 2657 } # Kares, Thorp� -> GALTELLI
link = { imp = 3488 ck3 = 2656 } # Sulki Tyrsen -> TORTOLI
link = { imp = 3499 imp = 3500 ck3 = 2664 } # Nure, Libisonis -> PORTO TORRES
link = { imp = 3494 imp = 3497 ck3 = 2665 } # Sanaphar, Carbia -> ALGHERO
Expand Down Expand Up @@ -5133,7 +5132,7 @@ imperator_invictus = {
link = { autogenerated = yes imp = 9357 ck3 = 5170 } # Jarvi -> Toropets
link = { autogenerated = yes imp = 9354 ck3 = 5222 } # Mukka -> Velizh
link = { autogenerated = yes imp = 9331 ck3 = 5386 ck3 = 5360 } # Udoma -> Vorona, Morchansk
link = { autogenerated = yes imp = 9310 ck3 = 5503 } # Kodzuv -> Kamelik
link = { autogenerated = yes imp = 9310 ck3 = 5503 ck3 = 616 } # Kodzuv -> Kamelik, Pecheneg
link = { autogenerated = yes imp = 9300 ck3 = 5499 } # Ipasyam -> Orskaya
link = { autogenerated = yes imp = 9259 imp = 9260 imp = 9262 imp = 9263 imp = 9264 imp = 9266 imp = 6058 imp = 7286 ck3 = 1178 } # Yazman, Marot, Patan Minara, Inayati, Chishtian, Anupgarh, Abhiria Secunda, Impassable -> Karur
link = { autogenerated = yes imp = 9256 imp = 7289 ck3 = 911 } # Rajgangpur, Impassable -> Ratu
Expand Down Expand Up @@ -5193,12 +5192,12 @@ imperator_invictus = {
link = { autogenerated = yes imp = 5699 imp = 5712 ck3 = 967 } # Mare Britannicum, Mare Verginium -> English Channel
link = { autogenerated = yes imp = 5705 imp = 5706 ck3 = 966 } # Mare Britannicum, Mare Britannicum -> English Channel
link = { autogenerated = yes imp = 5710 ck3 = 965 } # Fretum Gallicum -> Strait of Dover
link = { autogenerated = yes imp = 6351 ck3 = 963 } # LAKE -> V�nern
link = { autogenerated = yes imp = 6349 ck3 = 962 } # LAKE -> V�ttern
link = { autogenerated = yes imp = 6351 ck3 = 963 } # LAKE -> V�nern
link = { autogenerated = yes imp = 6349 ck3 = 962 } # LAKE -> V�ttern
link = { autogenerated = yes imp = 6741 ck3 = 9608 ck3 = 9607 } # Yutian -> Dondan_Oilik, Lafak
link = { autogenerated = yes imp = 6750 ck3 = 9603 } # Iuwo -> Endere
link = { autogenerated = yes imp = 6752 imp = 8764 ck3 = 9602 } # Endere, Xiaowan -> Saca
link = { autogenerated = yes imp = 6347 ck3 = 959 } # LAKE -> M�laren
link = { autogenerated = yes imp = 6347 ck3 = 959 } # LAKE -> M�laren
link = { autogenerated = yes imp = 2730 ck3 = 954 } # Fretum Gaditanum -> Strait of Gibraltar
link = { autogenerated = yes imp = 4614 imp = 4590 imp = 6506 ck3 = 953 } # Oceanus Atlanticus, Oceanus Atlanticus, Oceanus Atlanticus -> Coast of Morocco
link = { autogenerated = yes imp = 4588 imp = 2993 imp = 2994 imp = 2997 imp = 4572 imp = 4573 imp = 4574 imp = 4575 imp = 4576 imp = 4577 imp = 4584 ck3 = 952 } # Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum, Mare Hyrcanum -> Caspian Sea
Expand Down Expand Up @@ -5507,8 +5506,8 @@ imperator_invictus = {
link = { autogenerated = yes imp = 5861 imp = 5863 imp = 5864 ck3 = 640 } # Mare Gothicum, Oceanus Sarmaticus, Oceanus Sarmaticus -> Baltic Sea
link = { autogenerated = yes imp = 5860 imp = 6469 imp = 6519 ck3 = 639 } # Oceanus Sarmaticus, Oceanus Sarmaticus, Oceanus Sarmaticus -> Baltic Sea
link = { autogenerated = yes imp = 5852 imp = 5855 ck3 = 638 } # Oceanus Sarmaticus, Oceanus Sarmaticus -> Coast of Lithuania
link = { autogenerated = yes imp = 5848 ck3 = 637 } # Mare Eovium -> Coast of �land
link = { autogenerated = yes imp = 5856 ck3 = 636 } # Oceanus Sarmaticus -> Coast of �land
link = { autogenerated = yes imp = 5848 ck3 = 637 } # Mare Eovium -> Coast of �land
link = { autogenerated = yes imp = 5856 ck3 = 636 } # Oceanus Sarmaticus -> Coast of �land
link = { autogenerated = yes imp = 5859 imp = 5858 imp = 5862 imp = 6348 imp = 9418 ck3 = 635 } # Oceanus Sarmaticus, Oceanus Sarmaticus, Mare Gothicum, LAKE, $PROV5854$ -> Baltic Sea
link = { autogenerated = yes imp = 9430 ck3 = 634 ck3 = 943 } # $PROV5854$ -> Archipelago Sea, Näsijärvi
link = { autogenerated = yes imp = 7645 ck3 = 632 } # Oceanus Sarmaticus -> Gulf of Riga
Expand Down Expand Up @@ -5649,9 +5648,9 @@ imperator_invictus = {
link = { autogenerated = yes imp = 7771 ck3 = 3253 } # Baetis -> Guadalquivir
link = { autogenerated = yes imp = 9160 imp = 9161 ck3 = 3251 } # $PROV7862$, $PROV7862$ -> Guadiana
link = { autogenerated = yes imp = 7862 imp = 7863 ck3 = 3250 } # Flumen Anas, Flumen Anas -> Guadiana
link = { autogenerated = yes imp = 9172 ck3 = 3249 } # $PROV7846$ -> Rh�ne
link = { autogenerated = yes imp = 9171 ck3 = 3248 } # $PROV7846$ -> Rh�ne
link = { autogenerated = yes imp = 7846 imp = 9170 ck3 = 3247 } # Rhodanus, $PROV7846$ -> Rh�ne
link = { autogenerated = yes imp = 9172 ck3 = 3249 } # $PROV7846$ -> Rh�ne
link = { autogenerated = yes imp = 9171 ck3 = 3248 } # $PROV7846$ -> Rh�ne
link = { autogenerated = yes imp = 7846 imp = 9170 ck3 = 3247 } # Rhodanus, $PROV7846$ -> Rh�ne
link = { autogenerated = yes imp = 8034 ck3 = 3245 } # Padus -> Po
link = { autogenerated = yes imp = 8032 imp = 8033 ck3 = 3244 } # Padus, Padus -> Po
link = { autogenerated = yes imp = 8031 imp = 8030 ck3 = 3243 } # Padus, Padus -> Po
Expand Down Expand Up @@ -5839,7 +5838,7 @@ imperator_invictus = {
link = { autogenerated = yes imp = 9381 ck3 = 103 ck3 = 134 ck3 = 139 } # Keerdak -> KOKENOIS, LENNEWARDEN, CESVAINE
link = { autogenerated = yes imp = 2697 imp = 2503 ck3 = 1029 } # Mare Tyrrhenum, Mare Tyrrhenum -> Tyrrhenian Sea
link = { autogenerated = yes imp = 2548 imp = 2547 imp = 2695 ck3 = 1028 } # Sinus Genuensis, Mare Ligusticum, Mare Ligusticum -> Gulf of Genoa
link = { autogenerated = yes imp = 2549 imp = 2550 ck3 = 1027 } # Mare Ligusticum, Mare Sardoum -> C�te D'Azur
link = { autogenerated = yes imp = 2549 imp = 2550 ck3 = 1027 } # Mare Ligusticum, Mare Sardoum -> C�te D'Azur
link = { autogenerated = yes imp = 6366 imp = 6362 imp = 6364 imp = 6365 ck3 = 1026 } # Lemannus, Everdunensis, LAKE, Brigantinus -> ALP LAKES
link = { autogenerated = yes imp = 2551 imp = 2552 imp = 2707 ck3 = 1025 } # Sinus Gallicus, Sinus Gallicus, Sinus Gallicus -> Gulf of Lion
link = { autogenerated = yes imp = 2710 imp = 2690 ck3 = 1024 } # Mare Sardoum, Mare Sardoum -> Sardinian Sea
Expand All @@ -5860,7 +5859,7 @@ imperator_invictus = {
link = { autogenerated = yes imp = 9423 imp = 9422 ck3 = 1006 } # $PROV5854$, $PROV5854$ -> Gulf of Finland
link = { autogenerated = yes imp = 9431 ck3 = 1005 } # $PROV5854$ -> Gulf of Bothnia
link = { autogenerated = yes imp = 5854 imp = 5853 imp = 5857 ck3 = 1004 } # Oceanus Sarmaticus, Oceanus Sarmaticus, Mare Gothicum -> Baltic Sea
link = { autogenerated = yes imp = 5847 ck3 = 1003 } # Oceanus Sarmaticus -> Bight of Han�
link = { autogenerated = yes imp = 5847 ck3 = 1003 } # Oceanus Sarmaticus -> Bight of Han�
link = { autogenerated = yes imp = 5851 ck3 = 1002 } # Oceanus Sarmaticus -> Gulf of Gdansk
link = { autogenerated = yes imp = 5833 imp = 5834 imp = 5835 ck3 = 1001 } # Oceanus Sarmaticus, Oceanus Sarmaticus, Oceanus Sarmaticus -> Kattegat
link = { autogenerated = yes imp = 5809 imp = 5785 imp = 5808 ck3 = 1000 } # Mare Germanicum, Mare Germanicum, Mare Germanicum -> Gulf of Heligoland
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14830,4 +14830,4 @@ apply_historic_administrative_game_rule_effect = {
set_character_faith = faith:nestorian
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5110,7 +5110,6 @@ hasan_expand_the_assassins = {


### --- Rajas of Asia Specific Files ---
## (Not sure if this will remain in this file, or if a removable_file_blocks_roa file will be made, which would make sense given that RoA overwrites some of the above files, but left here for now for tests )
# This removes the part of the code assigning stateless governments that often seems to cause the game to crash when converting
"common/on_action/government_assignment_on_actions.txt" = {
# Disable assignment of Nomadic government on game start.
Expand Down Expand Up @@ -5194,6 +5193,23 @@ hasan_expand_the_assassins = {
scope:ruler = { trigger_event = sea_title_event.2001 }
}
}
{
# Chinese Primogeniture
if = {
limit = {
OR = {
primary_title = title:e_celestia_china
primary_title.empire = title:e_celestia_china
}
OR = {
highest_held_title_tier >= tier_kingdom
is_independent_ruler = yes
}
has_government = administrative_government
}
add_realm_law_skip_effects = single_heir_succession_law
}
} # end of "Disable assignment of Primo succession to Chinese realms on game start."
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}
} # end of after
}
}
} # end of ccu_culture_values block

"common/decisions/dlc_decisions/bp3/sea_bp3_other_decisions.txt" = {
# In form_bosporan_kingdom_decision, make sure the kingdom doesn't have a holder or de jure land.
Expand Down Expand Up @@ -146,7 +146,7 @@
}
} # end of after
}
}
} # end of sea_bp3_other_decisions block

"common/on_action/government_assignment_on_actions.txt" = {
# Adjust RoA's assignment of Stateless government so it is limited to the out-of-scope regions in Indonesia
Expand Down Expand Up @@ -211,7 +211,7 @@
}
} # end of after
}
}
} # end of government_assignment_on_actions block

"map_data/geographical_regions/geographical_region.txt" = {
# Adds in the relevant region for the out-of-scope stateless assignment
Expand Down Expand Up @@ -247,4 +247,29 @@ converter_roa_out_of_scope_region = {
}
} # end of after
}
} # end of geographical_region block


"common/scripted_triggers/00_law_triggers.txt" = {
# Need to set this trigger to always be false so admin realms end up with the proper succession law
replace = {
before = {
non_roman_administrative_gov_trigger = {
government_allows = administrative
is_independent_ruler = yes
primary_title = {
NOR = {
this = title:e_roman_empire
this = title:e_byzantium
}
}
}
}

after = {
non_roman_administrative_gov_trigger = {
always = no
}
}
}
}
39 changes: 39 additions & 0 deletions ImperatorToCK3/Data_Files/configurables/succession_law_map.liquid
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# IMPERATOR-CK3 SUCCESSION LAW MAPPINGS #
# link = { ir = [law] ck3 = [law] }
# link = {
# ir = Imperator succession law
# ck3 = CK3 succession law
# ir_government = Imperator government
# has_ck3_dlc = CK3 DLC ID (optional, supported IDs: roads_to_power)
#}
# The CK3 law is output in the title's history
# folder, right after the line defining
# the holder, as succession_laws = { [law] }
Expand All @@ -9,6 +15,39 @@
# For mappings with multiple ck3 laws, all laws will be written out.
# For a given Imperator law, only the first matching link will be used.

# Supported CK3 mod flags for conditional blocks:
# tfe (The Fallen Eagle)
# wtwsms (When the World Stopped Making Sense)
# aep (Asia Expansion Project)
# vanilla (Vanilla CK3)


# CK3 Admin, to make sure admin realms get the proper succession laws

link = {
ir = agnatic_succession_law
ck3 = male_only_law ck3 = acclamation_succession_law
ir_government = imperium ir_government = imperial_cult
has_ck3_dlc = roads_to_power
}
link = {
ir = cognatic_succession_law
ck3 = male_preference_law ck3 = acclamation_succession_law
ir_government = imperium ir_government = imperial_cult
has_ck3_dlc = roads_to_power
}
link = {
ir = agnatic_seniority_succession_law
ck3 = acclamation_succession_law
ir_government = imperium ir_government = imperial_cult
has_ck3_dlc = roads_to_power
}
link = {
ir = egyption_succession_law
ck3 = equal_law ck3 = acclamation_succession_law
ir_government = imperium ir_government = imperial_cult
has_ck3_dlc = roads_to_power
}

# Monarchy

Expand Down

0 comments on commit da36649

Please sign in to comment.