• 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.
Can bloodline_effect_faster_hindu and bloodline_effect_convert_zhangzung_and_sumpa be replicated with other religions and cultures?

Yes. Note that the bloodline_effect lines just display the text, you'll still need to implement them. First, add a version for the religion/culture you want in common/modifier_definitions (just copy the original entry and rename the copy). Then add the new entry in a localisation file with the text for your version.
Next, the game can't actually reference the effect and instead needs you to set flags on the bloodline for it to reference. For consistency, I'd suggest bloodline_faster_<religion> and bloodline_<culture>
Now you need to actually implement the effect by editing the events. For the religion conversion, you need to edit event 900 (found in job_lord_spiritual.txt) and copy the part with bloodline_faster_hindu. In this case, in the mean_time_to_happen block, you'll want to add
Code:
modifier = {
    factor = 0.6
    religion = <religion>
    any_owned_bloodline = {
        has_bloodline_flag = bloodline_faster_<religion>
    }
}
For the cultural one, you'll need to edit both event 55000 (in culture_conversion_events.txt) and 925 (in job_steward.txt). In both cases, you'd editing the mean_time_to_happen block. Again, just copy the blocks referencing bloodline_songtsen_gampo and edit the copy to reference your cultures/

If these are the only events you are editing in those files, I'd suggest copying a new event file, making sure it comes after all the existing files alphabetically (So, something like zz_<modname>_modified.txt) and copying the events into that to edit them. This will reduce the chance of conflicting with other mods and reduce the effort of maintaining the files in case a different event in the original files gets changed. Some people will claim this isn't supposed to work, but in my experience, it works perfectly find, with the only side-effect being a single error in the Validator, which can be ignored.
 
Well I do use heirocratic in this case. And so far I don't get college of cardinals. In that mod there is .gui files but that's not something I know. By the way I know I'm asking much, but would you check that mod file when you have spare time?
I'm about to head out (Mother's Day), but I will try to take a look when I return. I did notice another thing you're want to change for compatibility with newer versions - there are some new religions which should have access to it, specifically Bon and Hellenic. I feel Hellenic should definitely be included, since the Pontifex Maximus was elected by the College of Pontifs in this manner historically.
 
Well then, I guess the wiki is wrong :confused:. Thanks for the help, I'll just assign it to every terrrain type or just include it in the gfx. I just want that nice highlight behind the wonder.
If the wiki says so I may then be wrong ;)
 
I'm trying to figure out how to make it so a character was crowned by a specific pope, or prince bishop. Adding the trait is easy, but it doesn't name any character specifically like it would if the coronation was done in game.

I'm also trying to figure out the same thing for baptisms as well.

Try setting a persistent event target on the crowned character pointing to the pope that crowned them, then having the localisation use that persistent event target.

I've tried doing that and I can't get it to work. I'm not the most advanced modder so I'm not even sure if I'm doing it right.

I've been trying all sorts of different things with the code for some time now and the closest I got was it saying that the character was crowned by himself as the Pope which makes no sense at all. It said "Crowned by Kaiser Karl. Below is the code that gave me the result. I pulled this code directly from Event HF.20372

Code:
       effect = {
           add_trait = crowned_by_pope
           save_persistent_event_target = { name = coronation_priest_per scope = ROOT }
       }

I've tried all sorts of different things to get it to say the Popes name, but non of them work and only leave the name part blank. I'm pretty sure it is a matter of replacing the ROOT.
 
What?! That was it! I was fiddling around with stupid on_action_events and governments :confused: but it was just where the text was in the file...

Silly Paradox
The thing is that the unreformed version refers to the reformed version (the line "reformed = canaanite_pagan_reformed"). For that to work, the reformed version has to already be defined, thus it has to come earlier in the file. It may seem silly to a non-programmer, but this sort of thing is quite common in programming.
 
I've tried doing that and I can't get it to work. I'm not the most advanced modder so I'm not even sure if I'm doing it right.

I've been trying all sorts of different things with the code for some time now and the closest I got was it saying that the character was crowned by himself as the Pope which makes no sense at all. It said "Crowned by Kaiser Karl. Below is the code that gave me the result. I pulled this code directly from Event HF.20372

Code:
       effect = {
           add_trait = crowned_by_pope
           save_persistent_event_target = { name = coronation_priest_per scope = ROOT }
       }

I've tried all sorts of different things to get it to say the Popes name, but non of them work and only leave the name part blank. I'm pretty sure it is a matter of replacing the ROOT.
In that event, ROOT points to the pope. If your event works has the crowned as ROOT, you'll need to scope to religion_head, then back to ROOT, and save the target as PREV. Also, looking at various events, and understanding how programming generally works, you should save the target first, *then* add the trait.
 
Well then, I guess the wiki is wrong :confused:. Thanks for the help, I'll just assign it to every terrrain type or just include it in the gfx. I just want that nice highlight behind the wonder.
If the wiki says so I may then be wrong ;)
Actually, "All"(or ALL/all) is a special case I added in so that it would be possible to have the background stay the same even when using mods that add new terrain types.
The right hand parameter should only be "phoenican_port" though :)

Should probably add an error message if the GFX entry can't be found. That would have shown that your string becomes "GFX_wonder_background_GFX_wonder_background_phoenican_port_small".
 
There're some attributions defined in "common\landed_titles\landed_titles.txt", such as
Code:
independent = yes # IsUnvassalizeable
strength_growth_per_century = %num%
dynasty_title_names = no
color = { r g b }
...

What could I do if I want to add/config them to a title in a event? Simply putting same command in script returns "Unexpected token:" error messenge.

I've tried "base_title" but It doesn't work. Not any of attributions were copied.
 
Hello. i was trying to make orthodox priest be able to marry, but still not inherit. So i added this line

priests_can_marry = yes
to orthodoxy and all of its heresies, but they still cant marry. how can i do it properly?
 

Attachments

  • upload_2019-5-13_7-57-14.png
    upload_2019-5-13_7-57-14.png
    4,3 MB · Views: 11
  • upload_2019-5-13_7-57-41.png
    upload_2019-5-13_7-57-41.png
    4,3 MB · Views: 10
Hello. i was trying to make orthodox priest be able to marry, but still not inherit. So i added this line

priests_can_marry = yes
to orthodoxy and all of its heresies, but they still cant marry. how can i do it properly?
In "common\religions\00_religions.txt" do
Code:
@@ -448,8 +448,7 @@ orthodox = {
       can_grant_invasion_cb = invasion
       can_call_crusade = no
       priests_can_inherit = no
+      priests_can_marry = yes

       can_retire_to_monastery = yes
       
       religious_clothing_head = 2
That works for me.
 

Attachments

  • ck2_143.jpg
    ck2_143.jpg
    496,2 KB · Views: 7
  • ck2_144.jpg
    ck2_144.jpg
    497,5 KB · Views: 6
. For that to work, the reformed version has to already be defined,
Except you can refer to other religions anywhere in the file with the intermarry parameter.

It's a weird quirk of however paradox programmed the reformation mechanics and really I would say its a bug.
It may seem silly to a non-programmer, but this sort of thing is quite common in programming.
Sure but not for class equivalents.
 
There're some attributions defined in "common\landed_titles\landed_titles.txt", such as
Code:
independent = yes # IsUnvassalizeable
strength_growth_per_century = %num%
dynasty_title_names = no
color = { r g b }
...

What could I do if I want to add/config them to a title in a event? Simply putting same command in script returns "Unexpected token:" error messenge.

I've tried "base_title" but It doesn't work. Not any of attributions were copied.

Not everything that can be set on a title, religion, etc can be changed by event. These seem to be features like that - they can only be set in advance. You might be able to pull some trickery by making two titles with the same localisation and CoA but different features, then having your event grant the new title, copy the laws and history, then destroy the old title, similar to how restoring the roman empire works (event LoR.20)
 
In that event, ROOT points to the pope. If your event works has the crowned as ROOT, you'll need to scope to religion_head, then back to ROOT, and save the target as PREV. Also, looking at various events, and understanding how programming generally works, you should save the target first, *then* add the trait.

I'm not working with an event, but with a characters history. I tried putting religion_head as the scope, but it didn't work.

I'm not going to lie I didn't understand half of what you said. Like I said I'm not the most advanced modder. Most of what I do is just copying code from somewhere else in the files and learning what it does from there. Explaining how to build code from scratch is probably going to be lost on me without an example.

All I want it to do is for the Crowned by Pope trait to say Crowned by "Insert Pope's Name".
 
I'm not working with an event, but with a characters history. I tried putting religion_head as the scope, but it didn't work.

I'm not going to lie I didn't understand half of what you said. Like I said I'm not the most advanced modder. Most of what I do is just copying code from somewhere else in the files and learning what it does from there. Explaining how to build code from scratch is probably going to be lost on me without an example.

All I want it to do is for the Crowned by Pope trait to say Crowned by "Insert Pope's Name".
Ouch. Character history is somewhat limited in what commands can be used. I don't see any event targets set in history, which you have to do to get the Pope's name. Is the character you want to do this for still alive at game start?
 
You should still be able to set the event targets in an effect block.

Try this:
Code:
religious_head = {
   ROOT = {
      save_persistent_event_target= { name = coronation_priest_per scope = PREV }
      add_trait = crowned_by_pope
   }
}


EDIT: If that doesn't work, try replacing religious_head with c_######, where ###### is the ID of the Pope at the time.
 
You should still be able to set the event targets in an effect block.

Try this:
Code:
religious_head = {
   ROOT = {
      save_persistent_event_target= { name = coronation_priest_per scope = PREV }
      add_trait = crowned_by_pope
   }
}


EDIT: If that doesn't work, try replacing religious_head with c_######, where ###### is the ID of the Pope at the time.

Thank You so much. While religious head didn't work the c_###### suggestion did work.

I also found out the same code works for Archbishop coronations as well. Now going to look into see if this could help with Baptisms.
 
Yep also got it to work for Baptisms as well which was probably more important than the Coronation thing. Here is the code I used as well for it in case anyone else needs it. Thanks You again Rydelfox for helping me. Would have still been at this for days trying to figure it out instead of working on the map repaint I'm working on.

Code:
effect = {
           c_###### = {
               ROOT = {
                   save_persistent_event_target= { name = baptizing_pope_per scope = PREV }
                   add_trait = baptized_by_pope
               }
           }
  }
 
If I have a yearly on_action event that makes sure every character has a variable, what would be the most efficient trigger to sort out the ones who already have it?

Should I just check for the variable or should I assign a character flag that I can then check with the pre_trigger?
 
hey all,

is it possible to mod the AI so that men no longer any women older than for example 5 years older than their own age? I'm getting tired of the AI randomly marrying their sons to women who are close to passing childbearing age.

I'm using HIP, not sure if that matters.

thanks!
 
hey all,

is it possible to mod the AI so that men no longer any women older than for example 5 years older than their own age? I'm getting tired of the AI randomly marrying their sons to women who are close to passing childbearing age.

I'm using HIP, not sure if that matters.

thanks!
"Difference in age" has a ~-5 factor while "Prestige Effects" has a ~+5 factor. It is not random and somehow reasonable they do so.
There's no way to add more opinion factors for marriage AFAIK. But I hope that it is not hard-coded and someone points out that I was wrong.