• 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 there an easy way to make an event trigger only once?
If not is it possible to use the following as a pre-trigger:
Code:
NOT = { has_global_flag = example }
Also how does mod load order work in this game?

- Global flags (or province flags, or title flags, or (if you can guarantee that they are alive) character flags) are the best way to ensure that an event only will fire once.

- I don't believe NOT blocks can go into the pre-triggers, but you can put in in the trigger block.

- Not sure, I don't tend to use multiple mods that could interfere with one another at the same time.
 
Also how does mod load order work in this game?
They load alphabetically as with all other files. You can add
Code:
dependencies = { "some other mod" }
in your .mod to ensure that the other mod will be loaded before this mod and files in this mod will override those in the other mod.
 
They load alphabetically as with all other files. You can add
Code:
dependencies = { "some other mod" }
in your .mod to ensure that the other mod will be loaded before this mod and files in this mod will override those in the other mod.
Ah, ok, so when I have a mod that starts with "A" and another, that starts with "V", the A-Mod will load and the V-Mod will not load those parts, that are already loaded by A?
 
Ah, ok, so when I have a mod that starts with "A" and another, that starts with "V", the A-Mod will load and the V-Mod will not load those parts, that are already loaded by A?
I think the A mod would load, then the V mod would load and overwrite any files that it shares with A with it's own version. However, I have not tested this extensively, and it doesn't seem to be well documented. It would, however, be consistent with how mods interact with vanilla files.
 
Ah, ok, so when I have a mod that starts with "A" and another, that starts with "V", the A-Mod will load and the V-Mod will not load those parts, that are already loaded by A?
The other way around: the ones loaded later will overwrite those loaded earlier.
 
Is it possible to localise bishop titles based on culture? If so, how would I do so?
There are localization tags like:
Code:
temple_baron_christian;Bishop;Évêque;Abt;;Obispo;;;;;;;;;x
temple_baron_female_christian;Bishop;Évêque;Bischof;;Obispo;;;;;;;;;x
temple_barony_of_christian;Bishopric of;Évêché de;Abtei von;;Obispado de;;;;;;;;;x
I'm pretty sure you can replace christian with a culture. I'm not sure which will get used if a bishop has both your chosen culture *and* a religion matching any localized version.
 
The other way around: the ones loaded later will overwrite those loaded earlier.
Also, mod name order only applies to 2 versions of the same file. If you have 2 *different* files in the same folder in different mods (plus vanilla files), for example landed_titles_A.txt in one mod and landed_titles_B.txt in another mod, the order of the *file* names is what matters.
 
I'll rephrase my question: Is it possible to have an event which destroys a specific building? Something like
Code:
destroy_building = ca_keep_3
To destroy Castle Keep 3?
 
Is
Code:
someguy = {
    reverse_culture = otherguy
}
equivalent to
Code:
someguy = {
    otherguy = {
        culture = PREV
    }
}
, replace "someguy" and "otherguy" with proper scopes? I'm trying to make a bandaid fix to replace all reverse_culture, but I never used reverse_culture before so I want to be sure.
 
Is
Code:
someguy = {
    reverse_culture = otherguy
}
equivalent to
Code:
someguy = {
    otherguy = {
        culture = PREV
    }
}
, replace "someguy" and "otherguy" with proper scopes? I'm trying to make a bandaid fix to replace all reverse_culture, but I never used reverse_culture before so I want to be sure.

Yep those are the same thing
 
Hi. I'm trying to create an event so that if the Emperor of China has an existing son, the empire will go to him, instead of creating a new character. However, when the event fires, the game crashes. I suspect that I can't scope to the emperor's children in the way that I did, but I'm not sure how else I should do it.

Code:
character_event = {
    id = MAINTFLAV.57
    
    hide_window = yes
    offmap = only
    
    is_triggered_only = yes
        
    trigger = {
        has_dlc = "Jade Dragon"
        any_child = {
            OR = {
                is_female = no
                has_game_rule = {
                    name = gender
                    value = all
                }
                has_game_rule = {
                    name = gender
                    value = plus # Submod for CK2Plus
                }
            }
            NOT = { trait = bastard }
            ai = yes
        }
    }

    immediate = {
        offmap_china = {
            governor = { save_event_target_as = western_protectorate }
        }
        random_child = {
            limit = {
                OR = {
                    is_female = no
                    has_game_rule = {
                        name = gender
                        value = all
                    }
                    has_game_rule = {
                        name = gender
                        value = plus
                    }
                }
                NOT = { trait = bastard }
                ai = yes
                NOT = {
                    any_sibling = {
                        OR = {
                            is_female = no
                            has_game_rule = {
                                name = gender
                                value = all
                            }
                            has_game_rule = {
                                name = gender
                                value = plus
                            }
                        }
                        NOT = { trait = bastard }
                        ai = yes
                        is_older_than = PREV
                    }
                }
            }
            if = {
                limit = { is_landed = yes }
                abdicate_to = event_target:western_protectorate
            }
            offmap_china = { set_offmap_holder = PREV }
        }
    }
}
 
Also, mod name order only applies to 2 versions of the same file. If you have 2 *different* files in the same folder in different mods (plus vanilla files), for example landed_titles_A.txt in one mod and landed_titles_B.txt in another mod, the order of the *file* names is what matters.

The file is 449 - Osterreich.txt in the history/provinces directory.

I have now tried it with

A-Mod (ARaS)
dependencies = { "vonStaudinger" }

The A-Mod file loaded (only?).

V-Mod (vonStaudinger)
dependencies = { "ARaS" }

Still the A-Mod file loaded.

The only difference in those files is, that I have some addtional buildings (which works fine, when A-Mod is not active) in this history file in the V-Mod.
 
2 questions,

1.can you tie the offmap empire mechanic to a onmap title and ruler

2.can you have the offmap empire mechanic be triggered by certain things such as an empire reaching a certain threshold or Rome restoring its boarders/the aztec invasion. ext
 
2 questions,

1.can you tie the offmap empire mechanic to a onmap title and ruler

2.can you have the offmap empire mechanic be triggered by certain things such as an empire reaching a certain threshold or Rome restoring its boarders/the aztec invasion. ext

1. Based on dev replies in one of the dev diaries, onmap rulers cannot hold offmap titles.

2. I believe you could tie the display condition to a global flag, so it would probably work.
 
1. Based on dev replies in one of the dev diaries, onmap rulers cannot hold offmap titles.

2. I believe you could tie the display condition to a global flag, so it would probably work.

So creating a china style empire interaction with a restored Rome isn't possible?
 
I am looking for a way to mod events based on the war-focus war game occuring during battles with the player as commander, yet there is one point i'm currently struggling with.

- How can I target the current army of the player? I was looking into the siege_events for this. but they seem to be quite hardcoded for sieges only. Is there a baltte-scope simular to the siege scope?

like:
Code:
  trigger = { 
            in_battle = yes
            in_command = yes
            }
immediate = {
     battle = { #siege
            enemy = {
                morale = 0.1
                troops = -0.025
            }
        }
}

or is this not possible?