Skip to content

Experiment with converting defensive leagues to confederations #2591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IhateTrains opened this issue May 6, 2025 · 5 comments
Open

Experiment with converting defensive leagues to confederations #2591

IhateTrains opened this issue May 6, 2025 · 5 comments
Labels
enhancement New feature or request investigate Needs to be investigated

Comments

@IhateTrains
Copy link
Member

• Not a high priority, as it would require a bit of reworking, but defensive leagues could potentially be converted into confederations.
    ◦ Or, if the effort is put into it, the confederation code could be used as a base to create a sort of custom “defensive league” system. (The confederation system seems like it is a little hard coded, so don’t know how easy this would be).
    ◦ For some reference, Imperator defensive leagues are stored in the “diplomacy” section, inside blocks called “defensive_league”, where each member’s country ID/number is listed using “member=##”
@IhateTrains IhateTrains added enhancement New feature or request investigate Needs to be investigated labels May 6, 2025
@tanner918
Copy link
Contributor

From some testing I did:

  • The conditions on creating/joining confederations setup in the base game (like being a duke or below, tribal/nomadic, etc.) are only requirements for those specific decisions and interactions, they are not hard-coded into the confederation system.
  • Being a member of a confederation is done in the character-scope, not title-scope.
    • So when adding a confederation member, you are adding the ruler themselves, not their title.
  • You can force a confederation to be created (create_confederation) and force specific characters to join the confederation (add_confederation_member) through script regardless of their tier/government.
    • But they might be removed from the confederation later for various reasons, like upon succession, unless those relevant on_actions and stuff are modified to account for the new circumstances we want.
  • When taking the "Elevate Confederation" decision, which consolidates the confederation into a custom Kingdom-tier title, any Kingdom/Empire-rank confederation members remain in the old confederation instead of becoming vassals under that new confederation-kingdom title since their rank is too high to be vassals. If we want kingdoms to be in confederations, we will need to figure out how to handle this.
    • As a side note, when taking this decision, the custom kingdom title created will be named after the character's culture, regardless of whether the confederation itself was meant to be a culture-based confederation (For example, you could have the "Piedemonte Confederation" turning into the "French Confederation" kingdom title). This seems a little weird, so this could probably be modified to account for this, but it isn't a major issue.

Some things to consider:

  • Do we only care about converting over Imperator defensive leagues how they were when the game got converted? Do we want them to be able to expand during the game? Do we want new ones to be able to form?
  • Who do we want to be able to be in confederations/defensive leagues?
    • In Imperator, the only restrictions for being in a Defensive League are that you are independent and either a City State (1 Territory) or a Local Power (2-24 Territories).
    • Base game CK3 decisions/interactions limit confederations so that you can only join if you are independent, tribal/nomadic, a count/duke, and meet certain conditions like having specific traits or a powerful neighboring realm nearby.
    • When converting to CK3, currently, City States convert to Duchies, and Local Powers convert to Duchies only if they are tribal, otherwise they become a Kingdom. If we leave the converter's mappings as they are, then that means some of the defensive league members might be converted over as kingdoms, although they will likely be relatively small at game start, not that different from a base game duchy-level realm. I see three possible solutions for this issue:
      1. We change country_rank_map.txt so that if the tag is in a defensive league, they always become a duchy. This will then require us to only change the base game content so that it allows other governments besides Tribal/Nomadic.
      2. We don't change the rank_mappings, allowing all realms to convert over how they normally would, but then use a game start on_action to give kingdom-tier defensive league members a dynamic duchy title, then destroy their kingdom title, forcing them to become dukes. (Basically the same as the above option, it just uses CK3 script files to handle making them dukes instead of the converter itself). This would allow a little more control since we could limit it under certain conditions, like if they are a kingdom above a certain realm size, even if they were in a defensive league, we don't allow them into a defensive league, etc.
      3. We don't change the rank_mappings, allowing all realms to convert over how they normally would, but we then modify the base game confederation content to allow kingdoms to be in confederations, along with any of the other government changes that we would need to make regardless of how we choose to handle this. If we do this, since kingdoms will naturally be able to have larger realm sizes given their increase domain size and vassal limit, we might need to also include limits so that only kingdoms under a certain realm size can actually be in confederations. Also, we will need to figure out how we are handling the "Elevate Confederation" decision, since the kingdom-tier confederation members wouldn't be able to become vassals under the new kingdom-tier title that gets created.

Some ideas I had:

  • It will likely be better to continue limiting confederations/leagues to only allow counts/dukes instead of extending it to kingdoms, as that could cause more issues than its worth. As such, if Imperator Defensive Leagues get converted over, it'd be better to have their members become dukes, and just modify the base game content to allow other governments.
  • We could put restrictions so only Tribes/Nomads can be in "Confederations" together, and everyone else would be allowed in "Leagues".
    • This could maybe be done by simply storing a variable inside the confederation itself that designates whether it is supposed to represent a "Confederation" or a "League", then if we want any content to only be allowed for one or the other, we can just check that variable.
  • For naming:
    • We can probably leave the naming conventions for tribal/nomadic confederations as is (although maybe change how the "Elevate Confederation" decision names the dynamic kingdom title so you don't get weird name changes just because the confederation was consolidated).
    • For the "Leagues" (which in our case will probably be confederations created by none-Tribal/Nomadic realms), we could maybe use "League" instead of "Confederation" in their name to better show that they are different. We could then maybe also add a couple ways its name could be determined, like how it is in the base game:
      1. If starting members are same culture, "[culture] League" (assuming there isn't one already with that name)
      2. If starting members are different culture, same heritage, "[heritage] League" (assuming there isn't one already with that name)
      3. If a starting member is a Duke, "[duchy title] League"
      4. If both starting members are counts, "[capital duchy] League"
      5. (Not a priority, can be done later since it might require a bit of rework) Should Faith-based confederations/leagues be made? Like if the starting members are different cultures, same faith, and either the culture/faith have certain traditions/tenants, the League (and maybe confederations too) be a faith-based one instead of culture-based? Then, if the confederation/league consolidates, voting on the next ruler could depend on having the "confederation/league faith" instead of "culture" (how it is done in the base game currently)
      6. (Not a priority, can be done later) Should references to specific historical confederations/leagues also be included? For example, a defensive league of Greek states with Sparta as a starting member could be called the "Peloponnesian League". Some references might be anachronistic, but could be cool to see.

@IhateTrains
Copy link
Member Author

The conditions on creating/joining confederations setup in the base game (like being a duke or below, tribal/nomadic, etc.) are only requirements for those specific decisions and interactions, they are not hard-coded into the confederation system.

@tanner918 this is good news. Means we could potentially represent Greek city-state leagues consisting of feudal and republic realms.

When taking the "Elevate Confederation" decision, which consolidates the confederation into a custom Kingdom-tier title, any Kingdom/Empire-rank confederation members remain in the old confederation instead of becoming vassals under that new confederation-kingdom title since their rank is too high to be vassals. If we want kingdoms to be in confederations, we will need to figure out how to handle this.

Could we add a requirement to the "Elevate Confederation" decision that no member (or at least no member other than the decision taker) has kingdom rank or above?

Do we only care about converting over Imperator defensive leagues how they were when the game got converted? Do we want them to be able to expand during the game? Do we want new ones to be able to form?

This is a rather difficult question. It would probably be nice if they could expand or form in CK3, but we definitely need to define sensible requirements (realm size-based?), to avoid too many confederations existing outside of the tribal and nomadic portions of the map.

  • Who do we want to be able to be in confederations/defensive leagues?
    • In Imperator, the only restrictions for being in a Defensive League are that you are independent and either a City State (1 Territory) or a Local Power (2-24 Territories).
    • Base game CK3 decisions/interactions limit confederations so that you can only join if you are independent, tribal/nomadic, a count/duke, and meet certain conditions like having specific traits or a powerful neighboring realm nearby.
    • When converting to CK3, currently, City States convert to Duchies, and Local Powers convert to Duchies only if they are tribal, otherwise they become a Kingdom. If we leave the converter's mappings as they are, then that means some of the defensive league members might be converted over as kingdoms, although they will likely be relatively small at game start, not that different from a base game duchy-level realm. I see three possible solutions for this issue:
      1. We change country_rank_map.txt so that if the tag is in a defensive league, they always become a duchy. This will then require us to only change the base game content so that it allows other governments besides Tribal/Nomadic.
      2. We don't change the rank_mappings, allowing all realms to convert over how they normally would, but then use a game start on_action to give kingdom-tier defensive league members a dynamic duchy title, then destroy their kingdom title, forcing them to become dukes. (Basically the same as the above option, it just uses CK3 script files to handle making them dukes instead of the converter itself). This would allow a little more control since we could limit it under certain conditions, like if they are a kingdom above a certain realm size, even if they were in a defensive league, we don't allow them into a defensive league, etc.
      3. We don't change the rank_mappings, allowing all realms to convert over how they normally would, but we then modify the base game confederation content to allow kingdoms to be in confederations, along with any of the other government changes that we would need to make regardless of how we choose to handle this. If we do this, since kingdoms will naturally be able to have larger realm sizes given their increase domain size and vassal limit, we might need to also include limits so that only kingdoms under a certain realm size can actually be in confederations. Also, we will need to figure out how we are handling the "Elevate Confederation" decision, since the kingdom-tier confederation members wouldn't be able to become vassals under the new kingdom-tier title that gets created.

At the moment, the c. option sounds best if we ignore potential issues. We could probably allow existing confederations to exist with kingdom rank members, but prevent new such ones from forming. We could also make the "Elevate Confederation" decision only takeable when there are only count and duke members, and add a similar "Elevate Confederation to Empire" decision that requires the root to have kingdom rank.

But if we do consider the required edits and potential problems of allowing kingdom members that you mention, the option a. sounds best. It shouldn't be too difficult for me to add an in_defensive_league parameter to the rank mappings.

We could put restrictions so only Tribes/Nomads can be in "Confederations" together, and everyone else would be allowed in "Leagues".

If possible, awesome.

(Not a priority, can be done later since it might require a bit of rework) Should Faith-based confederations/leagues be made? Like if the starting members are different cultures, same faith, and either the culture/faith have certain traditions/tenants, the League (and maybe confederations too) be a faith-based one instead of culture-based? Then, if the confederation/league consolidates, voting on the next ruler could depend on having the "confederation/league faith" instead of "culture" (how it is done in the base game currently)

I like the idea.

(Not a priority, can be done later) Should references to specific historical confederations/leagues also be included? For example, a defensive league of Greek states with Sparta as a starting member could be called the "Peloponnesian League". Some references might be anachronistic, but could be cool to see.

Yeah, this could probably be implemented using a configurable.
To avoid anachronisms, instead of tag names we could also use areas/regions. For example:

link = {
  name_english = "Peloponessian League"
  name_french = "Ligue du Péloponnèse"
  name_<language> = "<loc for a given language>"
  
  OR = { # I really want to finally introduce complex logic triggers in mappings
    tag = SPA # just guessing this is the tag for Sparta
    area = achaea_area
    area = laconia_area
  }
}

@tanner918
Copy link
Contributor

tanner918 commented May 20, 2025

This is a rather difficult question. It would probably be nice if they could expand or form in CK3, but we definitely need to define sensible requirements (realm size-based?), to avoid too many confederations existing outside of the tribal and nomadic portions of the map.

We will need to do some testing to see how often the AI would form these "Leagues", but the ai_accept/will_do blocks do consider how many members are already in the confederation, so that could be a way of limiting how big they get. Plus, if a member ends up becoming stronger than the other members, or ends up having a larger domain size, they become more likely to leave their confederation, so that might be another way of making sure they are limited. But we'll have to see through testing how well this works, and if it needs to be modified in anyway. If we also allow kingdoms in now, we could maybe also add in a separate modifier that makes them more likely to leave/not join to limit the confederations power, or at least if they are a certain size. Overall, I think allowing them to form in game too should be fine.

At the moment, the c. option sounds best if we ignore potential issues. We could probably allow existing confederations to exist with kingdom rank members, but prevent new such ones from forming.

But if we do consider the required edits and potential problems of allowing kingdom members that you mention, the option a. sounds best. It shouldn't be too difficult for me to add an in_defensive_league parameter to the rank mappings.

Personally, since the system is already setup to focus around Counts and Dukes, I think limiting the confederations/leagues to just that might be better since it will require less balancing and modification, but it'll be possible to handle kingdoms if that is what's desired. Or at least allow kingdoms as they are transferred from Imperator, and then only allow new ones to form with counts/dukes, if that is preferred. I could also make it a game rule as a compromise if needed.

We could also make the "Elevate Confederation" decision only takeable when there are only count and duke members, and add a similar "Elevate Confederation to Empire" decision that requires the root to have kingdom rank.

Could we add a requirement to the "Elevate Confederation" decision that no member (or at least no member other than the decision taker) has kingdom rank or above?

For the "Elevate Confederation" decision, I suppose we will first need to determine whether we will allow kingdoms in or not. As it is, the base game decision requires you to have prestige/fame level 3 (Illustrious), every other member has a lower prestige/fame level than you, have at least 5 total confederation members, and every other confederation member has at least 25 opinion of you. This is what allows the confederation-kingdom title to be created. If we were to create a separate decision for a confederation-empire title, it would likely just be made a little harder, like maybe requiring more prestige/fame, more total confederation members or higher opinions of you. I think the main issue would then be deciding when to use each. Obviously, if we allow kingdoms into confederations/leagues, then if one is present in a particular confederation, then the only decision that would be possible would be "Elevate Confederation to Empire", since that would allow the kingdom to properly become a vassal, while the normal "Elevate Confederation" would be possible if there are no kingdoms present in the confederation. That alone makes sense, but we'll need to see through testing how often the Count/Duke members would be capable of taking the "Elevate Confederation to Empire" decision since I think Kings would always have an easier time getting prestige, so a Count/Duke ending up with a higher prestige/fame level, and reaching level 4 (or whatever we set it to), might be kind of difficult, and I think they should at least have a somewhat reasonable chance compared to the Kingdom members.

For the idea of only allowing Tribes/Nomads into "Confederations" and everyone else in "Leagues", that should absolutely be possible, the character interactions just need to be setup properly to prevent it from being done if the recipient's government doesn't match the root character's, which shouldn't be too hard. But I just thought of two possible issues.

  1. In Imperator, it is possible that a Defensive League was made with both Tribes and Monarchy/Republic tags. When this gets converted to CK3, that would obviously break our government restrictions mentioned above, so we will need to figure out how we are going to handle this. We could maybe allow these mixed confederations only if they get converted from Imperator and any new ones must follow the restrictions above.
  2. I will need to do some more tests about how the game handles title usurpation/inheritance in regards to confederations. The fact that creating and assigning confederation membership is handled in the character scope tells me that if someone usurps/takes a primary title from another ruler who is in a confederation, the usurper likely won't now enter the confederation. But, confederation membership is passed down to a ruler's heir, and if somehow a ruler has multiple heirs that end up with different government types (I don't think this is possible, but maybe there are some niche examples I don't know of), or if another independent ruler inherits the title from someone else with a different government type, this could result in mixed confederations that don't follow the government restrictions mentioned above. I will need to see exactly how much of this is possible in the first place to see if it is an issue at all.

For the idea of Faith-based confederations, that shouldn't be hard to do, I just need to do some testing on whether it'd be best to use replaceable code to modify the existing stuff to allow Faith-based alternatives, or just create new files to put in the blankMod so its separate, because I feel that it would be best to have it shown somewhere whether it is culture- or faith-based, and I don't know how hard that will end up being if I try merging everything together. This obviously isn't super important, so I could maybe handle it afterwards if it takes too long to do.

Yeah, this could probably be implemented using a configurable.
To avoid anachronisms, instead of tag names we could also use areas/regions. For example:

link = {
   name_english = "Peloponessian League"
   name_french = "Ligue du Péloponnèse"
   name_<language> = "<loc for a given language>"

   OR = { # I really want to finally introduce complex logic triggers in mappings
      tag = SPA # just guessing this is the tag for Sparta
      area = achaea_area
      area = laconia_area
   }
}

For the naming of the confederations, especially using any historical (and probably anachronistic) names, because confederations themselves can't be predefined in the same way that specific liege-vassal relations can (for example), they have to entirely be setup in script, so any naming of them will also be handled by the script. For some reference, the only way to setup a confederation is in script using the following effect in a character scope:

create_confederation = {
	name = key/dynamic description
}

The character scope this was run in then has a confederation created for them, and they are made a member of it (but since a confederation requires at least two people, if another ruler isn't added before the next tick, it gets disbanded). For the name = part, you can put in any loc key, and that will be made the name of the confederation (I have tested, and you can directly give it a string like "Peloponessian League" in the name = part, so we could do that if needed). So, it will just use the loc key from the relevant language localization file automatically, like with anything else in the game.

Since we are transferring over the Imperator Defensive Leagues, we could create a configurable file that has potential predefined names that they could use if they meet certain conditions, or we could just have it all handled in game by script, and I can try setting up a custom scripted_effect that chooses a good, relevant name (I would probably need to do this anyway for any confederations/leagues formed in game since I would need to modify the existing confederation interactions/decisions/effects to account for the "Confederation"/"League" split). Either way will be fine, it will just determine whether the game start on_action that creates the confederations uses a specific loc key determined from the configurable file or uses the custom naming scripted_effect I make.

Aside from this, I guess another thing that would need to be determined is how exactly we want "Leagues" to differ from "Confederations". From the discussion so far, they will be pretty much the same, the only difference being the governments allowed in each and a minor localization change. While this could be fine for now, is there any other way they should be made different? I can't think of anything at the moment aside from maybe making the "Elevate Confederation" decisions a little harder for "Leagues" than "Confederations", but that might be something that needs to be looked at through testing to determine how necessary it is. Just figured I'd mention this to get more ideas.

@tanner918
Copy link
Contributor

List of Content Related to Confederations that might need changing:

"common\character_interactions\09_mpo_interactions.txt"

  • offer_confederation_interaction
  • join_confederation_interaction

"common\decisions\80_major_decisions.txt"

  • found_kingdom_decision (if we allow kingdoms into confederations/leagues, can maybe modify this to allow confederation members to make new kingdoms)

"common\decisions\dlc_decisions\mpo\mpo_decisions.txt"

  • call_for_confederation_decision
  • leave_confederation_decision
  • confederation_kingdom_decision (and will need to look into either making a new decision that allows confederation empires to be made, or modify this one to instead give an empire title, if we allow kingdoms into confederations)

"common\factions\00_factions.txt"

  • independence_faction (can_character_create_ui/can_character_create/can_character_join blocks seem to prevent this faction for Nomads/Tribes if liege is in a confederation. Need to look into this, whether to just leave the Nomad/Tribe limitation, extend it to "Leagues", or whatever)

"common\important_actions\09_mpo_actions.txt"

  • action_offer_confederation (This is just one of the "important action" banners that appears at the top of the screen if the game realizes there is someone that will accept joining a confederation. Not a high priority, but can maybe see if there is a way to have the localization properly reflect the "Confederation"/"League" split)

"common\laws\00_realm_laws.txt"

  • crown_authority (The base game limits what tribal/nomadic_authority a confederation member can have. Will probably need to do that for crown_authority too for "League" members)

"common\laws\01_title_succession_laws.txt"

  • confederation_elective_succession_law (I don't think I will need to change this, but figured I'd just note it down here in case I run into issues when implementing the faith-based confederations/leagues)

"common\lifestyle_perks\00_diplomacy_2_majesty_tree_perks.txt"

  • true_ruler_perk (The effect block shows that Tribes/Nomads, when offering to another ruler to join a confederation, have an increased chance for them to accept. I don't think this should be changed, as it could allow Tribes/Nomads a better fighting chance against the Feudal/Republic/etc realms that typically cover the map after converting from Imperator. Figured I'd mention this here just so it is known, in case it is decided that this should be extended to Feudal/Republics/etc for joining "Leagues")

"common\messages\01_alliance_messages.txt"

  • msg_broken_confederation/msg_joined_confederation (While this file itself might not need to be changed, might need to look into changing their relevant loc keys found in "localization\english\dlc\mpo\mpo_interactions_l_english.yml" to better reflect the "Confederation"/"League" split. Not a high priority)

"common\on_action\confederation_on_actions.txt"

  • This whole file might need to be modified to better fit the "Confederation"/"League" split, but will need to check each on_action in it to better determine what needs to be changed.

"common\on_action\game_start.txt"

  • [DONE] Lines 1652-1661. This isn't super important since the converter doesn't map any Imperator tag to k_magyar and it properly checks if the title currently has a holder at game start, but just in case, could probably remove this section from the file, since it gives the special Confederation Elective succession law to k_magyar.

"common\on_action\title_on_actions.txt"

  • on_title_gain (Lines 452-460 makes someone leave a confederation they are in if they gain a kingdom+ title, so that will need to be modified based off how we determine to handle kingdoms in confederations/leagues)

"common\on_action\dlc\mpo\mpo_on_actions_2.txt"

  • on_government_change (Lines 589-600 makes it so that when you change government and are part of a confederation, if you are no longer Tribal/Nomadic, you are removed from the confederation. Will probably need to modify this so that you only leave the confederation/league if your new government isn't compatible with the confederation/league, i.e. if you are in a "League" and become Tribal, you should leave, but if you somehow become a Republic, you can stay)

"common\script_values\00_interaction_values.txt"

  • duchy_confederation_vassals_value/duchy_confederation_vassals_value_recipient (Need to see exactly what these do, but it seems like it might give a negative opinion penalty to your vassals if you are in a confederation. Whatever it is seems like it might affect only Dukes, so might need to set up the Kingdom equivalent)

"common\script_values\02_religion_values.txt"

  • holy_site_reform_tracker_value (I think this is what tracks the number of Holy Sites you own for reforming unreformed faiths. This counts Holy Sites in the realms of confederation members as being owned, making it a little easier to reform faiths. Should this be limited to just the Nomad/Tribal "Confederations", or should the "Leagues" be allowed to use this as well?)

"common\scripted_effects\09_dlc_mpo_scripted_effects.txt"

  • offer_confederation_accepter_effect (This shows the effect tooltips about what happens when creating/joining a confederation. Not a high priority, but this could be modified to better represent the "Confederation"/"League" split localization-wise)
  • confederation_realm_transfer_effect (Need to see exactly what this is used for first to determine whether it needs to be modified)

"common\scripted_modifiers\00_elective_successions_scripted_modifiers.txt"

  • elector_voting_pattern_confederation_modifier (Need to check exactly what this is used for, but I think it affects who electors vote for in the Confederation Elective succession law. It has a part referencing the "confederation culture", so will likely at least need to modify it so that it also accounts for the "confederation faith", if I add that. Another part also makes a character more likely to be elected if they have higher prowess, could maybe also add in a part that takes something like learning/piety into consideration for faith-based confederation/leagues)

"common\scripted_modifiers\00_faction_modifiers.txt"

  • independence_faction_create_blockers (Has a part that seems to make independence factions less likely/impossible for Nomads/Tribals if their primary title has the Confederation Elective succession law. Need to determine whether this should be extended to other governments in "Leagues", or just Tribes/Nomads in "Confederations")
  • nation_fracturing_faction_blockers (Has a part that seems to make dissolution factions less likely/impossible for Nomads/Tribals if their primary title has the Confederation Elective succession law. Need to determine whether this should be extended to other governments in "Leagues", or just Tribes/Nomads in "Confederations")

"common\scripted_triggers\00_religious_triggers.txt"

  • num_realm_holy_sites_faithful_holders (Deals with counting number of held holy sites, like with holy_site_reform_tracker_value, need to determine whether this should be changed to allow only Tribe/Nomadic "Confederations", or "Leagues" too)

"common\scripted_triggers\mpo_scripted_triggers.txt"

  • valid_confederation_member_trigger (Determines whether a character can actually join a confederation. Will need to change to account for things like the "Confederation"/"League" split, and kingdoms being allowed if we decide to)
  • confedration_foe_sub_trigger/confederation_foe_trigger/confederation_neighboring_foe_trigger (Used to determine whether there is a valid strong "foe" nearby that is worth confederating against. Not sure if these will need to be changed, but wanted to mention it here just in case so they're listed)

"common\succession_election\09_confederation_elective.txt"

  • This is the definition of the Confederation Elective succession law, so will likely need to modify this to account for faith-based confederations/leagues, kingdoms if we allow them in, and maybe some changes focused around the "Confederation"/"League" split.

"events\decisions_events\mpo_greatest_of_khans_events.txt"

  • mpo_greatest_of_khans.0002/mpo_greatest_of_khans_0002_confederation_trigger (These deal with the event for when someone else becomes the Greatest of Khans, and the trigger checks if there is a valid confederation nearby for you to join against the new Khan. Will likely need to modify this so that the trigger properly checks if the character has the proper government to join the neighboring "Confederation"/"League")
  • mpo_greatest_of_khans.0003/mpo_greatest_of_khans.1001 (Also checks valid confederations, whether characters can join, etc. Uses the above trigger, so need to see if this even needs further modification after that trigger is changed)

"events\dlc\mpo\mpo_decisions_events.txt"

  • mpo_decisions_events.0001 (Event triggered when you decide to try forming a confederation. Will at least need to change it to account for "Confederation"/"League" split)
  • mpo_decisions_events.0002/mpo_decisions_events.0003 (Event triggered for you and your old confederation members, respectively, when you decide to leave your confederation, need to account for "Confederation"/"League" split)
  • mpo_decisions_events.0004/mpo_decisions_events.0005 (Event triggered when a confederation is elevated to a kingdom for the new vassals and king, respectively. Need to account for "Confederation"/"League" split, and maybe for if we decide to allow kingdoms into confederations, we will need to handle empire-confederation titles too)

"events\dlc\mpo\mpo_interactions_events.txt"

  • mpo_interactions_events.0001 (Seems to be triggered after someone uses the Join Confederation interaction, and handles creating the confederation, if it doesn't exist, or adding the new member to it. Will need to account for "Confederation"/"League" split, new faith-based confederations/leagues, and however we decide to handle naming.)
  • mpo_interactions_events.0002 (Seems to be triggered after joining/creating a confederation, and handles setting up some of the effects, like the fertility bonus for Nomads. Need to modify to account for "Confederation"/"League" split, maybe faith-based confederations/leagues if they end up getting anything special)
  • mpo_interactions_events.0003/mpo_interactions_events.0004 (Handles the event sent back when you ask another character to join a confederation for if they accept or decline, respectively. Might need to modify for "Confederation"/"League" split.)
  • mpo_interactions_events.0030 (Same as above, but seems to be used if you ask someone else to join their confederation)

There is also a lot of loc keys that revolve around confederations, but those can probably be looked at as their relevant game content gets changed (like a decision's description)

List of possible new additions:

  • Might want to just create a new game_concept for "Leagues", that has confederation as the parent concept, to explain exactly what the differences are between the new "Leagues" compared to the base game "Confederations" so players can better understand it.

  • Wanted to hear thoughts about having Imperator tribes convert to CK3 using the new Confederation Elective succession law for their primary title. In Imperator, Tribes constantly switch their ruler between the different clans, not that differently from how the Confederation Elective law switches the ruler between the different vassals in the realm. This would better reflect the transition from Imperator to CK3, and them removing this succession law from their title would be like them trying to consolidate power (since at that point the title would likely begin staying with their dynasty).

    • Currently, though, this law is only available for Kingdom+ titles, but I can modify it to work with Duchies
    • Will maybe also need to add a game start on_action that adds the relevant "confederation culture" variable to these titles since that is something used by the succession law when electors determine who to vote for. This can probably just take the current ruler's culture and make that the confederation culture since in most cases the clan heads typically all have the same culture in Imperator.
    • Nomadic realms can use this title succession law, as they are capable of creating confederations in the base game, but we will need to see how this interacts with the unique Nomadic mechanics, and if this messes up smaller realms. (Maybe only give it to Nomads that are Kingdoms at game start?)

Example of Converter setting up Confederations/Leagues

In the Imperator save file, defensive leagues are saved under the diplomacy block in the following format:

defensive_league={
	member=125
	member=128
	member=129
}

Where member=### lists every individual member of that defensive league. Obviously, the converter should already be setup to determine what exactly these tags actually are, so that shouldn't be an issue. For this example, the members are:

  • 125 = tag MET = Metapontum
  • 128 = tag HCL = Herakleia
  • 129 = tag CRO = Croton

None of these tags have associated title mappings, meaning new titles will be created for them:

  • MET -> d/k/e_IRTOCK3_MET
  • HCL -> d/k/e_IRTOCK3_HCL
  • CRO -> d/k/e_IRTOCK3_CRO
    The rank they convert to doesn't really matter right now, but since they start as city states, I will just assume they become duchies on conversion for this example.

They are also all republics in Imperator, making them Republics in CK3, meaning they will form a "League"

Now that we know the relevant titles, the converter can then output the necessary file.

  • This will be either an on_game_start or on_game_start_after_lobby on_action, depending on whether we want to have game rules that affect who can join confederations.
    • Or we could maybe also make it after_lobby so that choosing your character is a little clearer (since confederations change title colors and replaces their name on the map).
  • We also need to figure out how we will handle naming. We can either have a configurable file used to just determine names for the defensive leagues from Imperator that then outputs the determined confederation name to the on_action file that gets created, or we can just leave everything to the scripted_effect I am going to need to make anyway to determine new confederation names.
    • Either way will be fine, but if we use a configurable file we will need to consider cases like what if none of the predefined names are met, how do we handle that. We can discuss the specifics of this later if needed.
    • The base game determines the name of confederations solely on the first two confederation members. When I make the scripted_effect to choose a good name, I can make it consider all members that will be added, but that will only really work at game start with the defensive leagues converted from Imperator since that is the only time we already know more than 2 members that will be added.

Lets say we make the file "common/on_action/irtock3_confederations.txt", it would then be setup something like this:

  • NOTE: I set up this example to show how it could be done if we decide to either let my scripted_effect handle naming, or if we decide to have a configurable handle naming for converted defensive leagues. I designated each using comments with the beginning and end of each of the sections. Both won't be in the final on_action file, I just wanted to show how either way could be handled.
on_game_start/on_game_start_after_lobby = {
    on_actions = {
        irtock3_confederation_setup
    }
}

irtock3_confederation_setup = {
    effect = {
        ################
        ## If we let my scripted_effect handle naming (beginning)
        ################
        # If we want to consider all confederation members when deciding the name, we need to add them all to a list like this. Otherwise, likely only need to consider the first two members, so we would save only those two as scopes instead
        title:d_IRTOCK3_MET.holder = {
            add_to_list = irtock3_confederation_members
            save_scope_as = first_confed_member
        }
        title:d_IRTOCK3_HCL.holder = {
            add_to_list = irtock3_confederation_members
            save_scope_as = second_confed_member
        }
        title:d_IRTOCK3_CRO.holder = {
            add_to_list = irtock3_confederation_members
        }

        irtock3_confederation_name_setup_effect = yes # This scripted_effect would go through all of the possible names, choose the one that the members meet the conditions for first, then create the confederation using that name in the first_confed_member scope

        ################
        ## If we let my scripted_effect handle naming (end)
        ################



        ################
        ## If we have a configurable handle naming (beginning)
        ################
        title:d_IRTOCK3_MET.holder = {
            create_confederation = {
                name = "Whatever is determined from the configurable" # We could make this a directly localized string (like how I wrote it here), or a loc key, it seems both will work, but loc keys might give less issues
            }
        }

        # The issue with using the configurable for this is that we don't really know what exactly what was chosen for the name, we just have whatever the converter output above. So if we use a configurable, we might need to include something that signifies here in this on_action what exactly was chosen as the name.
        ## For example, if the confederation was made to be a culture-based confederation, and it was named accordingly (Greek Confederation/League, for example), we would need something added here so that my scripted_effect later can actually know to make sure to assign a confederation culture (unless a confederation culture should ALWAYS be assigned, but that can be discussed).
        ## Another example would be historical names, like "Peloponessian League". It might be best to not have repeating names popup, so something showing that that specific name was chosen from the configurable would be needed since CK3 doesn't let you check loc keys as a trigger.

        ################
        ## If we have a configurable handle naming (end)
        ################


        # Because the confederation was created in the scope of the first member listed (MET, in this example), the rest still need to be added
        scope:new_confederation = {
            add_confederation_member = title:d_IRTOCK3_HCL.holder
            add_confederation_member = title:d_IRTOCK3_CRO.holder

            irtock3_confederation_finish_setup_effect = yes # This is a scripted_effect that I will create that will handle things like setting up necessary variables such as defining the confederation culture/faith, whether it represents a "Confederation" or a "League", etc.
        }

        # Then just some scope/list cleanup so there are no issues when setting up multiple confederations
        clear_saved_scope = first_confed_member
        clear_saved_scope = second_confed_member
    }
}

@IhateTrains
Copy link
Member Author

Personally, since the system is already setup to focus around Counts and Dukes, I think limiting the confederations/leagues to just that might be better since it will require less balancing and modification, but it'll be possible to handle kingdoms if that is what's desired.

Whatever you think is best.

We could maybe allow these mixed confederations only if they get converted from Imperator and any new ones must follow the restrictions above.

Sounds reasonable.

While this could be fine for now, is there any other way they should be made different? I can't think of anything at the moment aside from maybe making the "Elevate Confederation" decisions a little harder for "Leagues" than "Confederations", but that might be something that needs to be looked at through testing to determine how necessary it is. Just figured I'd mention this to get more ideas.

Can't think of any differences myself, we might need to get some feedback on the forum or discord.

true_ruler_perk (The effect block shows that Tribes/Nomads, when offering to another ruler to join a confederation, have an increased chance for them to accept. I don't think this should be changed, as it could allow Tribes/Nomads a better fighting chance against the Feudal/Republic/etc realms that typically cover the map after converting from Imperator. Figured I'd mention this here just so it is known, in case it is decided that this should be extended to Feudal/Republics/etc for joining "Leagues")

If we want to give the tribals and nomads a better fighting chance, this probably shouldn't be extended to Leagues.

holy_site_reform_tracker_value (I think this is what tracks the number of Holy Sites you own for reforming unreformed faiths. This counts Holy Sites in the realms of confederation members as being owned, making it a little easier to reform faiths. Should this be limited to just the Nomad/Tribal "Confederations", or should the "Leagues" be allowed to use this as well?)

Not sure on this, but for consistency/avoiding unnecessary differences, probably yes.

Wanted to hear thoughts about having Imperator tribes convert to CK3 using the new Confederation Elective succession law for their primary title. In Imperator, Tribes constantly switch their ruler between the different clans, not that differently from how the Confederation Elective law switches the ruler between the different vassals in the realm. This would better reflect the transition from Imperator to CK3, and them removing this succession law from their title would be like them trying to consolidate power (since at that point the title would likely begin staying with their dynasty).

I haven't interacted with this succession law, but this sounds fine.

In the Imperator save file, defensive leagues are saved under the diplomacy block in the following format:

I will create a branch that parses this.

We also need to figure out how we will handle naming. We can either have a configurable file used to just determine names for the defensive leagues from Imperator that then outputs the determined confederation name to the on_action file that gets created, or we can just leave everything to the scripted_effect I am going to need to make anyway to determine new confederation names.

Let's use the scripted effect file for now. If it's not sufficient, then a configurable can be added later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request investigate Needs to be investigated
Projects
None yet
Development

No branches or pull requests

2 participants