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

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.348
1.965
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
One line summary of your issue
[2.8.1.1] [ISRM] "Saoshyant Descendant" not given to grandchildren whose parent is dead

Game Version
2.8.1.1

What expansions do you have installed?
All of the above

Do you have mods enabled?
No

Please explain your issue is in as much detail as possible.
As part of my Hepthalite run, I converted to Zoroastrianism and eventually became the Saoshyant.

Much later, I noticed that some of my grandchildren did not have the "Saoshyant Descendant" trait. Specifically: all children of my living children had the trait, whereas some children of my already-dead children did not have the trait.

I therefore suspected that, when I took the decision, Saoshyant Descendant was only applied to descendants of my living children.

I happen to know that Azerbaijan was the last duchy I conquered before taking the decision. I conquered it on 967.12.12. I checked through my descendants and they all fit the pattern - if my child had died before 967, their children were not flagged as Saoshyant Descendants.

For example (see screenshots), my daughter Dharmadasi had a son Gostana. She died in 953. Neither of them have the Saoshyant Descendant trait, despite actually being descendants.

Here is the code for the relevant event:

Code:
# Children gains Saoshyant Descendant trait from Saoshyant
character_event = {
    id = TOG.6001
    hide_window = yes
 
    is_triggered_only = yes
 
    has_dlc = "The Old Gods"
    has_global_flag = saoshyant_appears
 
    trigger = {
        OR = {
            mother = { trait = saoshyant }
            father = { trait = saoshyant }
            mother = { trait = saoshyant_descendant }
            father = { trait = saoshyant_descendant }
        }
        NOT = { trait = saoshyant_descendant }
    }
 
    immediate = {
        add_trait = saoshyant_descendant
        any_child = {
            character_event = { id = TOG.6001 }
        }
    }
}

I suspect the problem here is that character_events can only occur for living characters. (In my example, Dharmadasi doesn't get the event, so her son also cannot get the event and therefore he doesn't get the trait.)

I checked the scope documentation in the wiki, but nothing in there jumps out at me as an easy and elegant fix. Still, I have two possible suggestions:

Fix #1: Easy but incomplete & inelegant

Rewrite the event code (with lots of copy/pasting) to ensure that all living grandchildren and great-grandchildren get the trait. I'm not that familiar with CK2 modding, but I suspect it would look something like this:

Code:
# Children gains Saoshyant Descendant trait from Saoshyant
character_event = {
    id = TOG.6001
    hide_window = yes
 
    is_triggered_only = yes
 
    has_dlc = "The Old Gods"
    has_global_flag = saoshyant_appears
 
    trigger = {
        OR = {
            mother_even_if_dead = { trait = saoshyant }
            father_even_if_dead = { trait = saoshyant }
            mother_even_if_dead = { trait = saoshyant_descendant }
            father_even_if_dead = { trait = saoshyant_descendant }
            mother_even_if_dead = {
                mother_even_if_dead = { trait = saoshyant }
                mother_even_if_dead = { trait = saoshyant }
                father_even_if_dead = { trait = saoshyant_descendant }
                father_even_if_dead = { trait = saoshyant_descendant }
            }
            father_even_if_dead = {
                mother_even_if_dead = { trait = saoshyant }
                father_even_if_dead = { trait = saoshyant }
                mother_even_if_dead = { trait = saoshyant_descendant }
                father_even_if_dead = { trait = saoshyant_descendant }
            }
            mother_even_if_dead = {
                mother_even_if_dead = {
                    mother_even_if_dead = { trait = saoshyant }
                    father_even_if_dead = { trait = saoshyant }
                    mother_even_if_dead = { trait = saoshyant_descendant }
                    father_even_if_dead = { trait = saoshyant_descendant }
                }
                father_even_if_dead = {
                    mother_even_if_dead = { trait = saoshyant }
                    father_even_if_dead = { trait = saoshyant }
                    mother_even_if_dead = { trait = saoshyant_descendant }
                    father_even_if_dead = { trait = saoshyant_descendant }
                }
            }
            father_even_if_dead = {
                mother_even_if_dead = {
                    mother_even_if_dead = { trait = saoshyant }
                    father_even_if_dead = { trait = saoshyant }
                    mother_even_if_dead = { trait = saoshyant_descendant }
                    father_even_if_dead = { trait = saoshyant_descendant }
                }
                father_even_if_dead = {
                    mother_even_if_dead = { trait = saoshyant }
                    father_even_if_dead = { trait = saoshyant }
                    mother_even_if_dead = { trait = saoshyant_descendant }
                    father_even_if_dead = { trait = saoshyant_descendant }
                }
            }
        }
        NOT = { trait = saoshyant_descendant }
    }
 
    immediate = {
        add_trait = saoshyant_descendant
        any_child = {
            character_event = { id = TOG.6001 }
        }
    }
}

This is incomplete because it won't fix the theoretical problem where an immortal character takes the decision when they are approx 300 years old - ie. where they have living descendants with more than 3 dead generations between those descendants and the saoshyant.

The inelegance is, hopefully, obvious.

Fix #2: Complete & elegant but requires code change

Add a new scope: any_ancestor. This would scope to all characters that are direct ancestors of the current character.

Then, the code for the event could be altered to look something like this:

Code:
# Children gains Saoshyant Descendant trait from Saoshyant
character_event = {
    id = TOG.6001
    hide_window = yes
 
    is_triggered_only = yes
 
    has_dlc = "The Old Gods"
    has_global_flag = saoshyant_appears
 
    trigger = {
        any_ancestor = { trait = saoshyant }
        NOT = { trait = saoshyant_descendant }
    }
 
    immediate = {
        add_trait = saoshyant_descendant
    }
}

Steps to reproduce the issue.
I haven't actually tested this because it's somewhat tricky, even with console commands. However, I believe that this will illustrate the issue:

1. Fulfil all requirements for Saoshyant (do not take the decision)
2. Have grandchildren
3. Kill one of your sons/daughters who has children
4. Take the Saoshyant decision
5. The children of the son/daughter you killed in step 3 don't have the Saoshyant Descendant trait

Upload Attachment
 

Attachments

  • 20180420210222_1.jpg
    20180420210222_1.jpg
    456 KB · Views: 0
  • 20180420210255_1.jpg
    20180420210255_1.jpg
    441,2 KB · Views: 0
  • 20180420210257_1.jpg
    20180420210257_1.jpg
    446,5 KB · Views: 0
  • Ironman_Hepthalite3.ck2
    12,8 MB · Views: 0
Last edited:
Upvote 0

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.348
1.965
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
Actually, that's not sufficient to fix the problem, because TOG.6001 is only triggered for living children:

Code:
    become_saoshyant = {

       #snip

       effect = {
           set_global_flag = saoshyant_appears
           give_nickname = nick_the_saoshyant
           add_trait = saoshyant
           prestige = 500
           piety = 500
           
           hidden_tooltip = {
               narrative_event = { id = TOG.6000 }
               any_child = {
                   character_event = { id = TOG.6001 }
               }
           }
       }
       ai_will_do = {
           factor = 1
       }
   }

For Fix #1, you would update the decision code as follows:

Code:
    become_saoshyant = {

       #snip

       effect = {
           set_global_flag = saoshyant_appears
           give_nickname = nick_the_saoshyant
           add_trait = saoshyant
           prestige = 500
           piety = 500
           
           hidden_tooltip = {
               narrative_event = { id = TOG.6000 }
               any_child = {
                   character_event = { id = TOG.6001 }
               }
               any_child_even_if_dead = {
                   any_child = {
                       character_event = { id = TOG.6001 }
                   }
               }
               any_child_even_if_dead = {
                   any_child_even_if_dead = {
                       any_child = {
                           character_event = { id = TOG.6001 }
                       }
                   }
               }
           }
       }
       ai_will_do = {
           factor = 1
       }
   }

For Fix #2, you would need to add an any_descendant scope as well (in addition to the any_ancestor scope) and update the decision accordingly.