• 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.
This event is designed to give me maximum building slots for every owned province. The result of the event work just fine, but there's a problem.

Imagine you owned 15 provinces, the event will appear again, again for each province. Basically, it's a mess. All I want is the event to fire only once for all of my province, not individually.

Code:
province_event = {
id = build.1
title = build.1.t
desc = build.1.d
picture = "GFX_evt_Castle_tower"
border = GFX_event_normal_frame_economy

trigger = {
NOT = {
num_of_max_settlements = 7
}
}

option = {
name = build.a.1
add_holding_slot = 7
}
}

Code:
holding_slot_decisions = {
    potential = {
        ai = no
        }
    allow = {
    }
    effect = {
province_event = { id = build.1 }
    }
    ai_will_do =  {
    factor = 0
  }
}
 
I'm having a problem with a character being "nowhere" while the game is saying that he is in the desired court.

For example this guy:

Code:
40606 = {
    name = "Helgi"
    # AKA: Oleg
    #dynasty = 705 # Rurikid
    dynasty = 490 # Knytling
    religion = norse_pagan
    culture = norse
    father = 163110 # Sigurðr Snake-in-the-eye
    #father = 40605 # "kinsman of Rurik"
    diplomacy = 9
    martial = 9
    intrigue = 8
    learning = 6
    trait = quick
    trait = bastard
    trait = proud
    trait = skilled_tactician
    trait = brave
    trait = zealous
    850.1.1 = {
        birth = yes
    }
    867.1.1 = {
        employer = 40605 # Rurik
        effect = {
            give_minor_title = title_appointed_regent
        }
    }
    912.1.1 = {
        religion = slavic_pagan
        culture = russian
        death = {
            death_reason = death_accident_snakes
        }
    }
}

In-game it says that he is in Rurik's (40605) court, however as Rurik I cannot give him any titles or jobs. I only can set him up for marriage, send gifts, buy favor or plot to have him murdered - the other usual choices are not even there in gray.
If I use "move 40606" on him the game says he has moved to my court, but I still cannot interact with him fully.

Help, anyone?
 
Hello! Does anyone know the max resolution of a map? I can't find this anywhere, and I would like to use an 8k by 4k map.
Well, Crackd's map had a native resolution of 5376 x 3584, with an optional smaller variant of vanilla dimensions. The higher resolution variant already provoced graphical problems on weaker graphic cards, so I guess you should not go much higher as to not hurt performance.
Theoretically, however, afaik the only important thing is the 3x2 aspect ratio. I don't know a lot about map modding though, so I might be mistaken.


This event is designed to give me maximum building slots for every owned province. The result of the event work just fine, but there's a problem.

Imagine you owned 15 provinces, the event will appear again, again for each province. Basically, it's a mess. All I want is the event to fire only once for all of my province, not individually.

Code:
province_event = {
id = build.1
title = build.1.t
desc = build.1.d
picture = "GFX_evt_Castle_tower"
border = GFX_event_normal_frame_economy

trigger = {
NOT = {
num_of_max_settlements = 7
}
}

option = {
name = build.a.1
add_holding_slot = 7
}
}

Code:
holding_slot_decisions = {
    potential = {
        ai = no
        }
    allow = {
    }
    effect = {
province_event = { id = build.1 }
    }
    ai_will_do =  {
    factor = 0
  }
}
Hmm.
I don't see why it would fire repeatedly.
However, I also don't see a bit of the background stuff that is potentially important: Like is that decision a decision on the character? I assume yes, and then it's already not coded properly because by default you are in the same scope: Meaning you first check whether a character is an AI, and then fire a province event on the character - which is not possible, because a character isn't a province. Properly, you should first scope to "any_demesne_province = {", and only then fire the province event. It would then fire one event for every province the character owns.
But I assume this is what already happens for some reason, and you want only one event, yes?
Then simply fire a "character_event" from the decision instead of a province_event, and in that event scope to the demesne provinces - then you can add the holding slots there. Like this:
Code:
character_event = {
    id = build.1
    title = build.1.t
    desc = build.1.d
    picture = "GFX_evt_Castle_tower"
    border = GFX_event_normal_frame_economy
  
    is_triggered_only = yes        # no trigger needed if you only want to fire this via decision! Instead, the condition check is now directly in the effect.
    option = {
        name = build.a.1
        any_demesne_province = {    # scopes to all demesne provinces here
            limit = {
                NOT = {
                    num_of_max_settlements = 7
                }
            }
            add_holding_slot = 7
        }
    }
}
Also, note that you are always adding a total number of +7 new holding slots to a province, as long as it is missing one. I am not sure if this could cause problems, i.e. if the game could try to add 6+7=13 holding slots to a province, when it can only have 7. But I am not sure about that part.


I want to increase revolt risk / unrest in counties based on culture of county vs holder, various laws, etc., how would I do that? Which file(s) do I have to modify?
For the general risk for different religion/culture, you'll need to modify the lines in /common/static_modifiers.txt:
Code:
# Another culture in the same culture group
same_culture_group = {
    local_revolt_risk = 0.01
}

# A culture in another culture group
non_accepted_culture = {
    local_revolt_risk = 0.02
}

# Another religion in the same religion group
same_religion_group = {
    local_revolt_risk = 0.01
}

# A religion in another religion group
different_religion = {
    local_revolt_risk = 0.02
}

# County vs Count is heresy vs parent religion
county_heresy = {
    local_revolt_risk = 0.03
}
For laws, you can put a "global_revolt_risk" modifier directly into the "effect" section of the laws in question. Laws are located in /common/laws (duh).
As for other ways to modify revolt risk, it really depends on how it gets applied: You can also change it by having events apply an event modifier, or even put it into a trait.
 
This event is designed to give me maximum building slots for every owned province. The result of the event work just fine, but there's a problem.

Imagine you owned 15 provinces, the event will appear again, again for each province. Basically, it's a mess. All I want is the event to fire only once for all of my province, not individually.

Since you only have one option, perhaps make it a hide_window event, so it doesn't display anything, then create a separate notification event that informs you can calls the main event for all your provinces.
 
Since you only have one option, perhaps make it a hide_window event, so it doesn't display anything, then create a separate notification event that informs you can calls the main event for all your provinces.

Something like this?

Code:
province_event = {
id = build.1
title = build.1.t
desc = build.1.d
picture = "GFX_evt_Castle_tower"
border = GFX_event_normal_frame_economy
hide_window = yes
trigger = {
NOT = {
num_of_max_settlements = 7
}
}

option = {
name = build.a.1
add_holding_slot = 7
}
}
 
With hide_window, you'll need to remove the picture, border, and desc, and change the option block to an immediate block.

So, more like this:
Code:
province_event = {
    id = build.1
    hide_window = yes

    trigger = {
        NOT = {
            num_of_max_settlements = 7
        }
    }

    immediate = {
        add_holding_slot = 7
    }
}

If you still want an alert for it, then you'll need something like this:
Code:
character_event = {
    id = build.1
    title = build.1.t
    desc = build.1.d
    picture = "GFX_evt_Castle_tower"
    border = GFX_event_normal_frame_economy

    trigger = {
         any_realm_province = {
             NOT = { num_of_max_settlements = 7 }
        }
    }

    option = {
        name = build.a.1
        any_realm_province = {
            limit = { NOT = { num_of_max_settlements = 7 } }
            province_event = { id = build.2 }
        }
    }
}

province_event = {
    id = build.2
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        NOT = {
            num_of_max_settlements = 7
        }
    }

    immediate = {
        add_holding_slot = 7
    }
}

On a side note, you may want to reevaluate how this event is triggered - Mean Time To Happen events are computationally expensive. Reworking it as an on_action event will be better, performance-wise
 
Not only thanks for helping me, but you give me options for modding.

With hide_window, you'll need to remove the picture, border, and desc, and change the option block to an immediate block.

So, more like this:
Code:
province_event = {
    id = build.1
    hide_window = yes

    trigger = {
        NOT = {
            num_of_max_settlements = 7
        }
    }

    immediate = {
        add_holding_slot = 7
    }
}

If you still want an alert for it, then you'll need something like this:
Code:
character_event = {
    id = build.1
    title = build.1.t
    desc = build.1.d
    picture = "GFX_evt_Castle_tower"
    border = GFX_event_normal_frame_economy

    trigger = {
         any_realm_province = {
             NOT = { num_of_max_settlements = 7 }
        }
    }

    option = {
        name = build.a.1
        any_realm_province = {
            limit = { NOT = { num_of_max_settlements = 7 } }
            province_event = { id = build.2 }
        }
    }
}

province_event = {
    id = build.2
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        NOT = {
            num_of_max_settlements = 7
        }
    }

    immediate = {
        add_holding_slot = 7
    }
}

On a side note, you may want to reevaluate how this event is triggered - Mean Time To Happen events are computationally expensive. Reworking it as an on_action event will be better, performance-wise
 
I'm trying to create a custom culture with chinese portraits, but Muslim-style settlements, instead of the default mongol.

The portraits are easy enough, but how do I go making it to where the culture will have Muslim-style settlements instead of mongol?
 
Can custom societies have a gender requirement? For example, a society only allowing men?
 
Is it possible to change localisation for cultural temple titles for Catholics? If it is, how would I do so?
For example, this does nothing.
Code:
temple_baron_saxon;Bisceop;;;;;;;;;;;;;x
temple_count_saxon;Arcebisceop;;;;;;;;;;;;;x
 
@Meneth When you manipulate local_variables by other local_variables within a saved_event_scope is there a reason that none of the operations apply or function? In essence, when I tried to convert the Gehiminisnacht spell book system to use the local_variable functionality of the current patch using a replace all to add local_ to the existing event code, nothing appears to work.

After more testing, is_variable_equal does not appear to be working for local_ variables.
 
Last edited:
In the past, I created a decision where it gives me a lot a of tech points. Instead of clicking each technology one by one, I would create an event where the game does that (automatically) for me. The event in question doesn't work.

I've tried both group and individual technology with no success.

Code:
province_event = {
    id = tech.1
    hide_window = yes
    trigger = {}

    any_realm_province = {
    
    if = {
    immediate = {
    change_tech = {
    technology = TECH_GROUP_MILITARY
    value = 8
    }
    
    change_tech = {
    technology = TECH_GROUP_ECONOMY
    value = 8
    }
    
    change_tech = {
    technology = TECH_GROUP_CULTURE
    value = 8
    }
    }
}
}
}

Code:
tech_decisions = {
    potential = {
        ai = no
        }
    allow = {}
    
    effect = {
province_event = { id = tech.1 }
  }
  ai_will_do =  {
    factor = 0
  }
}
 
Prior to the latest release, my personal mod was working fine, but it started acting up. I did go through all my mod files that overwrite existing game files and updated them, so I'm pretty sure it has nothing to do with that. The main problem right now is that an on_birth character_event isn't triggering anymore (code below). The only thing I have recently changed a little was the contents of the hidden_tooltip (the modifiers), but as I said before, it was working fine a couple days ago.

None of my children are being born the the Caesar trait, when prior to the update, every child did.

Code:
# 02 Ceasar on_birth
character_event = {
    id = rh.02
    # desc = EVTDESC_rh_02
    # picture = GFX_evt_reincarnation
    # border = GFX_event_normal_frame_religion

    is_triggered_only = yes
    hide_window = yes

    religion_group = pagan_group

    trigger = {
        dynasty = 8221401
        top_liege = {
            OR = {
                has_landed_title = d_latium
                has_landed_title = e_roman_empire
            }
        }
        OR = {
            religion = hellenic_pagan
            religion = hellenic_reformed
        }
        OR = {
            culture = roman
            culture = italian
        }
        NOT = { trait = caesar }
        OR = {
            father = {
                trait = caesar
                OR = {
                    tier = EMPEROR
                    tier = KING
                    tier = DUKE
                }
            }
            mother = {
                trait = caesar
                OR = {
                    tier = EMPEROR
                    tier = KING
                    tier = DUKE
                }
            }
        }
    }

    option = {
        # name = EVTOPTA_rh_02
        add_trait = caesar
        set_character_flag = caesar_born
        hidden_tooltip = {
            if = {
                limit = {
                    OR = {
                        father = { has_landed_title = d_latium }
                        mother = { has_landed_title = d_latium }
                    }
                }
                random = {
                    chance = 20
                    modifier = {
                        factor = 0
                        trait = fair
                    }
                    modifier = {
                        factor = 1.5
                        is_female = yes
                    }
                    add_trait = fair
                }
                random = {
                    chance = 15
                    modifier = {
                        factor = 0
                        trait = strong
                    }
                    modifier = {
                        factor = 0.5
                        is_female = yes
                    }
                    add_trait = strong
                }
                random = {
                    chance = 10
                    modifier = {
                        factor = 0
                        OR = {
                            trait = quick
                            trait = genius
                        }
                    }
                    modifier = {
                        factor = 1.5
                        OR = {
                            father = { has_children = no }
                            mother = { has_children = no }
                        }
                    }
                    modifier = {
                        factor = 1.5
                        father = { age_diff = { who = PREV years = 55 } }
                    }
                    add_trait = genius
                }
                random = {
                    chance = 15
                    modifier = {
                        factor = 0
                        OR = {
                            trait = genius
                            trait = quick
                        }
                    }
                    add_trait = quick
                }
            }
        }
    }
}

Thanks to anyone who can take the time to help.
 
I'm trying to create a custom culture with chinese portraits, but Muslim-style settlements, instead of the default mongol.

The portraits are easy enough, but how do I go making it to where the culture will have Muslim-style settlements instead of mongol?

Can anyone help me in this regard? Is it even possible?

And second, is there away to mod the AIREASON_SKILLS modifier? I'm asking because it's being applied in sitautions it shouldn't, like when the AI stands to gain an NPC, through marriage, it's refuse the marriage because their NPC's skills are too valuable, even though that NPC won't be taken from them if they accept the marriage offer.