• 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.

SCSTAR

Recruit
32 Badges
Sep 26, 2019
5
0
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Victoria 2
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Empire of Sin
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Darkest Hour
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
I am trying to make a mod that creates a succession law for the Ecumenical Patriarchate. It is meant to be a variation of elective; in the final version, I want the current EP, the Byzantine Emperor (or other top liege), and all bishops in the EP's pentarchate to be electors.

I want eligible candidates to be all Orthodox temple holders within the EP's pentarchate.

For right now, I'm having a lot of trouble with the code, and I'm trying to build it up piece by piece. I've been able to get the new succession law on the k_orthodox title, and I have successfully made the EP and the Emperor as the only two electors; I have written code that I thought would make the other bishops under the EP electors as well, but that doesn't seem to work.

I've also written a wide variety of dummy conditions for the candidate_trigger block to experiment with it, because it doesn't seem to be working as I would expect. Eventually, what I figured out is that it is always restricting the candidate_trigger to my (Byzantine Empire's) direct vassals and their courts. For example, if I set it as candidate_trigger = { always = yes }, it doesn't allow me to select anyone outside the Empire to inherit, and it also doesn't allow me to select anyone who is a vassal of my vassal (count under my duke, etc). There seems to be an exception for characters who BOTH have a claim on k_orthodox AND meet all conditions in the code, regardless of whether or not the code refers to a claim at any point.

Can anyone tell me what I'm doing wrong/how to fix this code so that characters outside the realm or in sub-vassal courts are eligible?

Code below:

candidate_trigger only:

candidate_trigger = {

FROM = {
AND = {
top_liege = { has_landed_title = e_byzantium }
primary_title = { tier = COUNT }
}
}
}
full voting rules code:


patriarchal_elective = {
candidate_trigger = {

FROM = {
AND = {
top_liege = { has_landed_title = e_byzantium }
primary_title = { tier = COUNT }
}
}
}
candidate_vote_score = {
days = 0

}
elector_selection = {
days = -5
additive_modifier = { #test modifier to learn syntax, make the emperor hardcoded elector
value = 100
has_landed_title = e_byzantium
}


additive_modifier = { #The patriarch is the first voter
value = 100
FROMFROM = {
holder_scope = {
character = ROOT
}
}
}
additive_modifier = { #The other bishops are secondary voters
value = 90
is_theocracy = yes #Lives in a theocracy
is_ruler = yes #Is the bishop
FROM = { #Same patriarchate
holder_scope = { religion_head = ROOT }
}
}

}
elector_vote_strength = {
days = 1
}

}
 
You can use a cached trait, since characters with one are always potential candidates in any elective succession. The pool is otherwise rather restricted for performance reasons.
 
You can use a cached trait, since characters with one are always potential candidates in any elective succession. The pool is otherwise rather restricted for performance reasons.
I was unaware of this. I assume you mean the pool BEFORE elector triggers are applied? Any idea on the specifics of the restrictions?
 
I was unaware of this. I assume you mean the pool BEFORE elector triggers are applied? Any idea on the specifics of the restrictions?

From experimenting with this over the last 3-4 days before I knew about cached traits, I can tell you it seems to always include:

- direct vassals of the top liege
- close relatives (of the ruler)
- Characters with a claim on the title
 
Patch 3.0.1 lists a few:
  • Extended potential elective candidates and electors to include direct liege court and vassals and all de facto above lieges.
  • Extended potential elective candidates and electors to include any character with a cached trait, this will unfortunately require some careful triggers to avoid some global characters ending up electors for a bunch of elective successions.
My tests show that all rulers below the title holder and the title holder's court are always included in the pool for candidates and electors.
 
Is there a way to remove these default character from the pool?
Well, there are two things going on here:

The candidate_trigger block specifies the qualifications to be elected. You can make this whatever you want: a certain age, a certain relationship to the current ruler, a trait, a religion, anything you can describe in the script.

But the "pool" is the set of candidates the game bothers to check. A character outside the pool won't be electable even if they meet the criteria, because the game won't look to see if they meet them or not. And as far as we've been able to piece together in this thread, the pool includes:

- Characters with a cached trait (Thanks Whizzer)
- the groups I mentioned above

There is no way that I know of to remove characters from the "to be checked" pool, but excluding them from the actual succession is as easy as adding the relevant condition to the candidate_trigger block.
 
There is no way that I know of to remove characters from the "to be checked" pool, but excluding them from the actual succession is as easy as adding the relevant condition to the candidate_trigger block.
Thanks. I ask so because I'm unable to exclude a non-landed close relatives of the ruler from the list by candidate_trigger "is_landed = yes".
I have to check my script again, must be some bad logic there...
 
Thanks. I ask so because I'm unable to exclude a non-landed close relatives of the ruler from the list by candidate_trigger "is_landed = yes".
I have to check my script again, must be some bad logic there...

Weird. I am pretty new at modding so I don't know how much I can help, but I'd be happy to take a look at your script if you want to post it and see if I spot anything.

One thing I have noticed is that a lot of times in the vanilla scripts "is_landed = yes" and "is_ruler = yes" are right next to each other; logically, you shouldn't need both but maybe for some reason you do. Have you tried that?

EDIT: FWIW, it's definitely possible to exclude close relatives of the ruler. I've got my mod working as intended right now (only allowing Orthodox bishops to succeed), and in prior iterations I tested it with "only eunuchs can succeed" and a few other conditions, and they all successfully excluded close relatives of the current EP.
 
One thing I have noticed is that a lot of times in the vanilla scripts "is_landed = yes" and "is_ruler = yes" are right next to each other; logically, you shouldn't need both but maybe for some reason you do. Have you tried that?
"is_landed = yes" implies "is_ruler = true". Vanilla CK2 somehow uses both of them but I don't know what the intention of devs.

And my problem is solved. I fixed it by brutally inserting "is_landed = yes" in the first line of the candidate_trigger block.
I give up fiddling with trigger_if/trigger_else_if/OR/blahblahblah structure. May god bless me.
 
I am trying to make a mod that creates a succession law for the Ecumenical Patriarchate. It is meant to be a variation of elective; in the final version, I want the current EP, the Byzantine Emperor (or other top liege), and all bishops in the EP's pentarchate to be electors.

I want eligible candidates to be all Orthodox temple holders within the EP's pentarchate.

For right now, I'm having a lot of trouble with the code, and I'm trying to build it up piece by piece. I've been able to get the new succession law on the k_orthodox title, and I have successfully made the EP and the Emperor as the only two electors; I have written code that I thought would make the other bishops under the EP electors as well, but that doesn't seem to work.

I've also written a wide variety of dummy conditions for the candidate_trigger block to experiment with it, because it doesn't seem to be working as I would expect. Eventually, what I figured out is that it is always restricting the candidate_trigger to my (Byzantine Empire's) direct vassals and their courts. For example, if I set it as candidate_trigger = { always = yes }, it doesn't allow me to select anyone outside the Empire to inherit, and it also doesn't allow me to select anyone who is a vassal of my vassal (count under my duke, etc). There seems to be an exception for characters who BOTH have a claim on k_orthodox AND meet all conditions in the code, regardless of whether or not the code refers to a claim at any point.

Can anyone tell me what I'm doing wrong/how to fix this code so that characters outside the realm or in sub-vassal courts are eligible?

Code below:

candidate_trigger only:


full voting rules code:
Yo could you explain how you got this to work? It's an awesome idea but I've not been able to replicate it.