• 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.
Okay, quick question, when a ruler dies with no heirs at all and the title defaults back to the liege, are all courtiers killed? Because I'm trying to track an important courtier and they have a habit of dying on the same day as the old ruler whose court they are currently staying in. Is there any possible way to mark the character as not to be removed too?

EDIT: Proved my theory. Courtiers are killed. Any possible solutions?

There was a parameter added in 2.4.1 to the create_character command:
Create character effect now can set up the new character as historical (e.g. won't ever be pruned from the database), use historical = yes
But in your case the courtier was generated automatically, not by event ?
 
There was a parameter added in 2.4.1 to the create_character command:

But in your case the courtier was generated automatically, not by event ?

Well, if you mean by automatically, the courtier is in the history files to begin with like all other characters who appear at that start date. So can I add the historical = yes command to the character history file?

EDIT: Yes, I can use "historical = yes" in the history files. That fixes my problem, but is there technically a way to attach historical = yes to any character whose not in the history files, and not created by event?
 
Last edited:
  • 1
Reactions:
Does anyone know if this character, Abdullah ibn Wahb al-Rasibi (fifth Ibadi Caliph), exist in the game? Thanks.
 
Is there a way to fuse the functions of the government icon and the realm tree button? I mean, making it so clicking on the government icon open the realm tree window, like right now you can click the dynasty shield to open the family tree.

Haven't done much interface modding, but the problem I see is that the value used to display a certain icon (let's say $character.government.index), or the function called by a button (ex: openRealmTree()), are not declared directly in .gui files themselves, but rather attached indirectly by the engine automatically (based on the component names ?).

Code:
iconType = {
         name ="government_icon"
         spriteType = "GFX_icon_feudal_government"
         position = { x= 347 y = 38 }
         Orientation = "UPPER_LEFT"
 }
guiButtonType =   {
       name = "button_realmtree"
       position = { x= 484 y = 75 }
       quadTextureSprite ="GFX_charview_goto_hierarchy"   
       Orientation = "UPPER_LEFT"
       clicksound = generic_click_04
       pdx_tooltip = "REALM_TREE_INTERFACE_LABEL"
}

An idea which very likely doesn't work, but you never know:
If having two buttons with the same name in a .gui file is allowed, and if the engine binds the function to both in such a case, you'd need a transparent button named button_realmtree at same position as existing iconType government_icon. This is really some wild guessing here :)
 
Haven't done much interface modding, but the problem I see is that the value used to display a certain icon (let's say $character.government.index), or the function called by a button (ex: openRealmTree()), are not declared directly in .gui files themselves, but rather attached indirectly by the engine automatically (based on the component names ?).

Code:
iconType = {
         name ="government_icon"
         spriteType = "GFX_icon_feudal_government"
         position = { x= 347 y = 38 }
         Orientation = "UPPER_LEFT"
}
guiButtonType =   {
       name = "button_realmtree"
       position = { x= 484 y = 75 }
       quadTextureSprite ="GFX_charview_goto_hierarchy"  
       Orientation = "UPPER_LEFT"
       clicksound = generic_click_04
       pdx_tooltip = "REALM_TREE_INTERFACE_LABEL"
}

An idea which very likely doesn't work, but you never know:
If having two buttons with the same name in a .gui file is allowed, and if the engine binds the function to both in such a case, you'd need a transparent button named button_realmtree at same position as existing iconType government_icon. This is really some wild guessing here :)

I tried something like that. But the government icon appears "over" the button, rendering it unclickable. But thanks for the imput anyway!

New question:
How do I set a graphical culture to use some custom-made early and late clothes?
 
I tried something like that. But the government icon appears "over" the button, rendering it unclickable. But thanks for the imput anyway!
Erf, yeah there's no z-index for position ...

How do I set a graphical culture to use some custom-made early and late clothes?

You'll need to define some portraitType with the name PORTRAIT_<culturegfx>_male_early, PORTRAIT_<culturegfx>_male_late etc. (variations for male/female and the 3 ages)
If such portraitType exist the game will use them, otherwise it will default to PORTRAIT_<culturegfx>_male
 
Since no one seems to answer separate threads regarding mod problems,I'm gonna post it here.
Long story short,made a personal mini mod that makes all Arabian cultures use the Persian portrait pack,eventually this issue came up :
uAehC3w.png


Does not happen to all characters, the only thing different about our guy here is that his father is Bedouin and his mother Visigothic.

Here's the code I used to make the portrait changes for the early muslim clothing pack (the same modification is used for regular portraits)


Code:
# hair, mouth, chin, nose, eyes, cheek, ear, neck
spriteTypes = {
   
############## Muslim ##########################

    spriteType = {
        name = "PORTRAIT_persiangfx_child_male"
        texturefile = "gfx\\characters\\default_son_persian.tga"
        noOfFrames = 1
        norefcount = yes
    }
   
    spriteType = {
        name = "PORTRAIT_persiangfx_child_female"
        texturefile = "gfx\\characters\\default_daughter_persian.tga"
        noOfFrames = 1
        norefcount = yes
    }
   
    ### persian MALE ####
   
    spriteType = {
        name = "GFX_persian_male_clothes_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_clothes_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_headgear_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_headgear_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_base"
        texturefile = "gfx\\characters\\persian_male\\persian_male_base_1.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_base_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_base_2.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_base_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_base_3.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_behind_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_behind_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_behind_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_behind_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_behind_3.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_behind_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_behind_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_behind_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_behind_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_behind_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

   
    spriteType = {
        name = "GFX_persian_male_cheeks"
        texturefile = "gfx\\characters\\persian_male\\persian_male_cheeks_1.dds"
        noOfFrames = 10
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_male_cheeks_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_cheeks_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_male_cheeks_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_cheeks_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_neck"
        texturefile = "gfx\\characters\\persian_male\\persian_male_neck_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_neck_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_neck_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_neck_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_neck_3.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_chin"
        texturefile = "gfx\\characters\\persian_male\\persian_male_chin_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_chin_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_chin_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_chin_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_chin_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_mouth"
        texturefile = "gfx\\characters\\persian_male\\persian_male_mouth_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_mouth_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_mouth_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_mouth_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_mouth_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_nose"
        texturefile = "gfx\\characters\\persian_male\\persian_male_nose_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_nose_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_nose_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_male_nose_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_nose_3.dds"
        noOfFrames = 10
        norefcount = yes
    }


    spriteType = {
        name = "GFX_persian_male_eyes"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_eyes_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_eyes_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_eyes2"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_headgear_mid"
        texturefile = "gfx\\characters\\persian_male\\persian_male_headgear_mid.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_ear"
        texturefile = "gfx\\characters\\persian_male\\persian_male_ear_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_ear_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_ear_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_ear_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_ear_3.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_3.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_clothes"
        texturefile = "gfx\\characters\\persian_male\\persian_male_clothes.dds"
        noOfFrames = 12
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_male_headgear"
        texturefile = "gfx\\characters\\persian_male\\persian_male_headgear.dds"
        noOfFrames = 12
        norefcount = yes
    }

    # CULTURE_INDEX: 0 = clothes behind, 1 = headgear behind, 2 = clothes, 3 = headgear mid, 4 = clothes infront, 5 = headgear
   
    # Muslim male
    portraitType = {
        name = "PORTRAIT_muslimgfx_male_early"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"               
            "GFX_muslim_male_clothes_behind_early:p3:c0"
            "GFX_muslim_male_headgear_behind_early:p5:c1"
            "GFX_persian_male_hair_behind:p1:h:y"
            "GFX_persian_male_beard_behind:p4:h:y"
            "GFX_persian_male_base:p2"                   
            "GFX_persian_male_neck:d0"
            "GFX_persian_male_chin:d1"
            "GFX_persian_male_cheeks:d4"
            "GFX_persian_male_mouth:d2"                   
            "GFX_persian_male_eyes:d6"
            "GFX_persian_male_nose:d3"
            "GFX_persian_male_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_muslim_male_clothes_early:p3:c2"       
            "GFX_persian_male_ear:d7"
            "GFX_persian_male_beard:p4:h:y"
               "GFX_persian_male_hair:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_male_headgear_early:p5:c5"               
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
       
        headgear_that_hides_hair = { 10 }
    }
   
    # Muslim male midage
    portraitType = {
        name = "PORTRAIT_muslimgfx_male_early1"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_male_clothes_behind_early:p3:c0"
            "GFX_muslim_male_headgear_behind_early:p5:c1"
            "GFX_persian_male_hair_behind_midage:p1:h:y"
            "GFX_persian_male_beard_behind_midage:p4:h:y"
            "GFX_persian_male_base_midage:p2"
            "GFX_persian_male_neck_midage:d0"
            "GFX_persian_male_chin_midage:d1"
            "GFX_persian_male_cheeks_midage:d4"
            "GFX_persian_male_mouth_midage:d2"
            "GFX_persian_male_eyes_midage:d6"
            "GFX_persian_male_nose_midage:d3"
            "GFX_persian_male_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_muslim_male_clothes_early:p3:c2"
            "GFX_persian_male_ear_midage:d7"
            "GFX_persian_male_beard_midage:p4:h:y"
            "GFX_persian_male_hair_midage:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_male_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }


        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
       
        headgear_that_hides_hair = { 10 }
    }
   
    # Muslim male oldage
    portraitType = {
        name = "PORTRAIT_muslimgfx_male_early2"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_male_clothes_behind_early:p3:c0"
            "GFX_muslim_male_headgear_behind_early:p5:c1"
            "GFX_persian_male_hair_behind_oldage:p1:h:y"
            "GFX_persian_male_beard_behind_oldage:p4:h:y"
            "GFX_persian_male_base_oldage:p2"
            "GFX_persian_male_neck_oldage:d0"
            "GFX_persian_male_chin_oldage:d1"
            "GFX_persian_male_cheeks_oldage:d4"
            "GFX_persian_male_mouth_oldage:d2"
            "GFX_persian_male_eyes_oldage:d6"
            "GFX_persian_male_nose_oldage:d3"
            "GFX_persian_male_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_muslim_male_clothes_early:p3:c2"
            "GFX_persian_male_ear_oldage:d7"
            "GFX_persian_male_beard_oldage:p4:h:y"
            "GFX_persian_male_hair_oldage:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_male_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  200 200 200 } { 255 255 255 } #Black
            { 10 10 10 } { 46 42 39 } { 255 255 255 } #Second Black
            { 10 10 10 } { 185 185 185 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
       
        headgear_that_hides_hair = { 10 }
    }

#### Muslim FEMALE ####

    spriteType = {
        name = "GFX_persian_female_clothes_behind"
        texturefile = "gfx\\characters\\persian_female\\persian_female_clothes_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_headgear_behind"
        texturefile = "gfx\\characters\\persian_female\\persian_female_headgear_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_behind"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_behind_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_behind_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_behind_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_behind_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_behind_3.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_base"
        texturefile = "gfx\\characters\\persian_female\\persian_female_base_1.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_base_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_base_2.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_base_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_base_3.dds"
        noOfFrames = 1
        norefcount = yes
    }

   
    spriteType = {
        name = "GFX_persian_female_cheeks"
        texturefile = "gfx\\characters\\persian_female\\persian_female_cheeks_1.dds"
        noOfFrames = 10
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_female_cheeks_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_cheeks_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_female_cheeks_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_cheeks_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_neck"
        texturefile = "gfx\\characters\\persian_female\\persian_female_neck_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_neck_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_neck_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_neck_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_neck_3.dds"
        noOfFrames = 4
        norefcount = yes
    }


    spriteType = {
        name = "GFX_persian_female_chin"
        texturefile = "gfx\\characters\\persian_female\\persian_female_chin_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_chin_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_chin_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_chin_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_chin_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_mouth"
        texturefile = "gfx\\characters\\persian_female\\persian_female_mouth_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_mouth_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_mouth_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_mouth_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_mouth_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_nose"
        texturefile = "gfx\\characters\\persian_female\\persian_female_nose_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_nose_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_nose_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_female_nose_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_nose_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes2"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes2.dds"
        noOfFrames = 10
        norefcount = yes
    }


    spriteType = {
        name = "GFX_persian_female_ear"
        texturefile = "gfx\\characters\\persian_female\\persian_female_ear_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_ear_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_ear_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_ear_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_ear_3.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_clothes"
        texturefile = "gfx\\characters\\persian_female\\persian_female_clothes.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_3.dds"
        noOfFrames = 15
        norefcount = yes
    }
   
    spriteType = {
        name = "GFX_persian_female_headgear"
        texturefile = "gfx\\characters\\persian_female\\persian_female_headgear.dds"
        noOfFrames = 12
        norefcount = yes
    }

    # Muslim female
    portraitType = {
        name = "PORTRAIT_muslimgfx_female_early"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_female_clothes_behind_early:p3:c0"
            "GFX_muslim_female_headgear_behind_early:p5:c1"
            "GFX_persian_female_hair_behind:p1:h:y"
            "GFX_persian_female_base:p2"
            "GFX_persian_female_neck:d0"
            "GFX_persian_female_chin:d1"
            "GFX_persian_female_mouth:d2"
            "GFX_persian_female_cheeks:d4"
            "GFX_persian_female_eyes:d6"
            "GFX_persian_female_nose:d3"
            "GFX_persian_female_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_persian_female_ear:d7"           
            "GFX_muslim_female_clothes_early:p3:c2"
            "GFX_empty:p5:c3"
            "GFX_persian_female_hair:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_female_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 15 8 0 } { 80 47 22 } { 255 255 255 } #Medium Brown
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 20 12 8 } { 78 54 37 } { 255 255 255 } #Second Brown
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 34 103 36 } #Green
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
       
        headgear_that_hides_hair = { 10 }
    }

    # Muslim female midage
    portraitType = {
        name = "PORTRAIT_muslimgfx_female_early1"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_female_clothes_behind_early:p3:c0"
            "GFX_muslim_female_headgear_behind_early:p5:c1"
            "GFX_persian_female_hair_behind_midage:p1:h:y"
            "GFX_persian_female_base_midage:p2"
            "GFX_persian_female_neck_midage:d0"
            "GFX_persian_female_chin_midage:d1"
            "GFX_persian_female_mouth_midage:d2"
            "GFX_persian_female_cheeks_midage:d4"
            "GFX_persian_female_eyes_midage:d6"
            "GFX_persian_female_nose_midage:d3"
            "GFX_persian_female_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_persian_female_ear_midage:d7"       
            "GFX_muslim_female_clothes_early:p3:c2"
            "GFX_empty:p5:c3"
            "GFX_persian_female_hair_midage:p1:h:y"           
            "GFX_empty:p3:c4"
            "GFX_muslim_female_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 15 8 0 } { 80 47 22 } { 255 255 255 } #Medium Brown
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 20 12 8 } { 78 54 37 } { 255 255 255 } #Second Brown
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 34 103 36 } #Green
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
       
        headgear_that_hides_hair = { 10 }
    }

    # Muslim female oldage
    portraitType = {
        name = "PORTRAIT_muslimgfx_female_early2"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_female_clothes_behind_early:p3:c0"
            "GFX_muslim_female_headgear_behind_early:p5:c1"
            "GFX_persian_female_hair_behind_oldage:p1:h:y"
            "GFX_persian_female_base_oldage:p2"
            "GFX_persian_female_neck_oldage:d0"
            "GFX_persian_female_chin_oldage:d1"
            "GFX_persian_female_mouth_oldage:d2"
            "GFX_persian_female_cheeks_oldage:d4"
            "GFX_persian_female_eyes_oldage:d6"
            "GFX_persian_female_nose_oldage:d3"
            "GFX_persian_female_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_persian_female_ear_oldage:d7"       
            "GFX_muslim_female_clothes_early:p3:c2"
            "GFX_empty:p5:c3"
            "GFX_persian_female_hair_oldage:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_female_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  200 200 200 } { 255 255 255 } #Black
            { 15 8 0 } { 174 166 160 } { 255 255 255 } #Medium Brown
            { 10 10 10 } { 46 42 39 } { 255 255 255 } #Second Black
            { 20 12 8 } { 138 116 99 } { 255 255 255 } #Second Brown
            { 10 10 10 } { 185 185 185 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 34 103 36 } #Green
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
       
        headgear_that_hides_hair = { 10 }
    }
   
}
 
Since no one seems to answer separate threads regarding mod problems,I'm gonna post it here.
Long story short,made a personal mini mod that makes all Arabian cultures use the Persian portrait pack,eventually this issue came up :
uAehC3w.png


Does not happen to all characters, the only thing different about our guy here is that his father is Bedouin and his mother Visigothic.

Here's the code I used to make the portrait changes for the early muslim clothing pack (the same modification is used for regular portraits)


Code:
# hair, mouth, chin, nose, eyes, cheek, ear, neck
spriteTypes = {
  
############## Muslim ##########################

    spriteType = {
        name = "PORTRAIT_persiangfx_child_male"
        texturefile = "gfx\\characters\\default_son_persian.tga"
        noOfFrames = 1
        norefcount = yes
    }
  
    spriteType = {
        name = "PORTRAIT_persiangfx_child_female"
        texturefile = "gfx\\characters\\default_daughter_persian.tga"
        noOfFrames = 1
        norefcount = yes
    }
  
    ### persian MALE ####
  
    spriteType = {
        name = "GFX_persian_male_clothes_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_clothes_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_headgear_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_headgear_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_base"
        texturefile = "gfx\\characters\\persian_male\\persian_male_base_1.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_base_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_base_2.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_base_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_base_3.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_behind_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_behind_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_behind_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_behind_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_behind_3.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_behind"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_behind_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_behind_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_behind_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_behind_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_behind_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

  
    spriteType = {
        name = "GFX_persian_male_cheeks"
        texturefile = "gfx\\characters\\persian_male\\persian_male_cheeks_1.dds"
        noOfFrames = 10
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_male_cheeks_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_cheeks_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_male_cheeks_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_cheeks_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_neck"
        texturefile = "gfx\\characters\\persian_male\\persian_male_neck_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_neck_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_neck_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_neck_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_neck_3.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_chin"
        texturefile = "gfx\\characters\\persian_male\\persian_male_chin_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_chin_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_chin_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_chin_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_chin_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_mouth"
        texturefile = "gfx\\characters\\persian_male\\persian_male_mouth_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_mouth_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_mouth_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_mouth_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_mouth_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_nose"
        texturefile = "gfx\\characters\\persian_male\\persian_male_nose_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_nose_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_nose_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_male_nose_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_nose_3.dds"
        noOfFrames = 10
        norefcount = yes
    }


    spriteType = {
        name = "GFX_persian_male_eyes"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_eyes_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_eyes_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_eyes2"
        texturefile = "gfx\\characters\\persian_male\\persian_male_eyes2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_headgear_mid"
        texturefile = "gfx\\characters\\persian_male\\persian_male_headgear_mid.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_ear"
        texturefile = "gfx\\characters\\persian_male\\persian_male_ear_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_ear_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_ear_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_ear_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_ear_3.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_beard_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_beard_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_midage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_hair_oldage"
        texturefile = "gfx\\characters\\persian_male\\persian_male_hair_3.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_male_clothes"
        texturefile = "gfx\\characters\\persian_male\\persian_male_clothes.dds"
        noOfFrames = 12
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_male_headgear"
        texturefile = "gfx\\characters\\persian_male\\persian_male_headgear.dds"
        noOfFrames = 12
        norefcount = yes
    }

    # CULTURE_INDEX: 0 = clothes behind, 1 = headgear behind, 2 = clothes, 3 = headgear mid, 4 = clothes infront, 5 = headgear
  
    # Muslim male
    portraitType = {
        name = "PORTRAIT_muslimgfx_male_early"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"              
            "GFX_muslim_male_clothes_behind_early:p3:c0"
            "GFX_muslim_male_headgear_behind_early:p5:c1"
            "GFX_persian_male_hair_behind:p1:h:y"
            "GFX_persian_male_beard_behind:p4:h:y"
            "GFX_persian_male_base:p2"                  
            "GFX_persian_male_neck:d0"
            "GFX_persian_male_chin:d1"
            "GFX_persian_male_cheeks:d4"
            "GFX_persian_male_mouth:d2"                  
            "GFX_persian_male_eyes:d6"
            "GFX_persian_male_nose:d3"
            "GFX_persian_male_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_muslim_male_clothes_early:p3:c2"      
            "GFX_persian_male_ear:d7"
            "GFX_persian_male_beard:p4:h:y"
               "GFX_persian_male_hair:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_male_headgear_early:p5:c5"              
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
      
        headgear_that_hides_hair = { 10 }
    }
  
    # Muslim male midage
    portraitType = {
        name = "PORTRAIT_muslimgfx_male_early1"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_male_clothes_behind_early:p3:c0"
            "GFX_muslim_male_headgear_behind_early:p5:c1"
            "GFX_persian_male_hair_behind_midage:p1:h:y"
            "GFX_persian_male_beard_behind_midage:p4:h:y"
            "GFX_persian_male_base_midage:p2"
            "GFX_persian_male_neck_midage:d0"
            "GFX_persian_male_chin_midage:d1"
            "GFX_persian_male_cheeks_midage:d4"
            "GFX_persian_male_mouth_midage:d2"
            "GFX_persian_male_eyes_midage:d6"
            "GFX_persian_male_nose_midage:d3"
            "GFX_persian_male_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_muslim_male_clothes_early:p3:c2"
            "GFX_persian_male_ear_midage:d7"
            "GFX_persian_male_beard_midage:p4:h:y"
            "GFX_persian_male_hair_midage:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_male_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }


        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
      
        headgear_that_hides_hair = { 10 }
    }
  
    # Muslim male oldage
    portraitType = {
        name = "PORTRAIT_muslimgfx_male_early2"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_male_clothes_behind_early:p3:c0"
            "GFX_muslim_male_headgear_behind_early:p5:c1"
            "GFX_persian_male_hair_behind_oldage:p1:h:y"
            "GFX_persian_male_beard_behind_oldage:p4:h:y"
            "GFX_persian_male_base_oldage:p2"
            "GFX_persian_male_neck_oldage:d0"
            "GFX_persian_male_chin_oldage:d1"
            "GFX_persian_male_cheeks_oldage:d4"
            "GFX_persian_male_mouth_oldage:d2"
            "GFX_persian_male_eyes_oldage:d6"
            "GFX_persian_male_nose_oldage:d3"
            "GFX_persian_male_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_muslim_male_clothes_early:p3:c2"
            "GFX_persian_male_ear_oldage:d7"
            "GFX_persian_male_beard_oldage:p4:h:y"
            "GFX_persian_male_hair_oldage:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_male_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  200 200 200 } { 255 255 255 } #Black
            { 10 10 10 } { 46 42 39 } { 255 255 255 } #Second Black
            { 10 10 10 } { 185 185 185 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
      
        headgear_that_hides_hair = { 10 }
    }

#### Muslim FEMALE ####

    spriteType = {
        name = "GFX_persian_female_clothes_behind"
        texturefile = "gfx\\characters\\persian_female\\persian_female_clothes_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_headgear_behind"
        texturefile = "gfx\\characters\\persian_female\\persian_female_headgear_behind.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_behind"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_behind_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_behind_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_behind_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_behind_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_behind_3.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_base"
        texturefile = "gfx\\characters\\persian_female\\persian_female_base_1.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_base_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_base_2.dds"
        noOfFrames = 1
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_base_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_base_3.dds"
        noOfFrames = 1
        norefcount = yes
    }

  
    spriteType = {
        name = "GFX_persian_female_cheeks"
        texturefile = "gfx\\characters\\persian_female\\persian_female_cheeks_1.dds"
        noOfFrames = 10
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_female_cheeks_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_cheeks_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_female_cheeks_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_cheeks_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_neck"
        texturefile = "gfx\\characters\\persian_female\\persian_female_neck_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_neck_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_neck_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_neck_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_neck_3.dds"
        noOfFrames = 4
        norefcount = yes
    }


    spriteType = {
        name = "GFX_persian_female_chin"
        texturefile = "gfx\\characters\\persian_female\\persian_female_chin_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_chin_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_chin_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_chin_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_chin_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_mouth"
        texturefile = "gfx\\characters\\persian_female\\persian_female_mouth_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_mouth_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_mouth_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_mouth_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_mouth_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_nose"
        texturefile = "gfx\\characters\\persian_female\\persian_female_nose_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_nose_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_nose_2.dds"
        noOfFrames = 10
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_female_nose_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_nose_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes_1.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes_2.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes_3.dds"
        noOfFrames = 10
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_eyes2"
        texturefile = "gfx\\characters\\persian_female\\persian_female_eyes2.dds"
        noOfFrames = 10
        norefcount = yes
    }


    spriteType = {
        name = "GFX_persian_female_ear"
        texturefile = "gfx\\characters\\persian_female\\persian_female_ear_1.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_ear_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_ear_2.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_ear_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_ear_3.dds"
        noOfFrames = 4
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_clothes"
        texturefile = "gfx\\characters\\persian_female\\persian_female_clothes.dds"
        noOfFrames = 12
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_1.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_midage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_2.dds"
        noOfFrames = 15
        norefcount = yes
    }

    spriteType = {
        name = "GFX_persian_female_hair_oldage"
        texturefile = "gfx\\characters\\persian_female\\persian_female_hair_3.dds"
        noOfFrames = 15
        norefcount = yes
    }
  
    spriteType = {
        name = "GFX_persian_female_headgear"
        texturefile = "gfx\\characters\\persian_female\\persian_female_headgear.dds"
        noOfFrames = 12
        norefcount = yes
    }

    # Muslim female
    portraitType = {
        name = "PORTRAIT_muslimgfx_female_early"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_female_clothes_behind_early:p3:c0"
            "GFX_muslim_female_headgear_behind_early:p5:c1"
            "GFX_persian_female_hair_behind:p1:h:y"
            "GFX_persian_female_base:p2"
            "GFX_persian_female_neck:d0"
            "GFX_persian_female_chin:d1"
            "GFX_persian_female_mouth:d2"
            "GFX_persian_female_cheeks:d4"
            "GFX_persian_female_eyes:d6"
            "GFX_persian_female_nose:d3"
            "GFX_persian_female_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_persian_female_ear:d7"          
            "GFX_muslim_female_clothes_early:p3:c2"
            "GFX_empty:p5:c3"
            "GFX_persian_female_hair:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_female_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 15 8 0 } { 80 47 22 } { 255 255 255 } #Medium Brown
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 20 12 8 } { 78 54 37 } { 255 255 255 } #Second Brown
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 34 103 36 } #Green
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
      
        headgear_that_hides_hair = { 10 }
    }

    # Muslim female midage
    portraitType = {
        name = "PORTRAIT_muslimgfx_female_early1"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_female_clothes_behind_early:p3:c0"
            "GFX_muslim_female_headgear_behind_early:p5:c1"
            "GFX_persian_female_hair_behind_midage:p1:h:y"
            "GFX_persian_female_base_midage:p2"
            "GFX_persian_female_neck_midage:d0"
            "GFX_persian_female_chin_midage:d1"
            "GFX_persian_female_mouth_midage:d2"
            "GFX_persian_female_cheeks_midage:d4"
            "GFX_persian_female_eyes_midage:d6"
            "GFX_persian_female_nose_midage:d3"
            "GFX_persian_female_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_persian_female_ear_midage:d7"      
            "GFX_muslim_female_clothes_early:p3:c2"
            "GFX_empty:p5:c3"
            "GFX_persian_female_hair_midage:p1:h:y"          
            "GFX_empty:p3:c4"
            "GFX_muslim_female_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  50 50 50 } { 255 255 255 } #Black
            { 15 8 0 } { 80 47 22 } { 255 255 255 } #Medium Brown
            { 10 10 10 } { 27 25 23 } { 255 255 255 } #Second Black
            { 20 12 8 } { 78 54 37 } { 255 255 255 } #Second Brown
            { 10 10 10 } { 65 65 65 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 34 103 36 } #Green
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
      
        headgear_that_hides_hair = { 10 }
    }

    # Muslim female oldage
    portraitType = {
        name = "PORTRAIT_muslimgfx_female_early2"
        effectFile = "gfx/FX/portrait.lua"
        layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
            "GFX_character_background:p0"
            "GFX_muslim_female_clothes_behind_early:p3:c0"
            "GFX_muslim_female_headgear_behind_early:p5:c1"
            "GFX_persian_female_hair_behind_oldage:p1:h:y"
            "GFX_persian_female_base_oldage:p2"
            "GFX_persian_female_neck_oldage:d0"
            "GFX_persian_female_chin_oldage:d1"
            "GFX_persian_female_mouth_oldage:d2"
            "GFX_persian_female_cheeks_oldage:d4"
            "GFX_persian_female_eyes_oldage:d6"
            "GFX_persian_female_nose_oldage:d3"
            "GFX_persian_female_eyes2:d6:e"
            "GFX_character_scars:p7:y"
            "GFX_character_reddots:p8"
            "GFX_character_boils:p9"
            "GFX_character_blinded_eyes:p10"
            "GFX_persian_female_ear_oldage:d7"      
            "GFX_muslim_female_clothes_early:p3:c2"
            "GFX_empty:p5:c3"
            "GFX_persian_female_hair_oldage:p1:h:y"
            "GFX_empty:p3:c4"
            "GFX_muslim_female_headgear_early:p5:c5"
            "GFX_character_imprisoned:p6"
            "GFX_player_overlay:p11"
        }

        hair_color_index = 8
        hair_color = { # dark, base, highlight
            { 10 10 10 } {  200 200 200 } { 255 255 255 } #Black
            { 15 8 0 } { 174 166 160 } { 255 255 255 } #Medium Brown
            { 10 10 10 } { 46 42 39 } { 255 255 255 } #Second Black
            { 20 12 8 } { 138 116 99 } { 255 255 255 } #Second Brown
            { 10 10 10 } { 185 185 185 } { 255 255 255 } #Third Black
        }

        eye_color_index = 9
        eye_color = {
            { 120 74 46 } #Brown
            { 34 103 36 } #Green
            { 86 74 46 } #Second Brown
            { 36 32 24 } #Dark Brown
        }
      
        headgear_that_hides_hair = { 10 }
    }
  
}

Maybe something is amiss witth the graphicalculturetypes? What is the graphical culture of the "invisible man" in the screenshot?

@Romulien Thanks for the tips!
 
Hm I do not know,how can I check it? He is a mixture of Bedouin and Visigoth,not sure what that adds up to

using charinfo 1 in consolo and hovering over the character's portrait you should get his graphical culture, among other useful info. At least with that info you'll know which is the portrait set that's bugged.
Normally that behaviour is caused by the .gfx file calling a .dds or .tga file that does not exists/has another name. This tends to happen if you define a custom portrait set to use a DLC asset and don't have that DLC activated. So, if you are using visigothic assets, maybe you don't have activated the DLC for the early portraits? or the iberian portraits? That or a faulty name in the .gfx file you quoted above, which I cannot spot myself.
 
Well I can't activate charinfo because it's ironman :/ also I have all the portrait DLC's activated. It's strange that the error occurs only between a mixture of those two cultures...the mod seems to work perfectly otherwise
 
So I'm trying to create an on_death event that hands all Duke-tier and King-tier titles of the recently deceased to the top liege, but this code isn't working. Is there anything missing?

Code:
#Duke or above titles in the Empire return to the Emperor on the death of the holder
character_event = {
    id = dote_empire.8
    hide_window = yes
  
    is_triggered_only = yes
  
    trigger = {
          is_theocracy = no
          top_liege = { has_landed_title = e_myempire}
    }
  
    immediate = {
        any_demesne_title = {
            limit = { higher_tier_than = count}
            top_liege = {
                gain_title = PREV
                letter_event = {
                    id = dote_empire.9  #Inform Top Liege
                }
            }
        }  
    }  
  
    option = {
        name = "Okay."
    }
}


EDIT: Figured it out, titles don't have lieges, only characters have lieges. This worked, for reference:

Code:
    immediate = {
        any_demesne_title = {
            limit = { higher_tier_than = count}
            holder_scope = {
                top_liege = {
                    usurp_title = prevprev
                    character_event = {
                        id = dote_empire.9  #Inform Top Liege
                    }
                }
            }
        }   
    }
 
Last edited:
Is there anywhere that has collected information on how the city models, on the map when zoomed in, are run by the game? Such as when it changes the size/which models are added for whatever conditions etc?
 
Q: To cache or not to cache?

The decision/ event content of my mod revolves around a hand full of traits
i.e.
potential = {
NOR = {
trait = example_trait 1
trait = example_trait 2
}
}
Because of this, I'm looking at the "cache = yes' option in traits and wondering what it does in more detail than can be found on the trait modding wiki, which says
cached = " All characters that have this trait will be cached for more efficient event trigger evaluation (should be a limited number)"

In particular, what I would like to know is what constitutes "should be a limited number?"

Also, I have an inheritance system for the traits which fires on the birth of every character in the game. Should I cache the five traits that are included in this event and would it lessen/ affect anything?

Thanks in advance for any incite.
 
Q: To cache or not to cache?

The decision/ event content of my mod revolves around a hand full of traits
i.e.
potential = {
NOR = {
trait = example_trait 1
trait = example_trait 2
}
}
Because of this, I'm looking at the "cache = yes' option in traits and wondering what it does in more detail than can be found on the trait modding wiki, which says
cached = " All characters that have this trait will be cached for more efficient event trigger evaluation (should be a limited number)"

In particular, what I would like to know is what constitutes "should be a limited number?"

Also, I have an inheritance system for the traits which fires on the birth of every character in the game. Should I cache the five traits that are included in this event and would it lessen/ affect anything?

Thanks in advance for any incite.

As far as I know, what cached = yes do is that say, if you add it to a trait named my_trat, in the script then you can use may_trait = {} to scope to all characters with that trait, without having to previously scope to any_character and test the presence of the trait in eveyone of them.

I'm now sure on how many traits it's advisable to have cached, though.
 
  • 1
  • 1
Reactions:
How do you run a console command from within a mod file? Eg. I'm trying to toggle "charinfo" from the intrigue menu.

Code:
    turnon_charinfo = {

        potential = {
           ai = no
            has_character_flag = cheats_enabled
            NOT = { has_global_flag = charinfo }
        }

        allow = {
            always = yes
        }

        effect = {
            set_global_flag = charinfo
        }

        revoke_allowed = {
            always = no
        }

        ai_will_do = {
            factor = 0
        }
    }

Somewhere in there I'd like to activate "charinfo", and then I'll write a "turnoff_charinfo" function to reverse it. I plan to do the same with "quickbuild".

I don't know how to run console commands from the mod file. Any help?
 
How do you run a console command from within a mod file? Eg. I'm trying to toggle "charinfo" from the intrigue menu.

Code:
    turnon_charinfo = {

        potential = {
           ai = no
            has_character_flag = cheats_enabled
            NOT = { has_global_flag = charinfo }
        }

        allow = {
            always = yes
        }

        effect = {
            set_global_flag = charinfo
        }

        revoke_allowed = {
            always = no
        }

        ai_will_do = {
            factor = 0
        }
    }

Somewhere in there I'd like to activate "charinfo", and then I'll write a "turnoff_charinfo" function to reverse it. I plan to do the same with "quickbuild".

I don't know how to run console commands from the mod file. Any help?
You can't, you just have to use the console like normal. Console commands are not usable as effects