• 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.
Hello! I am having an issue and was hoping someone could assist. I am currently tying to add crowns (that can be seen on the portrait) to the game but keep the old crowns as well. I have tried to combine the graphics together into one long gfx, but the crowns are not appearing in game. Would anyone know what I am doing wrong?
 
Hello! I am having an issue and was hoping someone could assist. I am currently tying to add crowns (that can be seen on the portrait) to the game but keep the old crowns as well. I have tried to combine the graphics together into one long gfx, but the crowns are not appearing in game. Would anyone know what I am doing wrong?
For a crown protrait modding, you'll need:
modify interface\portrait_properties\00_portrait_properties.txt: p18 and p19 with corresponding trigger
modify interface\portraits\portrait_sprites.gfx: noOfFrames
modify gfx\characters\shared\special_crowns.dds
modify gfx\characters\shared\special_crowns_behind.dds

Since you did not provide solid files, I can only give out these step for your debugging.
 
Hello! I am having an issue and was hoping someone could assist. I am currently tying to add crowns (that can be seen on the portrait) to the game but keep the old crowns as well. I have tried to combine the graphics together into one long gfx, but the crowns are not appearing in game. Would anyone know what I am doing wrong?
How wide is your combined file? There is a maximum number of frames allowed.

nd
 
There are 42 in all in the combined file. What is the limit? And how would i put a second file in for crowns?
That would be it, then - the maximum number of frames is 26. (This corresponds to the use of letters for character DNA entries.)

You would need to add a separate file, a separate corresponding sprite definition, and then add a clause to the portrait properties file so that there was a new layer corresponding to your crowns, and suppressing the existing crown layer and displaying yours instead where appropriate. You might also have to add the new layer to all the portrait definitions in the game, but I'm less certain of that bit. @Nendur is the true expert here.

nd
 
Modding some buildings. Made a custom fort building and a custom hospital building, they work fine. The trouble is when I try to restrict them to being built only in my capital province or my direct vassal's capital province.

I was previously using this format to restrict buildings to my capital holding and my direct vassals' capital holdings:

For me:
Code:
potential = {
                AND = {
                    FROM = {
                        capital_holding = {
                            title = FROMFROM
                        }
                    }
                    FROM = { trait = imperial_ruler }  #trait only player has
                }
        }
For my direct vassals:
Code:
potential = {
                AND = {
                    FROM = {
                        capital_holding = {
                            title = FROMFROM
                        }
                    }
                    FROM = { trait = imperial_governor }  #trait only player's direct vassals have
                }
        }

This isn't allowing them to be built, and I realized that this is because the capital_holding restriction is their capital barony rather than the fort or hospital in their capital province.

I'm scratching my head trying to figure out how to construct it differently so it can be built in their capital province. FROM is settlement holder and FROMFROM is the holding (which would be a fort or a hospital, depending on the building), but how do I tell the game to apply it only to a fort in the capital province of someone with the given trait?

Edit. After fiddling with it some more, I managed to crack the code.
Code:
county = {
                        location = {
                            FROM = {
                                is_capital = PREV
                            }
                        }
                }

Edit again. I'm making other buildings (for castles, cities, and temples) that I want to be buildable only in the capital provinces of my direct vassals (who have the imperial_governor trait). But it turns out the above code only works in holdings that the character directly holds, not vassal barons. I tried changing the code to this:
Code:
county = {
                        any_direct_de_jure_vassal_title = {
                            location = {
                                FROM = {
                                    is_capital = PREV
                                }
                            }
                        }
                    }
But that still doesn't allow the buildings to be constructed in vassal baronies. Any suggestions?
 
Last edited:
For bloodline buildings, will the building still be usable by a duke, if their emperor has the bloodline? Or must it be direct liege, the king?

If you're asking about the vanilla bloodline buildings, any liege will do. You can change that of course, if you wish.

Is there any way to change it so that you can usurp titles from a ruler of another religion who still holds titles within that land? Or is it hard coded?

Entirely hardcoded. Generally, the only way to change anything about unscriptable features are defines and I can't find anything related to this in there.
 
If you're asking about the vanilla bloodline buildings, any liege will do. You can change that of course, if you wish.



Entirely hardcoded. Generally, the only way to change anything about unscriptable features are defines and I can't find anything related to this in there.
Thanks. Yes, I looked in the defines too and found nothing.

I bet you could whip up a targeted diplomatic decision, and use it on someone to usurp a title from them if you control 51% of the land in the title, but I don't have the first clue how to construct that. Maybe something checking if they have any_title with 51% of the province controlled_by the player or something? But then I don't know how to construct that, especially not how to tell the game what "51%" of a title is, since every title has a different amount of provinces in it.
 
1627265865537.png


The % to create/usurp titles.

Mods to take titles are available in workshop. There is no condition to trace % of control, only N countys which would not work.
 
Hi can anyone help me scope to a parent's graphical culture / ethnicity that differs from their current culture.

For instance I have a character's whose graphical culture / ethnicity is English, but the culture he practices is Pictish. His wife's graphical culture / ethnicity is Persian, but the culture she practices is also Pictish.

When I do the set_graphical_culture = mother or set_graphical_culture = father, the game only detects the culture they are practicing which is Pictish instead of their actual ethnicity English or Persian.

If I do set_graphical_culture = race = mother or set_graphical_culture = race = father then the game just reads it as noculture.

I have also tried the set_graphical_culture = genetic_mother and set_graphical_culture = genetic_father which doesn't work either.

Also tried set_graphical_culture = portrait_culture = father and set_graphical_culture = gfx_culture_scope = father
 
Last edited:
Hi can anyone help me scope to a parent's graphical culture / ethnicity that differs from their current culture.

For instance I have a character's whose graphical culture / ethnicity is English, but the culture he practices is Pictish. His wife's graphical culture / ethnicity is Persian, but the culture she practices is also Pictish.
Try
Code:
father_even_if_dead = {
    gfx_culture_scope = {
        save_event_target_as = sperm_culture
    }
}
set_graphical_culture = event_target:sperm_culture
Sry but WTF is set_graphical_culture = portrait_culture = father something new math?
 
Try
Code:
father_even_if_dead = {
    gfx_culture_scope = {
        save_event_target_as = sperm_culture
    }
}
set_graphical_culture = event_target:sperm_culture
Sry but WTF is set_graphical_culture = portrait_culture = father something new math?
Thank you good sir.

I didn't know what to do so I just scoured all the modding pages, tried the gfx_culture_scope, when that didn't work I tried the portrait_culture value in the portraitt modding page. I literally tried every basic variation of code I could think of trying to get it to work for 4 hours this morning. Didn't know that save_event_target_as = was a thing.
 
Thank you good sir.

I didn't know what to do so I just scoured all the modding pages, tried the gfx_culture_scope, when that didn't work I tried the portrait_culture value in the portraitt modding page. I literally tried every basic variation of code I could think of trying to get it to work for 4 hours this morning. Didn't know that save_event_target_as = was a thing.
In general, A = B = C (no brackets) will never work.

nd
 
Code:
character_event = {
    id = immortality.88
    desc = "Build Fort"
    picture = GFX_evt_throne_room
    border = GFX_event_normal_frame_economy
    
    only_playable = yes
    ai = no
    
    
    mean_time_to_happen  = {
        months = 1
    }
    
    trigger = {
        any_realm_province = {
            
                has_fort = no
                
                OR = {
                    
                        any_province_holding = {
                            has_siege = no
                        }
                        any_province_holding = {
                            is_occupied = no
                        }
                    
                }
            
            
        }
        
        
        
    }
    
    option = {
        name = "Build Fort"
        scaled_wealth = { value = -0.1 max = -5000 }
        
            any_realm_province = {
                limit = {
                    has_fort = no
                    
                    OR = {
                    
                        any_province_holding = {
                            has_siege = no
                        }
                        any_province_holding = {
                            is_occupied = no
                        }
                    
                    }
                    
                    
                }
                holder_scope = {
                    create_fort = PREV
                }
            }
        
    }
}

How to make the event NOT build forts in countys that are being occupied/sieged?? I dont want to interrupt revoke wars and also vassal only wars like holy war for a duchy. has_siege, is_occupied doesnt seem to work, the fort gets built in a province that is being sieged.