• 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.
Save the files somewhere, then go back to vanilla governments, see if they work, and add back in changes one at a time.
Well, apparently it was the sassanid_government_trigger that caused the issues. I still don't get why, but I have replaced it with another procedure, and the issue is no longer present.
 
Well, apparently it was the sassanid_government_trigger that caused the issues. I still don't get why, but I have replaced it with another procedure, and the issue is no longer present.
My thoughts:
Do the title e_persia and the cultures persian & parthian exist? (This *is* a mod, so I'm covering all bases…)
Was "sassanid_government_trigger" spelled exactly the same in the trigger file and in the government file?
Was the trigger used in a context where it was syntactically correct? (In a place were testing has_landed_title = X, top_liege = X, and culture = X make sense…)

On that last note, the *bureaucratic* trigger looks weird to me. Testing has_landed_title = X (character condition) and has_title_flag = X (title condition) against the same scope? Perhaps *that* is breaking the file, including the sassanid trigger that's after it in the file.
 
Do the title e_persia and the cultures persian & parthian exist? (This *is* a mod, so I'm covering all bases…)
Yes.
Was "sassanid_government_trigger" spelled exactly the same in the trigger file and in the government file?
Yes.
Was the trigger used in a context where it was syntactically correct? (In a place were testing has_landed_title = X, top_liege = X, and culture = X make sense…)
Could be looked into, might have been an issue as I'm not completely familiar with all the aspects of government modding. As neither the Validator nor the game itself reported anything, I did not consider this.
On that last note, the *bureaucratic* trigger looks weird to me. Testing has_landed_title = X (character condition) and has_title_flag = X (title condition) against the same scope? Perhaps *that* is breaking the file, including the sassanid trigger that's after it in the file.
It worked fine when I tested last time, and when I remove it nothing changes. Can double-check again though, but it certainly does not cause anyone to become nomad.
 
Last edited:
Quick question:
The CKII WIki mentions the "any_character" scope uses heavy CPU usage. However, I need to use it because it's seemingly the only way to scope to a specific courtier I've spawned in someone else's court. How big of a CPU hog is it if I use the scope to target just ONE character with a character flag on an event specifically viewed by the player that's only ever fired once?

In my testing, I've noticed no slowdowns or issues, but it makes me wonder if people on weaker setups would feel it. What exactly is it about any_character that is such a CPU hog? Is it not an issue if it's only directed at one character, or is it still damaging, knowing it's searching the entire world for the one character I need?
 
Quick question:
The CKII WIki mentions the "any_character" scope uses heavy CPU usage. However, I need to use it because it's seemingly the only way to scope to a specific courtier I've spawned in someone else's court. How big of a CPU hog is it if I use the scope to target just ONE character with a character flag on an event specifically viewed by the player that's only ever fired once?

In my testing, I've noticed no slowdowns or issues, but it makes me wonder if people on weaker setups would feel it. What exactly is it about any_character that is such a CPU hog? Is it not an issue if it's only directed at one character, or is it still damaging, knowing it's searching the entire world for the one character I need?


Any_character is bad because it will check literally every character in the game until the limit block finds a reason to discard them, making far more checks than it ideally would need to do. If there are any shortcuts you can take to reduce the load you should try to do so. For example, if you can assure that the character is spawned in the court of an independent ruler then you only need any_independent_ruler = { any_courtier = {[conditions]} } and can possibly block the sender of the event if you know that the character always spawns in another ruler's court. However, if you only fire the event once then it should, at worst, cause some minor stuttering at that time and it should not really be an issue if you use a bad way to scope to the character. Of course, you should ideally still try to make the event as optimized as possible.
 
Quick question:
The CKII WIki mentions the "any_character" scope uses heavy CPU usage. However, I need to use it because it's seemingly the only way to scope to a specific courtier I've spawned in someone else's court. How big of a CPU hog is it if I use the scope to target just ONE character with a character flag on an event specifically viewed by the player that's only ever fired once?

In my testing, I've noticed no slowdowns or issues, but it makes me wonder if people on weaker setups would feel it. What exactly is it about any_character that is such a CPU hog? Is it not an issue if it's only directed at one character, or is it still damaging, knowing it's searching the entire world for the one character I need?

When you create the character, instead of the flag, give him a trait with cached = yes and the attribute that hides the trait (hidden_from_others = yes, I think). then you can use <your trait name> = {} as a scope for that character.
 
When you create the character, instead of the flag, give him a trait with cached = yes and the attribute that hides the trait (hidden_from_others = yes, I think). then you can use <your trait name> = {} as a scope for that character.
Hidden from others only hides it from people who don't also have the same trait so just hidden = yes will hide it from everyone, minor difference but might be important for those with all of that OCD.
As for using a cached trait, you could just save the character as an event target in new_character instead of adding a cached trait
 
Hidden from others only hides it from people who don't also have the same trait so just hidden = yes will hide it from everyone, minor difference but might be important for those with all of that OCD.
As for using a cached trait, you could just save the character as an event target in new_character instead of adding a cached trait

Yes, I didn't suggest that only in case it wasn't within the same event chain (but then, he could also use a global event target, you'd be right on that).

With respect to cached traits, the wiki say "it should be a limited number". What does that mean? Is there a hard limit in how many cached traits the game can handle?

And on another question, when are government potential evaluated? I made a custom "courtier" government, and want the normal governments to apply to landed characters, and my new government to apply to unlanded courtiers, but still, generated characters seem to be ignoring my potential clause (courtiers seems to be generated with the government of their host no matter what).
 
Yes, I didn't suggest that only in case it wasn't within the same event chain (but then, he could also use a global event target, you'd be right on that).

With respect to cached traits, the wiki say "it should be a limited number". What does that mean? Is there a hard limit in how many cached traits the game can handle?

And on another question, when are government potential evaluated? I made a custom "courtier" government, and want the normal governments to apply to landed characters, and my new government to apply to unlanded courtiers, but still, generated characters seem to be ignoring my potential clause (courtiers seems to be generated with the government of their host no matter what).
Limited number I think just means don't have too many of them, no actual hard limit from what I know
 
For governments, you not only have to make sure the potential of that government includes the desired people, but make sure all other governments exclude those people.
 
Another question:
Is it possible to make a patrician house "secede" and form it's own republic? And more concretely, is it possible for patricians to revolt/start a war against the doge?

I think both are theoretically possible, but haven't tried either.
 
What is the difference between health = -1 and health_penalty = -1 in traits

If you have three traits with health = 1, -2, 2, the benefit will be +1 health with all of them. With health_penalty, the excessive positive health has no effect, leaving you at +0 health with all three traits.
 
I can not for the life of me figure out why I can not use a county claim CB against an infidel holy order owning a castle in one of my provinces, in current github version of Lux Invicta. (I can declare war on him using a tributary CB.)
Relevant CB:
Code:
dejure_county_claim = {
   name = CB_NAME_DEJURECLAIM
   war_name = WAR_NAME_DEJURECLAIM
   sprite = 16
   truce_days = 3650
   hostile_against_others = yes
   is_permanent = yes
   check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
   press_claim = yes
   can_ask_to_join_war = no
   apply_short_occ_mod = no # Do not apply the 'recently_conquered' modifier to Holdings

   allowed_to_target_tributaries = no
   allowed_to_target_suzerains = no

   infamy_modifier = 0.5
  
   can_use = {
     ROOT = {
       is_inaccessible_trigger = no
     }
   }
   can_use_title = {
     tier = count
    
     #ROOT = { scaled_wealth = 0.5 }
     OR = {
       FROM = {
         has_landed_title = PREV
       }
       holder_scope = {
         is_liege_or_above = FROM
       }
     }
    
     OR = {
       kingdom = {
         holder = ROOT
       }
       empire = {
         holder = ROOT
       }
       dejure_liege_title = {
         holder = ROOT
       }
     }
    
     OR = {
       ROOT = {
         NOT = { same_liege = FROM }
       }
       FROM = {
         any_demesne_title = {
           NOT = { title = PREVPREV }
           higher_tier_than = baron
         }
       }
     }

     NOR = {
       ROOT = {
         has_landed_title = PREV
       }
       holder_scope = {
         is_liege_or_above = ROOT
       }
     }
     FROM = {
       OR = {
         holy_order = no
         NOT = {
           religion = ROOT
         }
         NOT = {
           has_dlc = "Sons of Abraham"
         }
         expelled_my_holy_order_trigger = yes
       }
     }
   }
   can_use_gui = {
     ROOT = {
       prestige = 50
     }
   }
   is_valid_title = {
     OR = {
       FROM = {
         has_landed_title = PREV
       }
       holder_scope = {
         is_liege_or_above = FROM
       }
     }
   }
   # on_add = { #v11 addition
       # ROOT = {  
         # scaled_wealth = -0.1
       # }
     # }
   on_success_title = {
     any_attacker = {
       limit = { character = ROOT }
       participation_scaled_prestige = 100
     }
     any_attacker = {
       limit = { NOT = { character = ROOT } }
       hidden_tooltip = { participation_scaled_prestige = 100 }
     }
     if = {
       limit = {
         OR = {
           ROOT = {
             tier = count
           }
           holder_scope = {
             any_demesne_title = {
               tier = count
               NOT = {
                 title = PREVPREV
               }
             }
           }
         }
       }
       holder_scope = {
         PREV = {
           usurp_title = ROOT
           add_pressed_claim = PREV
         }
       }
       break = yes
     }
     holder_scope = {
       any_demesne_title = {
         limit = {
           higher_tier_than = ROOT
           is_landless_type_title = no
         }
         ROOT = {
           usurp_title = PREV
         }
         add_pressed_claim = PREV
       }
       any_demesne_title = {
         limit = {
           tier = ROOT
           is_landless_type_title = no
         }
         ROOT = {
           usurp_title = PREV
         }
         add_pressed_claim = PREV
       }
       if = {
         limit = {
           any_demesne_title = {
             NOT = {
               lower_tier_than = ROOT
             }
           }
         }
         PREV = {
           grant_title = ROOT
           add_pressed_claim = PREV
         }
         break = yes
       }
       set_defacto_liege = ROOT
     }
   }

   on_fail_title = {
     ROOT = {
       prestige = -50
     }
     any_defender = {
       limit = { character = FROM }
       participation_scaled_prestige = 50
     }
     any_defender = {
       limit = { NOT = { character = FROM } }
       hidden_tooltip = { participation_scaled_prestige = 50 }
     }
   }

   on_reverse_demand = {
     ROOT = {
       prestige = -100
       transfer_scaled_wealth = {
         to = FROM
         value = 1.0
       }
     }
     any_defender = {
       limit = { character = FROM }
       participation_scaled_prestige = 100
     }
     any_defender = {
       limit = { NOT = { character = FROM } }
       hidden_tooltip = { participation_scaled_prestige = 100 }
     }
   }

   attacker_ai_victory_worth = {
     factor = -1 # always accept
   }
  
   attacker_ai_defeat_worth = {
     factor = 100
   }

   defender_ai_victory_worth = {
     factor = -1 # always accept
   }
  
   defender_ai_defeat_worth = {
     factor = 100
   }
}
 
For governments, you not only have to make sure the potential of that government includes the desired people, but make sure all other governments exclude those people.

I've taken care of that.

I've overriden all vanilla government and created two custom governments: "ruler" and "couerter". For the first, potential is is_ruler = yes. For the second, the potential is is_ruler = no.

Result? Unlanded characters also get the "ruler" government. Should that be reported as a bug?
 
I can not for the life of me figure out why I can not use a county claim CB against an infidel holy order owning a castle in one of my provinces, in current github version of Lux Invicta. (I can declare war on him using a tributary CB.)
What was the last thing you did to the CB? Have you tried modifying the different parts of it step by step and removing certain conditions while leaving others?
 
I'm looking at the repopulation event, and I'm wondering how often it triggers.

Code:
#depopulation modifier dissipating
province_event = {
    id = RIP.10030
    hide_window = yes

    is_triggered_only = yes

    trigger = {
        OR = {
            has_province_modifier = depopulated_1
            has_province_modifier = depopulated_2
            has_province_modifier = depopulated_3
        }
        NOT = {
            has_disease = yes
        }
    }

This shows the event to the end of the trigger. My question is, how can I know how often it fires? I want to slow down repopulation, but there is I can't figure out how to make this fire less often because I can't figure out what makes it fire in the first place.
 
What was the last thing you did to the CB? Have you tried modifying the different parts of it step by step and removing certain conditions while leaving others?
I'm an idiot. I've been tinkering with dejure_county_claim, when the relevant CB is dejure_barony_claim. Spotted the problem now.
 
  • 1
Reactions:
I'm looking at the repopulation event, and I'm wondering how often it triggers.

Code:
#depopulation modifier dissipating
province_event = {
    id = RIP.10030
    hide_window = yes

    is_triggered_only = yes

    trigger = {
        OR = {
            has_province_modifier = depopulated_1
            has_province_modifier = depopulated_2
            has_province_modifier = depopulated_3
        }
        NOT = {
            has_disease = yes
        }
    }

This shows the event to the end of the trigger. My question is, how can I know how often it fires? I want to slow down repopulation, but there is I can't figure out how to make this fire less often because I can't figure out what makes it fire in the first place.
It fires on_province_major_modifier.