• 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.
Whether it appears in the list is governed by the Potential block. Remove culture_group = celtic and rework this block

so it evaluates to true for tribals.
I think I did that an hour ago, result was ruler of svidjod starting WITH tanistry, while he should start with ele_gavelkind and be able to pick tanistry
Code:
succ_tanistry = {
        oldest_child_opinion = -20
        child_opinion = -10
        dynasty_opinion = 5
        vassal_opinion = 5
        potential = {
            holder_scope = {
                OR = {
                    independent = yes
                    NOT = {
                        any_liege = {
                            holy_order = yes
                        }
                    }
                }
                NOT = { religion_group = muslim }
                is_merchant_republic = no
                is_patrician = no
                #culture_group = celtic
                OR = {
                    independent = yes
                    NOT = {
                        any_demesne_title = {
                            is_vice_royalty = yes
                        }
                    }
                }
            }
            OR = {
                is_landless_type_title = no
                is_tribal_type_title = yes
                temporary = yes
            }
            is_primary_type_title = no
            NOT = { tier = baron }
            OR = {
                holder_scope =
                {
                    tier = baron
                    is_feudal = yes
                }
                holder_scope = {
                #is_feudal = yes
                is_tribal = yes
                }
            }
            NOT = { holder_scope = { government = confucian_bureaucracy } }
            NOT = { holder_scope = { government = chinese_imperial_government } }
        }
        allow = {
            OR = {

                holder_scope = { is_tribal = yes }
            }
            custom_tooltip = {
                text = not_forced_tt
                hidden_tooltip = {
                    holder_scope = { NOT = { has_character_flag = liege_forced_succ_law } }
                }
            }
            conditional_tooltip = {
                trigger = {
                    has_dlc = "Conclave"
                }
                custom_tooltip = {
                    text = forced_elective_tt
                    hidden_tooltip = {
                        NAND = {
                            has_law = succession_voting_power_1
                            has_law = succ_feudal_elective
                        }
                    }
                }
            }
        }
        effect = {
            succession = tanistry
        }
        revoke_allowed = {
            always = no
        }           
    }
 
Can someone help me? I really hate the holding pictures for Chinese characters and was wondering how to change it so that it uses the new Tibetan holding pictures instead.
 
Can someone help me? I really hate the holding pictures for Chinese characters and was wondering how to change it so that it uses the new Tibetan holding pictures instead.

Check the file \interface\province.gfx:

Code:
spriteType = {
       name = "GFX_settlement_castle_chinesegfx"
       texturefile = "gfx\\interface\\placeholder_castle_mongol.tga"
       noOfFrames = 1
       norefcount = yes
   }
spriteType = {
       name = "GFX_settlement_castle_bodpagfx"
       texturefile = "gfx\\interface\\placeholder_castle_tibet.dds"
       noOfFrames = 1
       norefcount = yes
   }

To avoid duplicating the whole file, you should be able to override the specific chinesegfx sprites by name, via an \interface\zz_xxxx.gfx file (zz_ file prefix so that it's loaded last).
 
Where do I find the possible trade post locations for the silk road? The silk road file only contains the thing that makes them show up on the map.
 
I think it's in 00_scripted_triggers.txt, named silk_road_trade_post_trigger, though I haven't tested modifying it.
Worked like a charm.
 
Hello! I'm currently looking for a solution to the Africa-gets-eaten-by-Christians problem. My idea is to "cheat" and give muslims some extra troops when defending in holy wars / crusades. I want to use a simplified version of the event that spawns loyalists in case of rebellion. Of course, this would mean that Christians around the Mediterranean would still pointlessly try to invade Africa, but the results may not be as ugly. I follow with code and qestions:

Code:
# Help North Africa survive the onslaught of Christians
character_event = {
   id = 815438 #just some random numbers
   desc = "The Tribes come to defend against the infidels!"
   picture = "GFX_evt_battle"
   #border = "GFX_event_normal_frame_war"
   
   is_triggered_only = yes
   
   trigger = {
       war = yes #unnecessary?
       religion_group = muslim
       is_primary_war_defender = yes
       OR = {
           culture_group = arabic
           #culture_group = iranian
           culture_group = east_african
           culture_group = west_african
       }
       OR = {
           any_war = { using_cb = crusade }
           any_war = { using_cb = holy_war }
       }
       capital_scope = {
           religion_group = muslim
           OR = {
               culture_group = arabic
               #culture_group = iranian
               culture_group = east_african
               culture_group = west_african
           }
       #The capital must be within the arab empire. 
       }
       NOT = { realm_size = 100 }
       realm_character_percent = { #this may break the event's intention on some occasions
           target = 0.5
           religion_group = muslim
       }
   }
   
   weight_multiplier = {
       days = 10
       modifier = {
           factor = 2
           NOT = { prestige = 100 }
       }
       modifier = {
           factor = 2
           NOT = { piety = 100 }
       }
       modifier = {
           factor = 1.25
           realm_size = 25
       }
       modifier = {
           factor = 1.25
           realm_size = 50
       }
       modifier = {
           factor = 1.25
           realm_size = 75
       }
   }
   
   option = {
       name = "EXCELLENT"
       
       
       capital_scope = {
           tooltip = {
               ROOT = {
                   spawn_unit = {
                       province = PREV
                       owner = ROOT
                       match_character = FROM
                       match_mult = 0.05
                       attrition = 1.0
                   }
                   spawn_unit = {
                       province = PREV
                       owner = ROOT
                       match_character = FROM
                       match_mult = 0.05
                       attrition = 1.0
                   }
                   spawn_unit = {
                       province = PREV
                       owner = ROOT
                       match_character = FROM
                       match_mult = 0.05
                       attrition = 1.0
                   }
               }
           }

    option = {
        name = "EXCELLENT"
        
        
        capital_scope = {
            tooltip = {
                ROOT = {
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        match_character = FROM #What?
                        match_mult = 0.05 #What?
                        attrition = 1.0
                    }
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        match_character = FROM
                        match_mult = 0.05
                        attrition = 1.0
                    }
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        match_character = FROM
                        match_mult = 0.05
                        attrition = 1.0
                    }
                }
            }
        }
    }
}

So, first of all, how broken is it and will the code even work as I hope it would?
What is the border gfx for?
If I read it correctly, the event grants 3x5% of the max levy strength, right?
How do I make it a requirement that the capital is within the de jure Arab Empire?

Thanks in adavance. Maybe this will help you too. :)
 
So I just noticed that random baronies keep spawning independent. I'm not sure what is causing it. I've tried replacing the default and govs with the vanilla and they don't work..however so far the decisions and events haven't been updated to JD. They ARE independent as they can be 'reconquered' and don't list any lieges.
 
Quick question: Will top_liege scope to yourself if you are independent?

Unless I misremember, that is the case.

Hello! I'm currently looking for a solution to the Africa-gets-eaten-by-Christians problem. My idea is to "cheat" and give muslims some extra troops when defending in holy wars / crusades. I want to use a simplified version of the event that spawns loyalists in case of rebellion. Of course, this would mean that Christians around the Mediterranean would still pointlessly try to invade Africa, but the results may not be as ugly. I follow with code and qestions:

Code:
# Help North Africa survive the onslaught of Christians
character_event = {
   id = 815438 #just some random numbers
   desc = "The Tribes come to defend against the infidels!"
   picture = "GFX_evt_battle"
   #border = "GFX_event_normal_frame_war"
   
   is_triggered_only = yes
   
   trigger = {
       war = yes #unnecessary?
       religion_group = muslim
       is_primary_war_defender = yes
       OR = {
           culture_group = arabic
           #culture_group = iranian
           culture_group = east_african
           culture_group = west_african
       }
       OR = {
           any_war = { using_cb = crusade }
           any_war = { using_cb = holy_war }
       }
       capital_scope = {
           religion_group = muslim
           OR = {
               culture_group = arabic
               #culture_group = iranian
               culture_group = east_african
               culture_group = west_african
           }
       #The capital must be within the arab empire.
       }
       NOT = { realm_size = 100 }
       realm_character_percent = { #this may break the event's intention on some occasions
           target = 0.5
           religion_group = muslim
       }
   }
   
   weight_multiplier = {
       days = 10
       modifier = {
           factor = 2
           NOT = { prestige = 100 }
       }
       modifier = {
           factor = 2
           NOT = { piety = 100 }
       }
       modifier = {
           factor = 1.25
           realm_size = 25
       }
       modifier = {
           factor = 1.25
           realm_size = 50
       }
       modifier = {
           factor = 1.25
           realm_size = 75
       }
   }
   
   option = {
       name = "EXCELLENT"
      
      
       capital_scope = {
           tooltip = {
               ROOT = {
                   spawn_unit = {
                       province = PREV
                       owner = ROOT
                       match_character = FROM
                       match_mult = 0.05
                       attrition = 1.0
                   }
                   spawn_unit = {
                       province = PREV
                       owner = ROOT
                       match_character = FROM
                       match_mult = 0.05
                       attrition = 1.0
                   }
                   spawn_unit = {
                       province = PREV
                       owner = ROOT
                       match_character = FROM
                       match_mult = 0.05
                       attrition = 1.0
                   }
               }
           }

    option = {
        name = "EXCELLENT"
        
        
        capital_scope = {
            tooltip = {
                ROOT = {
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        match_character = FROM #What?
                        match_mult = 0.05 #What?
                        attrition = 1.0
                    }
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        match_character = FROM
                        match_mult = 0.05
                        attrition = 1.0
                    }
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        match_character = FROM
                        match_mult = 0.05
                        attrition = 1.0
                    }
                }
            }
        }
    }
}

So, first of all, how broken is it and will the code even work as I hope it would?
What is the border gfx for?
If I read it correctly, the event grants 3x5% of the max levy strength, right?
How do I make it a requirement that the capital is within the de jure Arab Empire?

Thanks in adavance. Maybe this will help you too. :)


You should cut one of the "option" blocks and check your brackets (currently, that event isn't closed correctly), but it should function if you do that, provided you trigger it on_war_started. However, there are a few potential issues I can think of:

- As written, the event troops do not disband on peace. I would suggest you add an earmark to keep track of them and fire an event on_war_ended_victory/_defeat_whitepeace_invalid that disbands them if you no longer are at war (or no longer are defending, if you want to prevent the exploit of declaring expansionist wars with those troops just before signing the peace; the AI would never use this, but a player could easily use it).

- As written, the event can fire every time you end up defending in a war, which could lead to a lot of event troops rather quickly. You could check if there are any earmarked regiments with your earmark and not fire the event again if that is the case if it is something you want to prevent.

- You should add a match_min and match_max block to the spawn unit commands to ensure that you get a reasonable number of men. If you don't, if a realm with 100k was to attack you you'd get 15k men and if a realm with 1k men attacks you'd get 150 men, which is a fairly large range.

- This is a matter of personal taste, but I'd match ROOT and not FROM for three reasons. The first is that doing that means that a small realm cannot pull a small doomstack out of thin air if it matches itself (which could be rather silly if you e.g. have the HRE vs. a random count). The second is that it would copy the troop types you have and not some random guy that might have a different troop composition (which e.g. could give you war elephants if some Indian guy somehow attacked you despite them not normally being available to you, or that you'd get lots of HC if a holy order was involved even though random HC being found in North Africa might be a stretch). The third is that if you get attacked by some random nobody with a strong ally a match vs. FROM is likely to be worse than a match of ROOT.

- Your weight modifier seems rather pointless, given that even at its maximum value you'd end up at 78 days, meaning the event likely fires every war as they tend to last longer than that. I'd just cut it entirely.

- As written (with the e_arabia check you plan to add), the event would fire if e.g. Abyssinia was to attack Egypt or the ERE tries to go into the Middle East. At least the former seems unintended, so you probably want to check that the attacker has their capital in Europe (which still would let someone cheese it by moving the capital to Africa, but at least the AI wouldn't do that unless their primary title was in Africa). Also, rather than checking for e_arabia (which can de jure drift stuff unless you disable de jure drift), I would check for a region (I believe it is world_africa_north you want to use) by using capital_scope = { region = world_africa_north }. You might further want to exclude c_marrakech from the check, if you think that random guys coming to help on an island is weird.

- The event currently doesn't check the attacker's religion, which means that Muslim-on-Muslim wars would trigger the event (and, without a check for where the attacker is based, that would still happen if both are in Africa). You probably should check the attacker scope for the holy war/crusade.

- As written, the event does not check that you are defending in a holy war/crusade, only that you are involved in one. This means that the event would fire if you were attacking someone using such a CB and got a random peasant revolt at home.

- Don't use a random event id. Set up a proper namespace to ensure that you don't get a conflict.


Now, for the rest of the questions:

- The border gfx just adds a frame to the event window. I'd use the one you have commented out, but you could use some other frame if you want to.

- The event grants 3x5 % of the primary attacker's current standing forces. That means that raised mercs, holy orders, retinues, and event troops all would be included, but not levies regenerating later, mercs hired the next day, etc.

- If you want to check for the Arabian Empire, use any_realm_province = { de_jure_liege_or_above = e_arabia }. However, as mentioned, this could end up being a terrible condition if there is de jure drift.
 
- As written, the event troops do not disband on peace. I would suggest you add an earmark to keep track of them and fire an event on_war_ended_victory/_defeat_whitepeace_invalid that disbands them if you no longer are at war (or no longer are defending, if you want to prevent the exploit of declaring expansionist wars with those troops just before signing the peace; the AI would never use this, but a player could easily use it).
- As written, the event can fire every time you end up defending in a war, which could lead to a lot of event troops rather quickly. You could check if there are any earmarked regiments with your earmark and not fire the event again if that is the case if it is something you want to prevent.
I was concerned about that, too, but I wasn't sure on how to disband troops generated by a specific event.

- This is a matter of personal taste, but I'd match ROOT and not FROM.
Yes, that's what I'd actually like to do, but also match the spawned troops against the max levies, not what the defender currently fields.

- As written, the event does not check that you are defending in a holy war/crusade, only that you are involved in one. This means that the event would fire if you were attacking someone using such a CB and got a random peasant revolt at home.
I though this was what the is_primary_war_defender is for. Would it work if I put it into the any_war = {} brackets?

You mere immensely helpful, many thanks!
 
I'm trying to make a 'Duchy Claim' CB where by if I own or have a Strong Claim on "Province A", I can declare war for "Provinces A, B and C" because they're part of the same Duchy owned by the same person.

I've used a modified version of the tribal_invasion CB, and got to the point where I can bring up a list of all the Duchies the target owns, and declare war for them. But I cannot work out how to condition the claim/ownership requirement, and what I've tried has just resulted in it not appearing at all.

I thought it would be :
Code:
can_use_title = {          # Any Title which the
  ROOT = {                   # Person declaring war
   any_claim = {            # has a Claim on
    duchy = PREV         # Whose Duchy is the same as the Duchy identified by the CB
   }
  }
 }

based on reading the Wiki, but that results in nothing showing up
 
I'm trying to make a 'Duchy Claim' CB where by if I own or have a Strong Claim on "Province A", I can declare war for "Provinces A, B and C" because they're part of the same Duchy owned by the same person.

I've used a modified version of the tribal_invasion CB, and got to the point where I can bring up a list of all the Duchies the target owns, and declare war for them. But I cannot work out how to condition the claim/ownership requirement, and what I've tried has just resulted in it not appearing at all.

I thought it would be :
Code:
can_use_title = {          # Any Title which the
  ROOT = {                   # Person declaring war
   any_claim = {            # has a Claim on
    duchy = PREV         # Whose Duchy is the same as the Duchy identified by the CB
   }
  }
 }

based on reading the Wiki, but that results in nothing showing up

Try any_de_jure_vassal_title = { claimed_by = ROOT } in the title scope.
 
So, I streamlined the whole thing a bit and fired the event in the console. Everything works fine and the tooltip tells us about the right number of units - but no units spawn! Removing the weight_multiplier does nothing. Could it be that I need to give them characters to lead them as it is done in rebellion/civil war loyalist event? (I don't thing so.)

Code:
# Help North Africa survive the onslaught of Christians
character_event = {
    id = 855438 #just some random numbers
    desc = "The Tribes come to defend against the infidels!"
    picture = "GFX_evt_battle"
    border = "GFX_event_normal_frame_war"
    
    is_triggered_only = yes
    
    trigger = {
        #on_war_started = ROOT #?
        war = yes
        religion_group = muslim
        is_primary_war_defender = yes
        
        OR = {
            culture_group = arabic
            #culture_group = iranian
            culture_group = east_african
            culture_group = west_african
        }
        OR = {
            any_war = { using_cb = crusade }
            any_war = { using_cb = religious }
        }
        capital_scope = {
            AND = {
                religion_group = muslim
                #region = world_africa_north
                OR = {
                    culture_group = arabic
                    #culture_group = iranian
                    culture_group = east_african
                    culture_group = west_african
                }
            }
        #The capital must be within the arab empire or Mali and also be of the correct culture and religion. Or probably not.
        }
        #NOT = { realm_size = 100 }
        #realm_character_percent = {
        #    target = 0.5
        #    religion_group = muslim
        #}
        #NOR = {
        has_earmarked_regiments = tribal_defenders1
        has_earmarked_regiments = tribal_defenders2
        has_earmarked_regiments = tribal_defenders3
        #}
    }
    
    weight_multiplier = {
        days = 10
        modifier = {
            factor = 2
            NOT = { prestige = 100 }
        }
        modifier = {
            factor = 2
            NOT = { piety = 100 }
        }
        modifier = {
            factor = 1.2
            realm_size = 25
        }
        modifier = {
            factor = 1.2
            realm_size = 50
        }
        modifier = {
            factor = 1.2
            realm_size = 75
        }
    }
    
    option = {
        name = "EXCELLENT"
        
        
        capital_scope = {
            tooltip = {
                ROOT = {
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        earmark = tribal_defenders1
                        troops = {
                            light_cavalry = { 1000 1000 }
                            archer_cavalry = { 500 500 }
                        }
                        #match_character = ROOT
                        #match_mult = 0.05
                        disband_on_peace
                        attrition = 1.0
                    }
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        earmark = tribal_defenders2
                        match_character = ROOT
                        match_mult = 0.05
                        disband_on_peace
                        attrition = 1.0
                    }
                    spawn_unit = {
                        province = PREV
                        owner = ROOT
                        earmark = tribal_defenders3
                        match_character = ROOT
                        match_mult = 0.05
                        disband_on_peace
                        attrition = 1.0
                    }
                }
            }
        }
    }
}
 
You have the spawn unit commands in a tooltip block - this causes the event to display them in the tooltip, but not actually create them. Remove the tooltip block.

On an unrelated note, you might want to change
Code:
name = "EXCELLENT"
to
Code:
name = EXCELLENT
The former displays EXCELLENT, in all caps, in English. The latter uses an existing localization key to display Excellent, with proper capitalization, in the player's selected language.
 
You have the spawn unit commands in a tooltip block - this causes the event to display them in the tooltip, but not actually create them. Remove the tooltip block.
Thanks! I have no experience with setting tooltips, so I just copied most of the event code from a similar one and hoped it'd work.
Edit: I have to replace archer_cavalry with horse_archers. And although I can fire the event via console perfectly fine, the event doesn't fire on its own.. oh my.

The former displays EXCELLENT, in all caps, in English. The latter using an existing localization key to display Excellent, with proper capitalization, in the player's selected language.
Both are fine, but its good to know how this works in CK 2. I only did some modding for Vic 2 and there everything seems to be in "".
 
Last edited:
I haven't tried modding Vic 2, but in CK2 and EU4 the quotes indicate a literal string. Without the quotes, it's treated as a localisation key.
Not strictly true, even with quotes it still looks for the loc key first. For example many of the options in the feast events use name = "KEY" and it prints the appropriate loc instead of the literal string of the key name.