• 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.
Any ideas on why the Conclave DLC could make the game crash? Specifically in the context of adding and modifying governments. Generally crashes tend to be caused by incompatibilities with a new vanilla version, but on a crash caused specifically by one DLC I have trouble finding the cause, with neither the logs nor the Validator giving any clues.
 
Can anyone help me figure out why this event is not working as intended? It is supposed to save a bishop's primary title and liege, convert their religion, then restore their primary title and liege. It successfully transfers the title but instead of restoring their liege, it puts them other the ROOT scope for the event. Any idea why the event target isn't working properly?

Code:
any_realm_character = {
        limit = {
        is_theocracy = yes
        religion = catholic
        }
        primary_title = {
        save_event_target_as = held_bishopric
        }
        liege = {
        save_event_target_as = held_bishopric_liege
        }
        religion = fraticelli
        event_target:held_bishopric = {
        gain_title = prev
        }
        event_target:held_bishopric_liege = {
        prev = {
        set_defacto_liege = prev
        }
        }
        }
 
Can anyone help me figure out why this event is not working as intended? It is supposed to save a bishop's primary title and liege, convert their religion, then restore their primary title and liege. It successfully transfers the title but instead of restoring their liege, it puts them other the ROOT scope for the event. Any idea why the event target isn't working properly?

Code:
any_realm_character = {
        limit = {
        is_theocracy = yes
        religion = catholic
        }
        primary_title = {
        save_event_target_as = held_bishopric
        }
        liege = {
        save_event_target_as = held_bishopric_liege
        }
        religion = fraticelli
        event_target:held_bishopric = {
        gain_title = prev
        }
        event_target:held_bishopric_liege = {
        prev = {
        set_defacto_liege = prev
        }
        }
        }

The in game tooltip shows that it is indeed recognizing the event target, reading (for example) "Duke Louis:Bishop Thomas:King Philip VI becomes Bishop Thomas's new liege." So something is wrong with the "set defacto_liege = prev"
 

  • Code:
    any_realm_character = {
        limit = {
            is_theocracy = yes
            religion = catholic
        }
        save_event_target_as = whatever
        event_target:whatever = {
            liege = {
                event_target:whatever = {
                    primary_title = {
                        gain_title = PREVPREV
                    }
                }
            }
        }
    }
 
What happens when two dynasties have the same ID in the files? I realized that I've had multiple dynasties with the same code. Also, if I change the codes now, will it change the dynasties of the characters in my save game?


Additionally, is there any limit to how long a dynasty ID can be?
Everyone who is assigned to the dynasty listed first in the dynasties file will be reassigned to the second one, breaking the dynasty tree (and causing weird succession). I know this because Paradox accidentally reused some dynasty numbers for new dynasties in the Iron Century patch, so don't feel too bad for making that mistake yourself!
 
As someone who understands coding and moding as much as cat understands geography of antartica, how could i get map from hoi4 into ck2? (note i dont all the provinces, i just need a shape of continents, and a way to make my own provinces in ck2)
 
Last edited:
As someone who understands coding and moding as much as cat understands geography of antartica, how could i get map from hoi4 into ck2? (note i dont all the provinces, i just need a shape of continents, and a way to make my own provinces in ck2)

I've got no idea what the HoI4 map files look like (looking at the relevant wiki, definitions.csv definitely isn't structured in the same way, but since you would be redoing the provinces anyway that's probably not a problem), but a good place to start would probably be to try to copy over the ones that have the same name and structure to the directory for your mod (don't replace the base CK2 files) and then follow the instructions here.

However, map modding isn't particularly easy, and several of the steps are quite tedious and time-consuming, so I'd not suggest doing it if you're not already familiar with modding, particularly not since chances are you'll need to tweak various other things to make things work on your new map even if you don't intend to actually make anything not in CK2 playable (and if you intend to do that, the workload increases quite a bit as you'll need to create new history files, new titles, new CoAs, probably new religions and cultures, and other new things and various existing mechanics might need major overhauls to work).
 
I would like to know if the Great Library rare books event triggers per library built? So if I have 5 great libraries do I more likely get the event pop up? I could not find the event file related to it. Can someone give some pointers?
 
Hey, another dynasty question. So I have a save where I messed up some dynastys for a custom culture I put in, by 1. using the same code as other dynasties and 2. forgetting a bracket thing after one of the dynasty names so only 9 of the new dynasties I made were used. Since then, I've added a new culture with unique dynasty codes but the same dynasty names, and initially had the issue with the bracket again. However, I never made a save with the issue and fixed the bracket before saving my game at all with the new culture.

My issue now is that, despite character creator showing all the new dynasties I put in for my new culture (when pressing randomize), in my save, I seem to only get those first 9 dynasties appearing.

Any help?
 
Got a question. Going to toss together a personal mod, and perhaps if I can get a refined product release might turn it into something that is worthy of release further down the line. Anyways got a basic titular title created, with culture restrictions and the like, but it seems to me that the best way of handling it would be to have a decision fired to create it (and perhaps structured for room for an event) which would take the duchies required and would add them to the Kingdom while taking the remaining duchy of the kingdom that has most of its duchies ripped away would be added to another for the same of cleanness and making sense.

Do have an idea of how to do some of it from looking at some of the formation decisions, and trying to root around for more inspiration, but since I just started modding in this manner a couple days ago have little to no idea of what to do. I'd probably be able to kludge together by rooting through the game files even more, reading the wiki, and rooting through mods to see what they do, but I figure that getting advice here would make things much cleaner.
 
Got a question - I'm trying to add two new sea provinces - they aren't nearby to one another (I'm slightly unsure how to take the description of contiguous on the wiki so not sure if this matters). I've drawn them on the map, created an entry for them in map\definition, added localisation for the zone, and increased the number in the default.map file and written
sea_zones = { 1165 1166 }
beneath the previous entry for sea zones, in the default.map file. but they don't appear as a new sea zone - they are sort of there as a floating piece of text with the localisation where the zone should be, but there are no border markings and the zone cannot be navigated to - what am I missing?
 
Got a question - I'm trying to add two new sea provinces - they aren't nearby to one another (I'm slightly unsure how to take the description of contiguous on the wiki so not sure if this matters). I've drawn them on the map, created an entry for them in map\definition, added localisation for the zone, and increased the number in the default.map file and written
sea_zones = { 1165 1166 }
beneath the previous entry for sea zones, in the default.map file. but they don't appear as a new sea zone - they are sort of there as a floating piece of text with the localisation where the zone should be, but there are no border markings and the zone cannot be navigated to - what am I missing?

First off, if you're adding the provinces on the vanilla map (you didn't say if that was the case or if it wasn't), you need to use different province IDs, since the two you're using are used already (both are land provinces in India).

If the provinces in question aren't adjacent to another (or, if you add more than two, chained together through one another in some way; a major_river could be converted to a single sea_zones entry as the provinces there are connected), I believe they're not considered contiguous. That means you'll have to create two separate sea_zones regions (and both should be located after the last entry you had before)

Code:
# Note that these IDs won't work in vanilla
sea_zones = { 1165 1165 }
sea_zones = { 1166 1166 }

To make them into proper seas, they need to be part of an ocean_region together with any sea_zones that they're connected to. ocean_regions contain the indexes for sea_zones (NOT province IDs). Assuming you started with the vanilla map, your sea_zones would have indexes 20 and 21. Assuming you want them to be part of the "European Ocean" ocean_region, you'd then simply change the definition of that to

Code:
ocean_region = {   # European Ocean
   sea_zones = { 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 21}
}

After this is done, the sea zones in question should be fully navigable (assuming they're connected in some fashion to the other provinces in the same region).
 
Hi, I'm just getting back into CK2 modding after a hiatus of several years, so I'm very rusty with event/scripting stuff.

I created some new minor titles for my small personal mod, and I think I have them set up and working okay, but I wanted to make sure that they are lost when the holder becomes king/emperor, as they're really only meant for heirs.

Firstly, what is the correct trigger to use here? I'm guessing something like this:

Code:
NOT= {
        primary_title = {
            OR = {
                tier = king
                tier = emperor
            }
        }
}

Secondly, I'd like to set up one of these titles so that an event fires whenever the title is lost (due to the holder dying or becoming king/emperor himself) - I assume that's what the 'lose_effect = {' part is for, but I'd like to know how to set it to fire an event that only fires for people in that realm. I don't want every character in the world being told that some random guy in the kingdom of Burgundy has died. :p

Ideally it would be nice if the event only fired for every count tier character or above in the top realm (Francia, HRE, Hispania, etc.) the title is related to. Does that make sense?

So, two examples:

A) John is duke of York and holds the minor title of co-king of England, which is a title he holds as heir to the throne because he has been granted it by his father the king. The king dies and John becomes king by primogeniture, and so he should automatically lose the co-king minor title (so I need a trigger for that to happen), and every landed (count or higher) character within de jure Britannia (the empire title) should get an event saying that John is no longer co-king because he has become full/proper king.

B) John is duke of York and holds the minor title of co-king of England, which is a title he holds as heir to the throne because he has been granted it by his father the king. He dies prematurely, before his father, and every landed (count or higher) character within de jure Britannia (the empire title) should get an event saying that John has died and never managed to become king in his own right.

So what I'm after is a kind of template for a news event that only fires for landed feudal characters within de jure Britannia, and only fires under those particular circumstances, which I assume is via the 'lose_effect = {' part.

Thanks, and hope it's pretty simple!
 
Also is there a modifier for a minor title to make the holder more likely to be voted for in elections/tanistry?
 
IN DESPERATE NEED FOR HELP. Currently submodding HIP. I am including an on_action End of the Reconquista event which must fire immediately after there are no provinces under muslim rule. The event must fire for everybody.

It fires in case of the last muslim ruler converts, the last muslim realm is inherited by a christian, or a war takes away the iberian titles of the last muslim realm. This is the on_action file. I also included a on_yearly_pulse condition in case none of the mentioned events happen and yet somehow there are no muslims left in Iberia
Code:
on_yearly_pulse = {
    events = {
        ri.0015
    }
}
on_character_convert_religion = {
    events = {
        ri.0015
    }
}
on_new_holder = {
    events = {
        ri.0015
    }
}
on_war_ended_victory = {
    events = {
        ri.0015
    }
}

The actual events are:
Code:
# Detect end of the Reconquista
character_event = {
    id = ri.0015
    hide_window = yes
    is_triggered_only = yes
    trigger = {
        NOT = {
            any_province = {
                county = {
                    region = world_europe_west_iberia
                }
                owner = {
                    OR = {
                        AND = {
                            independent = yes
                            NOT = {
                                religion_group = christian
                            }
                        }
                        top_liege = {
                            NOT = {
                                religion_group = christian
                            }
                        }
                    }
                }
            }
        }
    }
    immediate = {
         narrative_event = { id = ri.0016 }
    }
}

# End of the Reconquista
narrative_event = {
    id = ri.0016
    desc = EVTDESC_HF_49452
    title = EVTTITLE_HF_49452
    picture = GFX_evt_beatification
    border = GFX_event_narrative_frame_religion
    is_triggered_only = yes
    major = yes
    option = {     
        name = EVTOPTA_HF_49452
        trigger = {
            religion_group = christian
        }
    }
    option = {
        name = EVTOPTB_HF_49451
        trigger = {
            NOT = {
                religion_group = christian
            }
        }
    }
}

The events lack things like flags so they only fire once and things like that. However those have nothing to do with my problem. What happens is I get this result. I assume I get an event for each character in the world

upload_2019-8-6_17-32-38.png
 
I assume I get an event for each character in the world
Well yes every single character has a yearly pulse and your conditions will be true for all of them, that's why vanilla only fires important golbal events on the pope and hip uses the isis character the same way. Restrict your event trigger to only fire on one of those and the major = yes flag will make it appear for everyone.
 
So how do you get an event to fire for everyone in a de jure realm? :(

Do primary title -> top liege triggers work even if those titles don't yet exist?
 
Well yes every single character has a yearly pulse and your conditions will be true for all of them, that's why vanilla only fires important golbal events on the pope and hip uses the isis character the same way. Restrict your event trigger to only fire on one of those and the major = yes flag will make it appear for everyone.

Makes no sense. I have used the same algorythm to fire other events for several characters at the same time an those work correctly. Also, the on_yearly_pulse one works fine. It's the on_character_convert_religion, on_new_holder and on_war_ended_victory cases that are doing the event bombing. Anyway I tried your solution by changing the "immediate" part

Code:
immediate = {
        c_606060 = { narrative_event = { id = ri.0016 } } #Isis id = 606060
    }

but it didn't work, so either I am doing it wrong or that was not the problem.

I suspect it may have to do something with the ROOT and FROM and how those on_action clauses handle them but it's just guessing. Everything I learned about modding ck2 has been basically through reverse engineering, since the wiki leaves much to be desired, so there are may be "simple" things I have yet to understand. If you could be more precise about how to fix the events I would appreciate