• 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.
Sorry to post this again but i'm stumped what did I do wrong?

Code:
character_event = {
    id = star.5
    hide_window = yes
    is_triggered_only = yes
 
trigger = {
         top_liege = {
            OR = {
            has_landed_title = e_byzantium
            has_landed_title = e_roman_empire
            }
            }
            }        
            immediate = {
          any_realm_province  = {  add_province_modifier = standing_army_province
           duration = 365}
}
}

Ahh, the exact same problem that I've had for the past FIVE freaking days on my own script - add_province_modifier is a clause not a literal.

Here you go -

Code:
character_event = {
    id = star.5
    hide_window = yes
    is_triggered_only = yes
 
    trigger = {
             top_liege = {
                OR = {
                    has_landed_title = e_byzantium
                    has_landed_title = e_roman_empire
                }
            }
        }         
    
    immediate = {
        any_realm_province = {
            add_province_modifier = {
                name = standing_army_province
                duration = 365
            }
        }
    }
}

:)
 
Maybe I'm being dumb but I just don't quite get it...how does that change the title of an Independent Duke from King to Prince?
I'm sorry if I'm being a bit too annoying though.
If you want all dukes of "culture = gothic" to be called princes, this is the text you would put into a localization file:
Code:
duke_gothic;Prince;Prince;Prinz;;Príncipe;;;;;;;;;x
duchy_of_gothic;Principality of;Principauté de;Fürstentum;;Principado de;;;;;;;;;x
If you want kings of "culture = gothic" to be called princes and independent dukes to be called petty princes, you would add the line "dukes_called_kings = yes" (without the quotation marks) to the code for the gothic culture. Then, the text you would add in a localization file would be different:
Code:
king_gothic;Prince;Prince;Prinz;;Príncipe;;;;;;;;;x
kingdom_of_gothic;Principality of;Principauté de;Fürstentum;;Principado de;;;;;;;;;x

Note that for vassal characters, localization is tied to the culture of the top liege rather than the culture of the character.
 
If you want all dukes of "culture = gothic" to be called princes, this is the text you would put into a localization file:
Code:
duke_gothic;Prince;Prince;Prinz;;Príncipe;;;;;;;;;x
duchy_of_gothic;Principality of;Principauté de;Fürstentum;;Principado de;;;;;;;;;x
If you want kings of "culture = gothic" to be called princes and independent dukes to be called petty princes, you would add the line "dukes_called_kings = yes" (without the quotation marks) to the code for the gothic culture. Then, the text you would add in a localization file would be different:
Code:
king_gothic;Prince;Prince;Prinz;;Príncipe;;;;;;;;;x
kingdom_of_gothic;Principality of;Principauté de;Fürstentum;;Principado de;;;;;;;;;x

Note that for vassal characters, localization is tied to the culture of the top liege rather than the culture of the character.

So there really is no way of naming independent lords something other than the same as a king tier lord...that really screws up my plan.

I was so dearly hoping to have something along the lines of...

Code:
independent_duke_gothic;Prince
independent_duchy_gothic;Princepality
independent_duchy_gothic;Princepality of

I really wanted that to exist as a thing...
 
Last edited:
Ahh, the exact same problem that I've had for the past FIVE freaking days on my own script - add_province_modifier is a clause not a literal.

Here you go -

:)

Thank you! And shouldn't that be noted on the wiki so people don't consistently make this mistake?
 
Thank you! And shouldn't that be noted on the wiki so people don't consistently make this mistake?

There's a lot missing from the Wiki and I have commented on this. A lot of it is very obscure (like your/our problem) some of it is just crazy, like modifiers - in some cases they are additive and in others they are multiplicative.

Trial and error, google, and stripping down every single effing thing in the script and restarting 999 times until you get the solution !
 
Thank you! And shouldn't that be noted on the wiki so people don't consistently make this mistake?
There's a lot missing from the Wiki and I have commented on this. A lot of it is very obscure (like your/our problem) some of it is just crazy, like modifiers - in some cases they are additive and in others they are multiplicative.

Trial and error, google, and stripping down every single effing thing in the script and restarting 999 times until you get the solution !

I wouldn't call this one obscure... You can search "add_province_modifier" on https://ck2.paradoxwikis.com/Commands and find the correct syntax !
The full explanation is here: https://ck2.paradoxwikis.com/Modifiers#Event_modifiers, since character, province and holding modifiers are a subset of what paradox calls "event modifiers" in game files. Don't hesitate to edit to improve any of that :)

For missign stuff there's the dedicated thread (https://forum.paradoxplaza.com/forum/index.php?threads/ckii-wiki.618856/) or directly on wiki (https://ck2.paradoxwikis.com/Crusader_Kings_II_Wiki:Work_needed), as comments elsewhere will probably not be easily be spotted.
 
Is there a way to easily allow vassals, counts and dukes in particular to raise retinues without effecting the whole realm?
 
Question about event modding

How can I avoid character's portraits from appearing in event options?
I found how to avoid that in the event itself but not in the option
 
Wrap whatever calls to them (ROOT, PREV, c_1234 etc.) inside a hidden_tooltip
That's strange, because my option is already of the form:
option = {
name = ...
hidden_tooltip = {
...
}
}
Any other ideas about why that might be?
 
It annoys me that every vassal of the HRE duke tier or above can vote for the next emperor.

A silly question, but is there a way to make it so that only the traditional seven prince-electors can vote? Other than messing up all titles so that there are only 7 vassals of duke tier(which would be both difficult and buggy).
Most effects of succession laws, including who can vote in elective succession, are either hard-coded or handled by defines which will affect all nations. In the case of fuedal elective, I think all you can set is how many voting titles the liege can hold and whether or not titual titles can vote

So there really is no way of naming independent lords something other than the same as a king tier lord...that really screws up my plan.

I was so dearly hoping to have something along the lines of...

Code:
independent_duke_gothic;Prince
independent_duchy_gothic;Princepality
independent_duchy_gothic;Princepality of

I really wanted that to exist as a thing...
You could set independent dukes to be called kings, then have the king title use a custom localization that returns a different result if you are an independent gothic duke.
 
I wouldn't call this one obscure... You can search "add_province_modifier" on https://ck2.paradoxwikis.com/Commands and find the correct syntax !
The full explanation is here: https://ck2.paradoxwikis.com/Modifiers#Event_modifiers, since character, province and holding modifiers are a subset of what paradox calls "event modifiers" in game files. Don't hesitate to edit to improve any of that :)

For missign stuff there's the dedicated thread (https://forum.paradoxplaza.com/forum/index.php?threads/ckii-wiki.618856/) or directly on wiki (https://ck2.paradoxwikis.com/Crusader_Kings_II_Wiki:Work_needed), as comments elsewhere will probably not be easily be spotted.


The issue is not that the info is not there, it's that it is obscure or not fully detailed. In the example I gave the Validator had absolutely no issue with it since all the brackets lined up and there were thus no open clauses. The fact that that command required an added set of brackets eluded the Validator is what made it so hard for me to spot.

Going further, I don't know how Clausewitz compiles its code but whatever way it does it means that an error in one place might not show up until later in the code. Again, same example, my missing brackets meant that every option in my event chain worked right up to the point of the missing brackets, so I kept looking at the code AFTER it.

There are way too many other examples to detail here but suffice to say that the coding and verification tools that we have now, although very very good, could still use a lot of improvement.
 
You're missing a set of brackets. It should look like this:

Code:
option = {
    name = { hidden_tooltip = { }
    }
}
}
Hmm, I tried that but still no success...
EDIT: ok, apparently I get an extra portrait even if the option just has a name, apparently it's some other problem
 
Last edited:
Hmm, I tried that but still no success...
EDIT: ok, apparently I get an extra portrait even if the option just has a name, apparently it's some other problem
Maybe you have an event type that does show FROM?
There are ways to change that behaviour. I think it's default for certain events, but with such special flags you can suppress it.
 
Maybe you have an event type that does show FROM?
There are ways to change that behaviour. I think it's default for certain events, but with such special flags you can suppress it.
Alright, I think I solved it, I was using
Code:
random_society_member = {
            limit = {
                society_member_of = knights
                NOT = { has_character_flag  = opponent}
            }
            save_event_target_as = opponent
            set_character_flag = opponent
}
So it gave me two characters instead of the one I needed because of the flag I set.
Thanks for the help anyway!
 
So for the new turn off marriage ai thing for your family members, is there anywhere you can mod the max duration? Cause I recall in the patch notes its limited to 10 years only in the vanilla game?
 
I'm trying to create an event that yields one outcome (a random courtier gets wounded) but with two descriptions and option texts depending upon where the settlement_event that created it is located. If the player hunts on a neighbors province then the text should say "The locals wounded X", otherwise if they hunt in their own area it should say "Courtier X was gored by a bull", or whatever.

The settlement decision scopes to the province and then saves that via save_event_target_as to the variable hunting_range. The decision then spits out a number of outcomes, including the "wounded warrior" option. I tried using one event with two custom desc blocks and two custom option blocks but that didn't work so I split it into the event splitter itself and the two individually localized outcome events.

At this stage I am pretty sure that the issue is the scoping within the limit statement but for the life of me I can't figure it out. FWIW the only outcome I currently get is the second one (warrior wounded in neighboring province).

Help !

Code:
character_event = { # Hunting - Hunter wounded !
    id = dawn.513
    hide_window = yes
   
    is_triggered_only = yes
   
    immediate = {
        if = {
            limit = {
                event_target:hunting_range = {
                    holder_scope = {
                        character = FROM
                    }
                }
            }
            character_event = { id = dawn.5131 }
        }
        else = {
            character_event = { id = dawn.5132 }
        }
    }
}
character_event = { #Gored by an animal
    id = dawn.5131
    desc = EVTDESCdawn.5131
    picture = GFX_evt_tribal_warriors #Something about being injured
           
    is_triggered_only = yes
   
    immediate = {
        random_courtier = {
            limit = {
                prisoner = no
                age >= 14
                NOT = {    trait = incapable }
            }
            random_list = {
                50 = { add_trait = wounded }
                30 = { add_trait = maimed }
                20 = { death = { death_reason = death_accident } }
               
            }
            save_event_target_as = mauled_warrior
        }
    }
   
    option = { name = EVTOPTAdawn.5131 }
}
character_event = { #Attacked by locals
    id = dawn.5132
    desc = EVTDESCdawn.5132
    picture = GFX_evt_tribal_warriors #Something about being injured
           
    is_triggered_only = yes
   
    immediate = {
        random_courtier = {
            limit = {
                prisoner = no
                age >= 14
                NOT = {    trait = incapable }
            }
            random_list = {
                50 = { add_trait = wounded }
                30 = { add_trait = maimed }
                20 = { death = { death_reason = death_battle } }
               
            }
            save_event_target_as = mauled_warrior
        }
    }
   
    option = { name = EVTOPTAdawn.5132 }
}


EDIT - Problem solved, the syntax is "character = FROMFROM"
 
Last edited:
I have a couple questions regarding offmap powers.

First, is it possible to mod an offmap power that doesn't require Jade Dragon?

Second, can an offmap power receive a landed title? Will this cause any odd behavior?