• 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.
Oh you want to alter a faith's holy sites rather than make a custom faith? If so then just copy the religion file e.g. 00_germanic into your mod and make your changes. It will overwrite the vanilla file on game start. (so to test it you must start new game)
Hope that helps
 
You could if it has a 100% inheritance rate, but things get trickier otherwise, and at any rate, you'd also have to traverse down the family tree of women whose children are born into other dynasties, which sounds more taxing than my solution, though I grant it may not actually be in practice.

How about you make an event that automatically gives everybody with the original ancestor in their family tree the trait once they reach 25? That should still restrict it to descendants as well.
 
After I got some help (please refer to the first code), I was trying to figure out the trigger on my own, but I'm having some issues with it.
The option shouldn't appear unless a county follows a different faith.

For the second one, the option shouldn't appear unless there's a knight without the character modifier.


What should I write here -----> trigger = { }

Code:
option = {
        name = faith_province.1
        trigger = { }
      
        every_sub_realm_county = {
            limit = {
            holder = root
            NOT = { faith = root.faith }
            }
            set_county_faith = root.faith
        }
        
        }

Code:
option = {
        name = royal_elite_knight.1
        trigger = { }
        
        every_knight = {
        limit = {
        is_knight_of = root
        NOT = { has_character_modifier = royal_elite_knight_modifier }
        }
        add_character_modifier = { modifier = royal_elite_knight_modifier }
        }
        }
 
The option shouldn't appear unless a county follows a different faith.

For the second one, the option shouldn't appear unless there's a knight without the character modifier.

Code:
    trigger = {
        any_sub_realm_county = {
            holder = root
            NOT = { faith = root.faith }
        }
    }

Code:
    trigger = {
        any_knight = {
            is_knight_of = root
            NOT = { has_character_modifier = royal_elite_knight_modifier }
        }
    }

Unless the event trigger itself is dependent upon either of these options being available, be sure to code another option that either always appears or appears when neither of these are valid—if the event doesn't have any valid options, it can't fire!
 
Can you mod the game so that you can continue as normal when your heir is of a different dynasty?
 
Is there a way to get bool variable value in gui? I tried:
Code:
GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).GetValue.AsBool
GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).AsBool
GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).GetValue
(bool)GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).GetValue.AsBool
(bool)GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).AsBool
(bool)GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).GetValue
(bool)GetPlayer.MakeScope.Var( 'acs_sort_by_assending' )
(bool)(GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).GetValue.AsBool)
(bool)(GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).AsBool)
(bool)(GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ).GetValue)
(bool)(GetPlayer.MakeScope.Var( 'acs_sort_by_assending' ))
But nothings seems to work. acs_sort_by_assending is set to yes/no. I am using it in combination with BoolTo1And2 method. When I try BoolTo1And2( '(bool)yes') or BoolTo1And2( '(bool)no') it is working as expected.
 
  • 1
Reactions:
How about you make an event that automatically gives everybody with the original ancestor in their family tree the trait once they reach 25? That should still restrict it to descendants as well.

Since I was working on descendant traits for my mod, I'll answer this one. You'd need more than an event for this. First, going further I'm working on the assumption that the original ancestor gets the immortality trait from some other event or a decision. So, to make this work you'll need to create a generational trait scripted effect and add it to the initial event/decision (scripted_effect_name = yes).

The one used in holy bloodline decision is a good point of reference:
Code:
apply_generational_trait_bloodline_holy_decision_effect = {
    every_child = {
        even_if_dead = yes
        limit = { faith = root.faith }
        trigger_event = major_decisions.0101

        every_child = {
            even_if_dead = yes
            limit = {
                OR = {
                    is_grandchild_of = scope:progenitor_holy_blood
                    is_great_grandchild_of = scope:progenitor_holy_blood
                }
            }
            trigger_event = major_decisions.0101

            every_child = {
                even_if_dead = yes
                limit = {
                    OR = {
                        is_grandchild_of = scope:progenitor_holy_blood
                        is_great_grandchild_of = scope:progenitor_holy_blood
                    }
                }
                trigger_event = major_decisions.0101
            }
        }
    }
}

This way all descendants of the original immortal character that exist at the time of said character getting the immortality trait will get theirs too. But, as can be see here, it's not the scripted effect itself that does it. It instead triggers an event. So you'll have to create an event for this. Let's call it immortal_descendant.0001. Now let's also look at the event this triggers for reference as well:
Code:
major_decisions.0101 = {
    type = character_event
    hidden = yes

    trigger = {
        OR = {
            AND = {
                exists = mother
                mother = {
                    faith = root.faith
                    OR = {
                        has_trait = savior
                        has_trait = paragon
                        has_trait = divine_blood
                        has_trait = consecrated_blood
                    }
                }
            }
            AND = {
                exists = father
                father = {
                    faith = root.faith
                    OR = {
                        has_trait = savior
                        has_trait = paragon
                        has_trait = divine_blood
                        has_trait = consecrated_blood
                    }
                }
            }
            AND = {
                exists = scope:progenitor_holy_blood
                OR = {
                    is_grandchild_of = scope:progenitor_holy_blood
                    is_great_grandchild_of = scope:progenitor_holy_blood
                }
            }
        }
        NOR = {
            has_trait = savior
            has_trait = paragon
            has_trait = divine_blood
            has_trait = consecrated_blood
        }
    }

    immediate = {
        if = {
            limit = {
                OR = {
                    AND = {
                        exists = mother
                        mother = {
                            faith = root.faith
                            OR = {
                                has_trait = savior
                                has_trait = divine_blood
                            }
                        }
                    }
                    AND = {
                        exists = father
                        father = {
                            faith = root.faith
                            OR = {
                                has_trait = savior
                                has_trait = divine_blood
                            }
                        }
                    }
                }
            }
            add_trait = divine_blood
        }
        else = {
            add_trait = consecrated_blood
        }
        every_child = {
            trigger_event = major_decisions.0101
        }
    }
}

Obviously you'll have to alter things like the traits. We're talking about only one trait here, so that's all we need. If this thing is not tied to a specific religion, remove that condition as well. The important part to note here though is that this event has two alternative outcomes. The descendants of the character with the Savior trait get the Divine Blood trait, while the descendants of a character with the Paragon trait get the Consecrated Blood trait instead.

The reason why this is important is because in what you're asking you have two possibilities as well. The limit of the if function should have an age >= 25 as well. That way, descendants of the original immortal character that are at least 25 years old at the time when that happens will also become immortal. Since you want the other descendants to become immortal eventually as well, for the else part of the function you should set a character flag for them.

Something like:
Code:
add_character_flag = {
            flag = immortal_descendant
}

Now, you'll have to add the immortal_descendant.0001 event to on_birth_child on action in common\on_action\child_birth_on_actions.txt so that any further descendants that are born after the initial event/decision gave the trait to the founder will get the event as well. Since they're obviously not 25 when they are born, they will get the character flag instead.

Then you're going to create an on_25th_birthday on action with the following code:
Code:
on_25th_birthday = {
    trigger = {
        AND = {
            age = 25
            has_character_flag = immortal_descendant
         }
    }

    events = {
        immortal_descendant.0002
    }
}

The immortal_descendant.0002 event should simply give the immortal trait to the character this triggers for. Alternatively, if you have some other events planned for 25 year old characters, just use the age trigger for the on action itself and put the flag trigger to the immortal_descendant.0002 event.

Finally, you're going to add your custom on action to on_specific_birthday on action in common\on_action\birthday.txt so it should like this:
Code:
on_specific_birthday = {
    first_valid_on_action = {
        on_3rd_birthday
        on_6th_birthday
        on_10th_birthday
        on_15th_birthday
        on_16th_birthday
        on_25th_birthday
    }
}
 
Last edited:
I don't know if there's a pool running for 'most complicated thing to mod for the least amount of gain' but in case there is, I'd humbly like to submit: adding a new flavour name for knights (as in knights, champions, aswar, etc.). I've modded 00_knight_culture.txt and the accompanying localization file, and the game does recognise my new cultural name for knights correctly, but it doesn't show up everywhere it should. Individual characters are properly listed as 'eques'/'equites' but the word is missing from the tooltip on the knights button on the military pane, and on the raised army pane.

I presume this is defined in a separate file, but I can't seem to track it down anywhere. Anyone else have a clue?

EDIT: It was, unsurprisingly, just carelessness on my part. I never did work out where the typo was, but doing it all from scratch made things right.
 
Last edited:
Code:
    trigger = {
        any_sub_realm_county = {
            holder = root
            NOT = { faith = root.faith }
        }
    }

Code:
    trigger = {
        any_knight = {
            is_knight_of = root
            NOT = { has_character_modifier = royal_elite_knight_modifier }
        }
    }

Unless the event trigger itself is dependent upon either of these options being available, be sure to code another option that either always appears or appears when neither of these are valid—if the event doesn't have any valid options, it can't fire!

Thanks.
 
If anybody is interested here is a git patch with all the changes between 1.1.3 and 1.2 versions. You can find all changed files here, so you can check if you need to update your modes. Maybe we can make new sticky topic where we can track all CK3 changes.
 

Attachments

  • git_patch.zip
    3,5 MB · Views: 0
Last edited:
  • 1
Reactions:
Ayo. Is it possible to set a variable to reference a trait that can then be added to a character later?
There is no trait scope as much I have saw, so probably you cannot save it. What you can do is make delayed event for every trait you want to add.

Or you can save some flag on character (or value), and then do something like following:
Code:
if = {
    limit = { var:myflag = 1}
    add_trait = trait_1
}
if = {
    limit = { var:myflag = 2}
    add_trait = trait_2
}
if = {
    limit = { var:myflag = 3}
    add_trait = trait_3
}
if = {
    limit = { var:myflag = 4}
    add_trait = trait_4
}
if = {
    limit = { var:myflag =5}
    add_trait = trait_5
}
if = {
    limit = { var:myflag = 6}
    add_trait = trait_6
}
if = {
    limit = { var:myflag = 7}
    add_trait = trait_7
}
if = {
    limit = { var:myflag = 8}
    add_trait = trait_8
}
if = {
    limit = { var:myflag = 9}
    add_trait = trait_9
}
 
  • 1Like
Reactions:
If anybody is interested here is a git patch with all the changes between 1.1.3 and 1.2 versions. You can find all changed files here, so you can check if you need to update your modes. Maybe we can make new sticky topic where we can track all CK3 changes.

You're a godsend. CK3 automatically updated despite my telling it not to, and I was not looking forward to having to downgrade just for testing. Thanks!
 
Is it possible to change supply consumption for only certain men-at-arms types? Currently trying to create some regiments that use fewer supplies (or none if that isn't possible). There is "uses_supply = no" for spawned armies and supply_duration, either would work. But it doesn't seem like these can be used on anything but whole armies, is that correct? I have tried adding a buff to the innovation that unlocks the Men-at-Arms, but they are just seen as unexpected tokens.
 
I'm working on making a solution to the feast spam for larger realms without eliminating the whole mechanic of AI inviting you to feasts. Basically my idea is to limit the ability of a feast initiator to invite guests at most 2 tiers above or below them. This should stop the avalanche of mayors and counts that send and attend feasts and makes it more likely feast events will involve characters in your realm who are actually relevant. In this case an emperor would only get invites to feasts from Dukes or higher, and if an Emperor throws a feast, only Duke or higher vassals will attend. Also it might be worth adding a check for DIRECT vassals only. I don't really want say a King vassal's dozen duke vassals to clog up my feasts.

I'm a bit stuck as to where to add these checks; the feast activity folder has a LOT of stuff and I'm not sure what to modify. Any insights?
 
A small question: are there no province flags in CK3? I don't see any examples in game files, or even a mention in any .info files. Like with the ability to add opinion modifiers towards specific cultures, I really don't see why Paradox would limit modding capabilities in the sequel in such cases.

If anybody is interested here is a git patch with all the changes between 1.1.3 and 1.2 versions. You can find all changed files here, so you can check if you need to update your modes. Maybe we can make new sticky topic where we can track all CK3 changes.

Thanks for that, this is pretty useful. Also, to anyone who's not using WinMerge (or something similar) to update the game files they modded after the patch, I highly recommend it.