• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Is there a way to make different duchy/county/barony tier titles have different succession laws? As with patrician family palaces and the merchant republic title. I would like to make it so that in specific circumstances, county and duchy titles have the appointment succession, while barony titles pass on to another member of the family.

I added the following scripted trigger:

Code:
# title scope
is_appointed_governorate = {
   NOT = { tier = baron }
   holder_scope = {
       independent = no
       is_merchant_republic = no
       top_liege = {
           has_law = centralization_4
       }
   }
}

And then in the potential of each succession law other than appointment, I added:

Code:
           NOT = { is_appointed_governorate = yes }

And made the appointment succession potential be this:
Code:
           OR = {
               holder_scope = {
                   is_feudal = yes
                   independent = no
                   any_liege = {
                       holy_order = yes
                   }
                   is_merchant_republic = no
               }
               is_appointed_governorate = yes
           }

But unfortunately, that makes the barony titles have appointment succession as well, if the person in question holds a higher title.

I could use viceroyalties, but the problem with those is that they will become normal titles when the immediate liege receives them. I want the top liege to be able to grant kingdom, duchy and county level titles without his king-level viceroys ending up holding many ducal titles of their own.

I can do what I want with an on_death event, but then the heir to each title doesn't show up correctly in the interface, of course.
 
  • 2
Reactions:
Hey guys, I'm trying to take the Imperial Reconquest CB from Project Augustus and add it independently to the game (PA simply runs too slow on the older versions for me) and I get everything to appear fine in game but when I actually try to use the CB to launch a war nothing happens. Any ideas what could be causing that?
 
Hey guys, I'm trying to take the Imperial Reconquest CB from Project Augustus and add it independently to the game (PA simply runs too slow on the older versions for me) and I get everything to appear fine in game but when I actually try to use the CB to launch a war nothing happens. Any ideas what could be causing that?

Post the CB here (in a .txt file or using code+spoiler tags to avoid cluttering the page) and I can take a look.
 
Code:
imperial_reconquest = {
    name = CB_NAME_IMPERIAL
    war_name = WAR_NAME_IMPERIAL
    sprite = 17
    truce_days = 3650
    is_permanent = yes
    can_call_allies = yes
    check_de_jure_tier = DUKE # this scans all dejure duchies for the counties which are held by or vassals(or below) of selected character. Only valid if is_permanent = yes

    can_use = {
        ROOT = {
            ai = no
            OR = {
                has_landed_title = e_western
                has_landed_title = e_byzantium
                has_landed_title = e_roman_empire
            }
            independent = yes
            OR = {
                religion_group = christian
                religion_group = pagan_group
            }
            NOT = { same_realm = FROM }
            mercenary = no
            NOR = {
                pays_tribute_to = FROM
                any_liege = {
                    OR = {
                        pays_tribute_to = FROM
                        FROM = {
                            pays_tribute_to = PREV
                        }
                    }
                }
            }
        }
        FROM = {
            NOT = { religion_group = muslim }
        }
    }

    can_use_title = {
        OR = {
            title = d_northumberland
            title = d_lancaster
            title = d_york
            title = d_norfolk
            title = d_bedford
            title = d_hereford
            title = d_gloucester
            title = d_canterbury
            title = d_somerset
            title = d_gwynedd
            title = d_powys
            title = d_deheubarth
            title = d_cornwall
            title = d_venice
            title = d_verona
            title = d_susa
            title = d_lombardia
            title = d_genoa
            title = d_modena
            title = d_ferrara
            title = d_toscana
            title = d_pisa
            title = d_ancona
            title = d_spoleto
            title = d_latium
            title = d_benevento
            title = d_capua
            title = d_apulia
            title = d_salerno
            title = d_calabria
            title = d_armenia_minor
            title = d_cyprus
            title = d_edessa
            title = d_aleppo
            title = d_antioch
            title = d_tripoli
            title = d_damascus
            title = d_galilee
            title = d_jerusalem
            title = d_ascalon
            title = d_oultrejourdain
            title = d_alexandria
            title = d_damietta
            title = d_cairo
            title = d_aswan
            title = d_sinai
            title = d_nubia
            title = d_cyrenaica
            title = d_krete
            title = d_tripolitania
            title = d_tunis
            title = d_kabylia
            title = d_vidin
            title = d_belgrade
            title = d_dioclea
            title = d_slavonia
            title = d_croatia
            title = d_dalmatia
            title = d_carinthia
            title = d_sicily
            title = d_sardinia
            title = d_aquitaine
            title = d_toulouse
            title = d_gascogne
            title = d_poitou
            title = d_auvergne
            title = d_bourbon
            title = d_dauphine
            title = d_provence
            title = d_brittany
            title = d_berry
            title = d_anjou
            title = d_normandy
            title = d_orleans
            title = d_champagne
            title = d_valois
            title = d_burgundy
            title = d_upper_burgundy
            title = d_savoie
            title = d_brabant
            title = d_flanders
            title = d_luxembourg
            title = d_upper_lorraine
            title = d_lower_lorraine
            title = d_alsace
            title = d_castilla
            title = d_aragon
            title = d_barcelona
            title = d_valencia
            title = d_mallorca
            title = d_navarra
            title = d_asturias
            title = d_leon
            title = d_galicia
            title = d_porto
            title = d_beja
            title = d_algarve
            title = d_cordoba
            title = d_murcia
            title = d_granada
            title = d_sevilla
            title = d_badajoz
            title = d_toledo
            title = d_tangiers
            title = d_fes
            title = d_alger
            title = d_tlemcen
            title = d_dyrrachion
            title = d_epirus
            title = d_thessalonika
            title = d_athens
            title = d_achaia
            title = d_aegean_islands
            title = d_turnovo
            title = d_karvuna
            title = d_adrianopolis
            title = d_thrace
            title = d_nikaea
            title = d_samos
            title = d_cibyrrhaeot
            title = d_thracesia
            title = d_anatolia
            title = d_paphlagonia
            title = d_armeniacon
            title = d_charsianon
            title = d_trebizond
            title = d_coloneia
            title = d_mesopotamia
            title = d_osterreich
            title = d_tyrol
            title = d_balaton
        }
    }
    
    is_valid = {
        ROOT = {
            independent = yes
            NOT = { same_realm = FROM }
        }
    }
    
    on_success = {
        any_attacker = {
            limit = { character = ROOT }
            participation_scaled_prestige = 100
        }
        any_attacker = {
            limit = { NOT = { character = ROOT } }
            hidden_tooltip = {
                participation_scaled_prestige = 100
            }
        }
        
        FROM = { prestige = -100 }
    }

    on_success_title = {
        custom_tooltip = {
            text = pagan_subjugation_tip
            hidden_tooltip = {
                ROOT = {
                    gain_settlements_under_title = {
                        title = PREV
                        enemy = FROM
                        type = invasion
                    }
                }
            }
        }
        if = {
            limit = {
                holder_scope = { character = FROM }
            }
            usurp_title_only = { target = ROOT type = invasion }
        }
    }

    on_fail = {
        ROOT = { prestige = -150 }
    }

    on_reverse_demand = {
        ROOT = {
            transfer_scaled_wealth = {
                to = FROM
                value = 4.0
            }
            ROOT = { prestige = -200 }
        }
        any_defender = {
            limit = { character = FROM }
            participation_scaled_piety = 100
            participation_scaled_prestige = 200
            if = {
                limit = {
                    uses_decadence = yes
                }
                participation_scaled_decadence = -10
            }
        }
        any_defender = {
            limit = { NOT = { character = FROM } }
            hidden_tooltip = {
                participation_scaled_piety = 100
                participation_scaled_prestige = 200
                if = {
                    limit = {
                        uses_decadence = yes
                    }
                    participation_scaled_decadence = -10
                }
            }
        }
    }

    attacker_ai_victory_worth = {
        factor = -1 # always accept
    }
    
    attacker_ai_defeat_worth = {
        factor = 100
    }

    defender_ai_victory_worth = {
        factor = -1 # always accept
    }
    
    defender_ai_defeat_worth = {
        factor = 100
    }
}

I'm pretty competent with modding most other Pdox games but CK2 is still fairly unkown to me modding wise so it's probably really obvious with my luck. No big deal if I can't get it to work, I just wanted to see how crazy I could get with the ERE starting in the last bookmark before I converted to EU4.
 
The most obvious thing I can think of is that some of the titles (e.g. e_western) don't exist in your mod, which might cause some problems. Other than that, can't immediately spot something that looks weird, though you probably should check if you have messed up any brackets elsewhere in the file.
 
Before a certain update, I remember that localisation files were loaded/prioritised in numerical then alphabetical order. Then after the said update, the rules were changed to the opposite where double lower case "z" became the priority. What is the case now?
 
Before a certain update, I remember that localisation files were loaded/prioritised in numerical then alphabetical order. Then after the said update, the rules were changed to the opposite where double lower case "z" became the priority. What is the case now?
"0" takes priority, so prefix all your files with "00_" and they should take priority over any vanilla file
 
This has probably been answered somewhere but if so, I have failed at finding it, so...

What is the most efficient way to have your mod require certain DLCs to be active? I know that on individual decisions and events you can use has_dlc = "whatever" but I am not willing to do that for every blasted event and decision I want to have that has a chance of using some DLC content.
 
I haven't tested it, but does adding the DLC in the dependencies line in the .mod file work? I know you can require other user mods that way, but haven't tried it with official DLC
 
  • 1
Reactions:
I haven't tested it, but does adding the DLC in the dependencies line in the .mod file work? I know you can require other user mods that way, but haven't tried it with official DLC
That was a great idea, but dependencies are only for controlling load order and aren't actually required.
 
  • 1
Reactions:
Hmmm, what about an event triggered by on_startup that checks if the DLCs are there, and if they aren't, tell the player, then switch the player to a theocracy, causing an instant game-over?
Instant game-over seems a bit harsh. If somebody forgets to activate the right DLCs before loading an Ironman game…
 
@NoxBestia: If you have MTTH or on_action events, I'm fairly certain that they all need to be individually checked for the DLC in one way or another. Decisions always need to be checked individually in one way or another.


In the unmodded game, DLC checks are done either directly (e.g. "has_dlc = "Reapers""), by checking something that requires the DLC (e.g. "trait = disfigured", as that trait only appears in vanilla if you have RD; if you were to add that trait without checking for RD you would invalidate the DLC check), or by checking something that ultimately depends on the DLC (e.g. "has_character_flag = looking_for_court_physician", as that flag only is set by an event that only is fired from a decision that requires RD; this check would not be a valid DLC check if you either fired the event that sets the flag from a decision, event, or pulse that does not check for RD or set the flag from an event, decision, or similar that does not ultimately depend on RD). As it is possible to make a mistake somewhere that can mess up a check that doesn't check for the actual DLC (e.g. by accidentally using an existing character flag), it is a good idea to actually check for the DLC at all times as that check will evaluate properly at all times (assuming it is set up properly, of course).

As mentioned above, MTTH and on_action events need individual checks, but if you have events triggered by other events (or by decisions) you only need to check for the DLC in the triggering event(s)/decision(s)/etc. For example, there is not a single check for WoL in wol_seduction_events.txt as the events there either require the Seduction focus (and thus WoL), are triggered from the Seduce targeted decision (which checks for WoL (and also the Seduction focus)), or (for the vast majority of the events) are triggered by other events that ultimately trigger from either the Seduce decision or an event that checks for the Seduction focus, thus removing a large number of checks while still ensuring that the events only can trigger for those with WoL.


If you are unlucky enough to have a lot of MTTH/on_action events (and you really should avoid the former, if possible, to optimize the mod), adding the check is still quite simple unless you have files where different DLCs are required for different events. Assuming you follow the style conventions of vanilla CK2 events, you will take care of many (though probably not all) of the cases by simply replacing "\n\ttrigger = {\r\n" with "\n\ttrigger = {\r\n\t\thas_dlc = [DLC]" (Note: "\ttrigger" is supposed to be written that way, not "\trigger", and you have to make sure that you use "Extended" search mode in Notepad++ (or the equivalent in whatever text processor you are using)) in your modded files. Again, decisions are not covered by this, though you can modify the approach and use "potential" instead of "trigger" and likely account for most of them, and, as mentioned above.

That said, you and you alone have to ensure that you don't miss something somewhere because an event doesn't have a trigger block, a trigger block does not follow the style conventions, some event options (as opposed to events) that only should appear with a certain DLC, etc.; no one else knows what you have done, so it is possible that something that you have done might not be covered by the checks that I or someone else here might think of.