• 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.
Those operators were only introduced very recently, in the last major patch or so. Before that the only possible numerical comparator was =, which is why basically all the code still uses it that way.
 
Well, it seems like that's an unintended thing, so I might post a bug report on it. You'd think stuff that compares the religion of two characters could also just compare said religions directly; that it doesn't seems to be unintentional.
 
How to make regnal number appear after second name? For example Wilhelm Friedrich I instaed Wilhelm I Friedrich? I know it is possible to do as I noticed that Sultans of Rum with name Kilij Arslan gain thein regnal number after their second name.
Kilij Arslan has a non-breaking space between his names, not a regular space. On Mac, you get that by typing alt-space. It's not as standard on Windows, but you could try alt-0-1-6-0 (hold alt while typing the 4 digits on the keypad).
 
Is the allow = { } block in decisions always necessary, even if it's not doing anything? Take this code:
Code:
       from_potential = {
           ai = no
           has_global_flag = leadership_traits
       }
       potential = {
           is_liege_or_above = FROM
           trait = aggressive_leader
       }
       allow = {
           always = yes
       }
Could I get rid of that allow ={ } block, without it causing problems?
 
Is the allow = { } block in decisions always necessary, even if it's not doing anything? Take this code:
Code:
       from_potential = {
           ai = no
           has_global_flag = leadership_traits
       }
       potential = {
           is_liege_or_above = FROM
           trait = aggressive_leader
       }
       allow = {
           always = yes
       }
Could I get rid of that allow ={ } block, without it causing problems?
I think it is, but you could leave it empty.
 
How do you overwrite the vanilla holy sites? I was going to make a mod that moved the Germanic holy sites closer to Scandinavia, while the overwrite does work somewhat, I now have the issue that Germanic paganism has nine holy sites, which instantly crashes the game if you open up the religious panel. My code looks like this:
Code:
        c_uppland = {
        holy_site = norse_pagan
        holy_site = norse_pagan_reformed
        }
        c_aland = {
        holy_site = norse_pagan
        holy_site = norse_pagan_reformed
        }
        c_oland = {
        holy_site = norse_pagan
        holy_site = norse_pagan_reformed
        }
        c_bornholm = {
        holy_site = norse_pagan
        holy_site = norse_pagan_reformed
        }
        c_sjaelland = {
        holy_site = norse_pagan
        holy_site = norse_pagan_reformed
        }
        c_zeeland = {
            color={ 200 100 30 }
            color2={ 255 255 255 }
           
            b_middelburg = {
                }
            b_tholen = {
                }
            b_veere = {
                }
            b_cadzand = {
                }
            b_vlissingen = {
                }
            b_renesse = {
                }
            b_borsele = {
                }
            b_zierikzee = {
                }
            }
        }
        c_braunschweig = {
            color={ 192 192 192 }
            color2={ 255 255 255 }
           
                b_braunschweig = {
                }
                b_bielefeld = {
                }
                b_paderborn = {
                }
                b_hildesheim = {
                }
                b_waldeck = {
                }
                b_wolfenbuttel = {
                }
                b_helmstedt = {
                }
                b_gandersheim = {
                }
            }
        c_sjaelland = {
                color={ 216 50 50 }
                color2={ 255 255 255 }
           
                    swedish = Själland
                    norse = Sjælland
                    english = Zealand
           
                b_kobenhavn = {
                    swedish = Köpenhamn
                    norse = Hafn
                }
                b_roskilde = {
                }
                b_helsingor = {
                    swedish = Helsingör
                    norse = Helsingör
                }
                b_kalundborg = {
                }
                b_naestved = {
                    swedish = Nästved
                    norse = Næstved
                }
                b_slagelse = {
                }
                b_vordingborg = {
                }
                b_ringsted = {
                }
                b_lejre = {
                    norse = Hleiðra
                }
            }
            c_naumadal = {
                color={ 25 205 240 }
                color2={ 255 255 255 }
           
                b_tinghaugen = {
                }
                b_lade = {
                }
                b_logtun = {
                }
                b_levanger = {
                }
                b_hegra = {
                }
                b_maere = {
                }
                b_leksvik = {
                }
                b_halsstein = {
                }
            }

I thought removing the holy_site = norse_pagan and holy_site = norse_pagan_reformed lines from the vanilla titles would remove it but it seems not.


DD95C1866618AC016AF340FD3BEC8EE96C43CA21

Never mind, found the fix. What I did would have worked if it was a custom religion, however since I am modifying a vanilla religion I have to overwrite it by having the file keep the same name (landed_titles) rather than a custom named landed titles file.
 
Last edited:
Kilij Arslan has a non-breaking space between his names, not a regular space. On Mac, you get that by typing alt-space. It's not as standard on Windows, but you could try alt-0-1-6-0 (hold alt while typing the 4 digits on the keypad).
Just tested, it really works! Thank you!
I wonder why Paradox didn't used non breaking space in more names. It would prevent weird numeration of tibetan kings.
 
Woah, I just came back to update my mod for 2.8, and it is apparently broken.
My question is:

Did something fundamental change in regards to customizable localization?​

Because on the last patch I used to have a system in place to color-code text on my province modifier tooltips depending on certain situations. I haven't changed anything in regards to this system, because a fully custom system does not need compatching.
However, when I test it ingame now NONE of the custom text even appears.
Am I missing something? I might well be, I just can't find what would have changed so much from 2.7 to 2.8 here...

Just please don't tell me you have disabled custom localization on modifiers for whatever reason, because that would completely break my mod...
Okay I just checked, and it turns out my custom localization on laws still works.
This got me really worried now, that for some ridiculous reason province modifiers are no longer allowed to have custom localization. Or, more likely, it might be a bug.

Anyway, since probably very few people would know about this, because it's not really the mainstream modding approach, I'm asking @blackninja9939 or one of you other dev guys directly: Can you give me any insight about this problem? And please tell me there is a fix...
 
Can you have multiple ai_target_filter on a targeted decision, and if so, how does it work? If I had:
ai_target_filter = realm
ai_target_filter = rivals

Would that let the ai target both same realm characters and rivals, only rivals in the same realm, or would it just break it completely?
 
Okay I just checked, and it turns out my custom localization on laws still works.
This got me really worried now, that for some ridiculous reason province modifiers are no longer allowed to have custom localization. Or, more likely, it might be a bug.

Anyway, since probably very few people would know about this, because it's not really the mainstream modding approach, I'm asking @blackninja9939 or one of you other dev guys directly: Can you give me any insight about this problem? And please tell me there is a fix...
I am not aware of anything about custom localisation changing with regards to province modifiers, what exactly are you doing that no longer works?
 
I am not aware of anything about custom localisation changing with regards to province modifiers, what exactly are you doing that no longer works?
Hmm... okay, thanks.
Maybe I screwed something up and you have no fault...
I shall make a quick test mod to see if I can get it to work without the other moving parts of my mod. If it doesn't work then either, I will report back.
 
Can you have multiple ai_target_filter on a targeted decision, and if so, how does it work? If I had:
ai_target_filter = realm
ai_target_filter = rivals

Would that let the ai target both same realm characters and rivals, only rivals in the same realm, or would it just break it completely?
Probably would break, or maybe use only one of them.
 
Hmm... okay, thanks.
Maybe I screwed something up and you have no fault...
I shall make a quick test mod to see if I can get it to work without the other moving parts of my mod. If it doesn't work then either, I will report back.
@blackninja9939: Found the culprit!
Indeed something did change, I just totally didn't think about testing it until now.
Previously (in 2.7), I found out by trial and error that to display custom localization in province modifiers, I for some reason had to put a "ROOT." scope in front of them, which iirc was even case-sensitive. Like this:
Code:
testy_the_province_modifier_desc;§YYou will need to know this§!\nInfo: [ROOT.Testy_The_Custom_Localization_Test]
However, with the 2.8 update, this is no longer necessary and indeed does not work at all. Instead, I now must simply write:
Code:
testy_the_province_modifier_desc;§YYou will need to know this§!\nInfo: [Testy_The_Custom_Localization_Test]
Without the strange "ROOT." scope.

So while actually 2.8 is more logical now (imo), I wasn't aware of this tiny change. Might even have been a bug fix, I don't know, I only read 90% of the patchnotes ;)
Anyway, thanks for your time and sorry to have bothered you, you guys did a tremendous job on 2.8 and nothing wrong.
Well, at least I am placated now ^^
 
Can anyone figure out why this title does not show up in the game? It should show up as a titular title when using the title search in game but it does not for some reason.


Code:
k_thracia = {
    color = { 69 40 143 }
    color2 = { 255 255 23 }
   
    culture = greek
    pentarch = b_hagiasophia
    capital = 496    #Byzantion
    allow = {
        OR = {
            ai = no
            culture = greek
            NOT = {
                tier = king
            }
        }
    }
    orthodox = 5000 # Crusade target weight
    catholic = 2000 # Crusade target weight
    zoroastrian_group = 100 #Crusade Target Weight
}
 
Last edited:
Can anyone figure out why this title does not show up in the game? It should show up as a titular title when using the title search in game but it does not for some reason.


Code:
k_thracia = {
    color = { 69 40 143 }
    color2 = { 255 255 23 }
  
    culture = greek
    pentarch = b_hagiasophia
    capital = 496    #Byzantion
    allow = {
        OR = {
            ai = no
            culture = greek
            NOT = {
                tier = king
            }
        }
    }
    orthodox = 5000 # Crusade target weight
    catholic = 2000 # Crusade target weight
    zoroastrian_group = 100 #Crusade Target Weight
}
pentarch = barony is not valid in a title.
You need to specify pentarchy = yes/religion in the barony's definition itself.
 
pentarch = barony is not valid in a title.
You need to specify pentarchy = yes/religion in the barony's definition itself.
Three things, first of that stopped working before I added that line, secondly it works fine now that I moved it to a different file (no idea why it didn't work in the other file everything else in that file works), and thirdly, the game disagrees it you that line does exactly what it is supposed to and puts the kingdom of thracia under the constantinople pentarch.
I don't think that line is what you think it is, it assigns a kingdom under a pentarch it does not make a title a pentarchy title.

Funny enough though that line does not work for the titles left in the other file. Seriously maybe I should just get rid of my other_landed_title.txt because it simply does not seem to work as well as sticking them at the end of landed_titles.txt
 
Last edited:
Is it possible to scope to a random daughter?

I tried:

Code:
random_child = {
    if = {
        limit = {
            is_female = yes
        }
    }
}

But if I use this, any code I put after the limit will sometimes not get executed. I guess it scopes to a random child who is male, fails the limit and because of this doesn't execute anything after that. Is it in any way possible to scope to a random daughter?

Thank you in advance
 
Is it possible to scope to a random daughter?

I tried:

Code:
random_child = {
    if = {
        limit = {
            is_female = yes
        }
    }
}

But if I use this, any code I put after the limit will sometimes not get executed. I guess it scopes to a random child who is male, fails the limit and because of this doesn't execute anything after that. Is it in any way possible to scope to a random daughter?

Thank you in advance

You're analysis of what's going wrong is correct. You have to use:
Code:
literally_any_scope = {
    limit = { conditionals }
    effect
}

For example, in your case it would be:
Code:
random_child = {
    limit = { is_female = yes }
    effects
}

And for another example, to pick out the oldest legit son, you would use:
Code:
random_child = {
    limit = {
        is_female = no
        NOT = { trait = bastard }
        NOT = {
            any_sibling = {
                is_female = no
                NOT = { trait = bastard }
                is_older_than = PREV
            }
        }
    }
    effects
}
 
Last edited: