• 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.
How do i set an event trigger to happen every year on a specific day of a specific month?

I think that the best you can do is fire a hidden event on_chronicle start, that fires your desired event with a days offset so that your intended event arrives at the intended date.
 
I think that the best you can do is fire a hidden event on_chronicle start, that fires your desired event with a days offset so that your intended event arrives at the intended date.

Hmm. Sounds dirty heheh, but i'll take a look at it.

Another question though how do I make an notification message without the event popup that a county religion has converted. I tried hide_window = yes combined with notification = yes but that didn't do anything in terms of giving a notification. It only converted the county.

This is what i currently have:
Code:
province_event = {
    id = liberator.1001
    
    religion = the_liberator
    hide_window = yes
    notification = yes
    
    trigger = {
            owner = {
                NOR = {
                    religion_group = vampire
                    any_liege = {
                        relgion_group = vampire
                    }
                }
            }
    }
    
    immediate = {
        owner = {
            top_liege = {
                reverse_religion = ROOT
            }
        }
    }
}
 
Last edited:
Just a quick question: How do you make it so that you basically reverse engineer the general opinion modifier so that rather than influencing others opinions on you, it influences your opinion on everyone else.
 
One cause might having more than 5 councillors performing tasks in the same province.

Sadly that's not it. It'll still crash if it's the first councillor I use in a new game. I'm thinking the error might have to do with job_titles after all since the Validator doesn't seem to check it. I know it doesn't have to do with the job action itself, since assigning it to an unmoded councillor doesn't lead to a crash. Eh, maybe I need to create a custom 'can be this job' trigger for the allow clause?
 
Sadly that's not it. It'll still crash if it's the first councillor I use in a new game. I'm thinking the error might have to do with job_titles after all since the Validator doesn't seem to check it. I know it doesn't have to do with the job action itself, since assigning it to an unmoded councillor doesn't lead to a crash. Eh, maybe I need to create a custom 'can be this job' trigger for the allow clause?

The validator checks both job titles and honorary titles together with landed tirles in the "titles" checkbox.

Anyway post the code for that action here if you think it's that what it's buggy
 
The validator checks both job titles and honorary titles together with landed tirles in the "titles" checkbox.

Anyway post the code for that action here if you think it's that what it's buggy

I probably should have done that earlier :p and good to know about the Validator.

Code:
job_scholastic = {
    #is_spiritual = yes
    is_voter = yes
    attribute = learning
    dignity = 0.35
    opinion_effect = 10
 
    monthly_salary = 0.1
    monthly_prestige = 0.85
 
    allow = {
    is_adult = yes
    independent = no
    prisoner = no
    NOT = { trait = incapable }
    NOT = { trait = in_hiding }
    NOT = { has_character_modifier = resigned_in_anger }
    }
    gain_effect = {
    }
    lose_effect = {
        opinion = { who = FROM modifier = opinion_fired_from_council }
        opinion = { who = FROM modifier = opinion_recently_fired }
    }
    retire_effect = {
    }
    dismiss_trigger = {
        FROM = {
            NOT = {
                AND = {
                    has_law = succession_voting_power_1
                    ROOT = { is_powerful_vassal = yes }
                }
            }
        }
    }
 
    action = action_oversee_research
    action = action_compile_histories

    lift_fow = yes
}

Edit: I found the cause of the crash c: turns out I needed to add an entry in interface/avatars pointing to the mesh to use for the on-map councillor.
(Now onto coding some kind of block to get around the 'over 5 courtiers in the province' crash. Hopefully that won't be as tricky.)
 
Last edited:
Does on_new_holder also trigger when a new title is created? I.e. does it overlap with on_create_title? I want to make sure any title held by someone of a specific religion always has a certain law.
on_new_holder, on_new_holder_usurpation, and on_new_holder_inheritance cover all instances where a title has a new holder set.
This includes creating a new one, so that would go under on_new_holder.

It overlaps with on_create_title, yes. 100% overlap as far as I can tell.
 
  • 2
Reactions:
I have a serious problem.

So I created a culture called Aegyptian, which is basically a sort of andalusian but with greek portraits. I spawned a bunch of theses courtiers, like I normally do when I create a new cullture, and placed some as rulers in Egypt after I took them over as the Byzantines. Then, awhile later, I saw a randomly orthodox province in Pakistan, and I checked it out, and its randomly an Aegyptian guy who was granted the title by the king of Sindh. So I thought maybe I had accidentally done this, maybe by a give_title command gone wrong, when I noticed he was part of a dynasty with like, 207, completely unrelated people. I sort of ignored him and went back on playing, when I noticed two orthodox provinces in Cumania. Both of these turned out to be the same situation, but I decided again to ingnore it because its cumania and I dont care enough to fix it. Then, when looking at the counts and dukes of Francia, I found another one, and, like the rest, was granted his title by the highest ranking lord and was part of this large dynasty. I am afraid this will continue more and more and soon my whole game, (Which, by the way, has been perfectly crafted over hundreds of hours, well, for the most part) will be filled by these damned Ageyptians
 
In my mod none of the provinces our countries I added seem to appear on the map in-game, it is just completely black. The provinces.bmp, history/provinces, history/titles, etc. should all be ok. I have noooo idea why it's not working
 

Attachments

  • mod.zip
    4,8 MB · Views: 0
You may be lacking in dynasties defined for Aegyptians. Random characters (especially Doctors, if you have Reapers Due) can also be of any culture and may be given titles (especially Doctors, because they tend to be highly skilled).

So how many Dynasties should I have for the Aegyptians?
 
Okay so I figured out it was that for some reason none of the dynasties I created are working, Whats wrong with these?

1045112 = {
name="Sekhemib"
culture = Aegyptian
}
1045113 = {
name="Merneferre"
culture = Aegyptian
}
1045114 = {
name="Akeperenre"
culture = Aegyptian
}
1045115 = {
name="Djehutime"
culture = Aegyptian
}
1045116 = {
name="Khahotep"
culture = Aegyptian
}
1045117 = {
name="Kheperkare"
culture = Aegyptian
}
1045118 = {
name="Hsekiu"
culture = Aegyptian
}
1045119 = {
name="Nakhti"
culture = Aegyptian
}
1045120 = {
name = "Nebkheperure"
culture = Aegyptian
}
1045129 = {
name="Neferkamin"
culture = Aegyptian
}



I also tried those numbers as completely random numbers with tons of digits and it didnt work
 
I'm trying to write a mod that does some funky dynamic stuff with duchies, and I'm running into some really stupid roadblocks, that don't seem like they're actually as hard as I'm finding them to be, can anyone help?

1) In a province event, I want to be able to talk about all neighbouring provinces that are in the same realm. This seems impossible, because same_realm takes a character and I can't get the owners of two provinces both in scope to compare (and when I try with something like any_neighbour_province = { owner = { PREVPREV = { owner = { same_realm = PREVPREV } } } }, CK2's testevent looks *really weird* - like one of those scopes is just illegal in that context and it responds by putting it as a sibling but also sort of continuing along, or something...?) ... but surely this isn't that hard?

2) Similarly, also in a province event, I want to be able to check if a neighbouring province has any neighbors in the same de-jure duchy, and ... it's basically the same problem - I can talk about the duchy of a province, but I can't ask if that's the de-jure liege of ANOTHER province, because the scopes don't seem to be nestable properly.
 
I'm trying to write a mod that does some funky dynamic stuff with duchies, and I'm running into some really stupid roadblocks, that don't seem like they're actually as hard as I'm finding them to be, can anyone help?

1) In a province event, I want to be able to talk about all neighbouring provinces that are in the same realm. This seems impossible, because same_realm takes a character and I can't get the owners of two provinces both in scope to compare (and when I try with something like any_neighbour_province = { owner = { PREVPREV = { owner = { same_realm = PREVPREV } } } }, CK2's testevent looks *really weird* - like one of those scopes is just illegal in that context and it responds by putting it as a sibling but also sort of continuing along, or something...?) ... but surely this isn't that hard?

2) Similarly, also in a province event, I want to be able to check if a neighbouring province has any neighbors in the same de-jure duchy, and ... it's basically the same problem - I can talk about the duchy of a province, but I can't ask if that's the de-jure liege of ANOTHER province, because the scopes don't seem to be nestable properly.

Have you tried using event targets instead of prev's? I think something like

Code:
    immediate = {
        ROOT = { #the province. Default scope might point to the province or the owner, I always forget
            owner = { save_event_target_as = root_owner }
            any_neighbor_province = {
                limit = {
                    owner = {
                        same_realm = event_target:root_owner
                    }
                }
                #do your stuff
            }
        }
    }

should work for 1). You can modify that appropriately for 2) too. Remember that even if you want to make the scoping in an option block, the event target has to be saved it the immediate block.
 
  • 1
Reactions:
Ah, yeah, event targets seem to work, although I also have to use multiple events since I can't set the target in the trigger block, so I have to have events more or less unconditionally fire other events that do the actual work.

The performance is not great at first but improves over time, so I guess that's good enough. Thanks!
 
Is it possible to age a character - forward or back - through an event? or is it console only? Tried a few combinations of things and got nothing.

And, is it possible to restrict an option using trigger so if you have a specific courtier? Trying to make it so an option to kill a random child - using the same bit of script that the mystic healer does to pick and murder one of your children - but only pops up if you HAVE one of those children. I've got it killing kids okay, but you can still pick the option if you have no children. I was using the trigger condition as the same bit of text used to select the random child.
 
Is there any way to scope a tag or trait to only the heads of dynasties in the realm? I want to create an event that builds family palaces for the heads of dynasties, and then gives them a tag or marker called "paterfamilias".