• 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.

gza1991

Private
Apr 7, 2019
20
1
Hello! I am trying to figure out how to add crowns to portraits but also keep the original crowns (the crown of lombardy, hre crown etc). I have tried to add some items but the original crowns visuals are replaced with the added crowns visuals. What am I doing wrong. Please help if you can. Thanks.
 
Here is what I did, omitting the creation of a new artifact.

1. I created copies of "special_crowns.dds" and "special_crowns_behind.dds" and placed them in my mod, then I increased the width of each image by 2 pixels on the left-hand side, this is because of a slight mistake by Paradox.
2. I further increased the widths by 152 pixels, this time on the right-hand side, this is where the new crown images were added.

3. I opened my mod's version of "00_portrait_properties.txt", located "p18 Special crowns_behind" and scrolled down to
Code:
            OR = {
                trait = dead_crown_hre #Dead kings don't have artifacts
                trait = dead_crown_byzantine #Dead kings don't have artifacts
                trait = dead_crown_pahlavi #Dead kings don't have artifacts
                trait = dead_crown_fylkir #Dead kings don't have artifacts
                trait = dead_crown_tengri_fylkir #Dead kings don't have artifacts
                trait = dead_crown_finnish_fylkir #Dead kings don't have artifacts
                trait = dead_crown_slavic_fylkir
                trait = dead_crown_romuva_fylkir
                trait = dead_crown_zun_fylkir
                trait = dead_crown_west_african_fylkir
                trait = dead_crown_aztec_fylkir
                trait = augustus # Laurels
            }
where I added "trait = dead_myartifact", and to
Code:
                OR = {
                    artifact_type = crown_hre
                    artifact_type = crown_byzantine
                    artifact_type = crown_pahlavi
                    artifact_type = crown_fylkir
                    artifact_type = crown_tengri_fylkir
                    artifact_type = crown_finnish_fylkir
                    artifact_type = crown_slavic_fylkir
                    artifact_type = crown_romuva_fylkir
                    artifact_type = crown_zun_fylkir
                    artifact_type = crown_west_african_fylkir
                    artifact_type = crown_aztec_fylkir
                    artifact_type = iron_crown_of_lombardy
                    artifact_type = cursed_diamond_crown
                    artifact_type = myartifact
                }
where I added "artifact_type = myartifact".

4. Further down I added the following:
Code:
    16 = {
        factor = 1
        modifier = {
            factor = 0
            NOT = { has_portrait_property = { layer = 19 index = 16 } }
        }
    }
remembering to keep it inside p18's closing bracket.

5. I repeated step 3 for p19, then I added the following to the bottom:
Code:
    16 = {
        factor = 100
        hide_layers = { 5 = { } } #Hide layer 5 (headgear) when this frame is picked.
        modifier = {
            factor = 0
            NOR = {
                any_artifact = {
                    artifact_type = myartifact
                    is_artifact_equipped = yes
                }
                trait = dead_myartifact
            }
        }
    }
remembering to keep it inside p19s closing bracket.

6. I opened my mod's version of portrait_spirtes.gfx, located these
Code:
    spriteType = {
        name = "GFX_character_special_crowns"
        texturefile = "gfx\\characters\\shared\\special_crowns.dds"
        noOfFrames = 16
        norefcount = yes
        can_be_lowres = yes
    }
    spriteType = {
        name = "GFX_character_special_crowns_behind"
        texturefile = "gfx\\characters\\shared\\special_crowns_behind.dds"
        noOfFrames = 16
        norefcount = yes
        can_be_lowres = yes
    }
and replaced "noOfFrames = 16" with "noOfFrames = 17" in both.
myartifact.png

One may want to move the new images in "special_crowns.dds" and "special_crowns_behind.dds" by a few pixels to the left, perhaps some of the original ones too!
 
  • 1Like
Reactions:
Here is what I did, omitting the creation of a new artifact.

1. I created copies of "special_crowns.dds" and "special_crowns_behind.dds" and placed them in my mod, then I increased the width of each image by 2 pixels on the left-hand side, this is because of a slight mistake by Paradox.
2. I further increased the widths by 152 pixels, this time on the right-hand side, this is where the new crown images were added.

3. I opened my mod's version of "00_portrait_properties.txt", located "p18 Special crowns_behind" and scrolled down to
Code:
            OR = {
                trait = dead_crown_hre #Dead kings don't have artifacts
                trait = dead_crown_byzantine #Dead kings don't have artifacts
                trait = dead_crown_pahlavi #Dead kings don't have artifacts
                trait = dead_crown_fylkir #Dead kings don't have artifacts
                trait = dead_crown_tengri_fylkir #Dead kings don't have artifacts
                trait = dead_crown_finnish_fylkir #Dead kings don't have artifacts
                trait = dead_crown_slavic_fylkir
                trait = dead_crown_romuva_fylkir
                trait = dead_crown_zun_fylkir
                trait = dead_crown_west_african_fylkir
                trait = dead_crown_aztec_fylkir
                trait = augustus # Laurels
            }
where I added "trait = dead_myartifact", and to
Code:
                OR = {
                    artifact_type = crown_hre
                    artifact_type = crown_byzantine
                    artifact_type = crown_pahlavi
                    artifact_type = crown_fylkir
                    artifact_type = crown_tengri_fylkir
                    artifact_type = crown_finnish_fylkir
                    artifact_type = crown_slavic_fylkir
                    artifact_type = crown_romuva_fylkir
                    artifact_type = crown_zun_fylkir
                    artifact_type = crown_west_african_fylkir
                    artifact_type = crown_aztec_fylkir
                    artifact_type = iron_crown_of_lombardy
                    artifact_type = cursed_diamond_crown
                    artifact_type = myartifact
                }
where I added "artifact_type = myartifact".

4. Further down I added the following:
Code:
    16 = {
        factor = 1
        modifier = {
            factor = 0
            NOT = { has_portrait_property = { layer = 19 index = 16 } }
        }
    }
remembering to keep it inside p18's closing bracket.

5. I repeated step 3 for p19, then I added the following to the bottom:
Code:
    16 = {
        factor = 100
        hide_layers = { 5 = { } } #Hide layer 5 (headgear) when this frame is picked.
        modifier = {
            factor = 0
            NOR = {
                any_artifact = {
                    artifact_type = myartifact
                    is_artifact_equipped = yes
                }
                trait = dead_myartifact
            }
        }
    }
remembering to keep it inside p19s closing bracket.

6. I opened my mod's version of portrait_spirtes.gfx, located these
Code:
    spriteType = {
        name = "GFX_character_special_crowns"
        texturefile = "gfx\\characters\\shared\\special_crowns.dds"
        noOfFrames = 16
        norefcount = yes
        can_be_lowres = yes
    }
    spriteType = {
        name = "GFX_character_special_crowns_behind"
        texturefile = "gfx\\characters\\shared\\special_crowns_behind.dds"
        noOfFrames = 16
        norefcount = yes
        can_be_lowres = yes
    }
and replaced "noOfFrames = 16" with "noOfFrames = 17" in both.
View attachment 739985
One may want to move the new images in "special_crowns.dds" and "special_crowns_behind.dds" by a few pixels to the left, perhaps some of the original ones too!
Wow thank you! What did you use to stretch the image? Gimp or Photoshop?