• 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.
Is it just me, or is this modifier (from 03_scripted_effects_sainthood.txt) never applied?

Code:
        #Have to be a Christian denomination with a potential Religious head, and have been singled out for Beatification
        modifier = {
            factor = 0
            NOR = {
                NAND = {
                    event_target:saint_person = {
                        religion = catholic
                    }
                    event_target:saint_person = {
                        religion = fraticelli
                    }
                    event_target:saint_person = {
                        religion = orthodox
                    }
                    event_target:saint_person = {
                        religion = iconoclast
                    }
                    event_target:saint_person = {
                        religion = nestorian
                    }
                    event_target:saint_person = {
                        religion = miaphysite
                    }
                    event_target:saint_person = {
                        religion = monophysite
                    }
                    event_target:saint_person = {
                        religion = monothelite
                    }
                    event_target:saint_person = {
                        religion = paulician
                    }
                    event_target:saint_person = {
                        has_religion_feature = religion_beatification
                    }
                }
                NOR = {
                    event_target:saint_person = {
                        has_character_flag = beatified
                    }
                    event_target:saint_person = {
                        has_religion_feature = religion_beatification
                    }
                }
            }
        }

The NAND will always be true, because it's impossible to be both Catholic and Fraticelli (for example), which means that the first NOR is always false, and the modifier is never applied. Or is something else going on with this?
 
First questions:
Is it possible to have two duchies on the same character with different successions for each (similar to Kingdoms?) If yes, how would you mod this?

Second question:
Do viceroyalties use the actual "appointment" succession listed in succession_laws.txt?
Or do they have their own (hardcoded?) succession?

Third question:
What happens If you use succession = { } on a viceroyalty?

Thank you! :)
 
I'm having unexpected trouble with using a trait in the trigger for my events.

My code looks basically like this:
Code:
# pick characters
character_event = {
    id = foo.1
    is_triggered_only = yes # by on_yearly_pulse
    hide_window = yes
    
    trigger = {
        trait = foo_trait
        any_friend = { always = yes }
        # other conditions go here
    }
    
    option = {
        any_friend = {
            character_event = { id = foo.2 days = 1 }
        }
    }
}

# run effects
character_event = {
    id = foo.2
    is_triggered_only = yes # by foo.1
    hide_window = yes
    
    trigger = {
        FROM = { trait = foo_trait }
        # other conditions go here
    }
    
    option = {
        log = "(FOO) Event run for [From.GetTitledNameWithNick] (who should have the trait) and [From.GetHerHis] friend [Root.GetTitledNameWithNick]"
        # effects go here
    }
}

However, checking the log, I can see that the event keeps firing for characters that do not have (and never had) the trait in question. Basically any pair of friends seems to be able to get the event.

I can't wrap my head around what might be going wrong here. Anyone have an idea?
 
I'm having unexpected trouble with using a trait in the trigger for my events.

My code looks basically like this:

However, checking the log, I can see that the event keeps firing for characters that do not have (and never had) the trait in question. Basically any pair of friends seems to be able to get the event.

I can't wrap my head around what might be going wrong here. Anyone have an idea?

Not entirely sure, however as you have "hide_window = yes" the events should not have options, use an immediate block instead.
Again, not 100% but the event log may be recording the event as running for characters as it does not use pre-triggers, which is not to say it's actually carrying out the the effects

may want to us num_of_friends = 1 (should be yes for 1 or more friends) in place of any_friend = { always = yes }

edit - the trait (foo_trait) what is it for/who would have it (eg only men, adults etc) - it'll help to suggest improvements
 
Last edited:
Code:
# pick characters
character_event = {
    id = foo.1
    is_triggered_only = yes # by on_yearly_pulse
    hide_window = yes

   # add pre-triggers unless you want to run for every character in game each year - so, alot
   
    trigger = {
        trait = foo_trait
        num_of_friends = 1
    }
   
    immediate = {
        any_friend = {
            character_event = { id = foo.2 days = 1 }
        }
    }
}

# run effects
character_event = {
    id = foo.2
    is_triggered_only = yes # by foo.1
    hide_window = yes
   
    trigger = {
        # FROM = { trait = foo_trait } # unneeded condition as should only trigger from characters with said trait
        # other conditions go here
    }
   
    immediate = {
        log = "(FOO) Event run for [From.GetTitledNameWithNick] (who should have the trait) and [From.GetHerHis] friend [Root.GetTitledNameWithNick]"
        # effects go here
    }
}
 
Apparently e_china_west_governor is the only title that can't be claimed. What are the possible dangers of removing can_be_claimed = no?
I doubt that a claim can accidentally be acquired during normal gameplay as succession is appointment based (meaning no pretenders) and fabrication by plot is only available against de jure liege and e_china_west_governor has assimilate = no.
 
If the governor loses a tyranny revolt, he'll abdicate and wind up with a strong claim.
Ahh thanks, didn't think of that. Creating an on_action event for on_new_holder which kills off any previous holder (and other claimant for good measure) should be sufficient to take care of that though. Can you think of anything else that could cause trouble?
 
I am trying to transfer an artifact from one character to the player, I've tried several ways of doing this, and this may be something trivial so I'll post it here. This is my code, what am I doing wrong as it just says 'transfer <blank>' so it isn't detecting the artifact I've scoped...

Code:
random_artifact = {
            limit = { artifact_type = weapon_bow_auriel }
            transfer_artifact = {
                from = event_target:falmer_vyrthur_bow
                to = ROOT
            }
}

Also i used
Code:
c_990001 = {
    save_event_target_as = falmer_vyrthur_bow
}
 
I am trying to transfer an artifact from one character to the player, I've tried several ways of doing this, and this may be something trivial so I'll post it here. This is my code, what am I doing wrong as it just says 'transfer <blank>' so it isn't detecting the artifact I've scoped...

Code:
random_artifact = {
            limit = { artifact_type = weapon_bow_auriel }
            transfer_artifact = {
                from = event_target:falmer_vyrthur_bow
                to = ROOT
            }
}

Also i used
Code:
c_990001 = {
    save_event_target_as = falmer_vyrthur_bow
}


I'd probably use "any_artifact". Post the full code? be able to help more then
 
I'd probably use "any_artifact". Post the full code? be able to help more then
Heres the code:
Code:
narrative_event = {
    id = falmer.17
    desc = EVTDESC_falmer_17
    picture = GFX_evt_vyrthur_vampire
    title = EVTNAME_falmer_17
    
    is_triggered_only = yes
    
    option = {
        name = EVTOPTA_falmer_17
        c_990001 = {
            remove_rival = ROOT
            clr_character_flag = do_not_disturb
            remove_trait = on_mission
            add_trait = known_vampire
            save_event_target_as = falmer_vyrthur_bow
        }
        
        any_artifact = {
            limit = { artifact_type = weapon_bow_auriel }
            transfer_artifact = {
                from = event_target:falmer_vyrthur_bow
                to = ROOT
            }
        }
        set_character_flag = vyrthur_evt_done
    }
}
 
I'm pretty sure you're trying to take the artifact from yourself (unintentionally)
Correct me if I'm wrong but, c_990001 is the character with the artifact?

Code:
narrative_event = {
    id = falmer.17
    desc = EVTDESC_falmer_17
    picture = GFX_evt_vyrthur_vampire
    title = EVTNAME_falmer_17
 
    is_triggered_only = yes
 
    option = {
        name = EVTOPTA_falmer_17
        c_990001 = { # currently scope character
            remove_rival = ROOT
            clr_character_flag = do_not_disturb
            remove_trait = on_mission
            add_trait = known_vampire
            any_artifact = { # checking currently scoped character for the artifact and changing the scope
                limit = { artifact_type = weapon_bow_auriel }
                transfer_artifact = {
                    from = PREV # the previous scope, aka c_990001
                    to = ROOT # the character the event is called on
                }
            }
        }
        set_character_flag = vyrthur_evt_done
    }
}

give that a crack.

When you scope for the artifact it needs to be from a character scope, it then searches the scoped character
 
I'm pretty sure you're trying to take the artifact from yourself (unintentionally)
Correct me if I'm wrong but, c_990001 is the character with the artifact?

Code:
narrative_event = {
    id = falmer.17
    desc = EVTDESC_falmer_17
    picture = GFX_evt_vyrthur_vampire
    title = EVTNAME_falmer_17
 
    is_triggered_only = yes
 
    option = {
        name = EVTOPTA_falmer_17
        c_990001 = { # currently scope character
            remove_rival = ROOT
            clr_character_flag = do_not_disturb
            remove_trait = on_mission
            add_trait = known_vampire
            any_artifact = { # checking currently scoped character for the artifact and changing the scope
                limit = { artifact_type = weapon_bow_auriel }
                transfer_artifact = {
                    from = PREV # the previous scope, aka c_990001
                    to = ROOT # the character the event is called on
                }
            }
        }
        set_character_flag = vyrthur_evt_done
    }
}

give that a crack.

When you scope for the artifact it needs to be from a character scope, it then searches the scoped character

Thanks that worked, guess you have to scope it, should have assumed o_O
I am still relatively new to modding so I guess it's not surprising I missed that
 
Any string can be in any localization file. So, if you are adding new ones, it's better to put them in a file specific to your mod to minimize conflicts

Complements and insults are optional.