• 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.
Thanks, I completely forgot to do that. I'm still having issues with the conditions to get open elective. I can't seem to get the proper conditions to fire for my new government to use the open elective government. If someone could take a quick look through this I'd be very thankful.

Code:
    succ_open_elective = {
        potential = {
            NOT = { title = k_papal_state }
            temporary = no
            OR = {
                is_primary_type_title = yes
                holy_order = yes
                AND = {
                    tier = baron
                    OR = {
                        is_republic = yes
                        AND = {
                            is_theocracy = yes
                            NOT = { holder_scope = { religion_group = muslim } }
                        }
                    }
                }
                holder_scope = {
                    OR = {
                        is_republic = yes
                        AND = {
                            is_theocracy = yes
                            NOT = { religion_group = muslim }
                        }
                    }
                }
            }
            AND = {
            holder_scope = { government = chinese_imperial_vassal_government }
            top_liege = { government = chinese_imperial_government }
            }
            OR = {
                is_landless_type_title = yes
                holder_scope = { is_theocracy = no }
                holder_scope = {
                    NOT = { religion = catholic }
                    NOT = { religion = fraticelli }
                }
            }
            holder_scope = {
                is_patrician = no
                is_merchant_republic = no
                OR = {
                    independent = yes
                    is_feudal = yes
                    NOT = {
                        any_liege = {
                            holy_order = yes
                        }
                    }
                }
            }
            NAND = {
                has_law = succession_voting_power_1
                has_law = succ_feudal_elective
            }
            NOT = { holder_scope = { government = confucian_bureaucracy } }
            NOT = { holder_scope = { government = chinese_imperial_government } }
            holder_scope = { government = chinese_imperial_vassal_government }
        }
     
        effect = {
            succession = open_elective
        }
        revoke_allowed = {
            always = no
        }
    }
With the requirements you posted, Open Elective will only be used if the holder has chinese imperial vassal government and the top liege has chinese imperial government. This is going to cause issues for every non-chinese location that uses Open Elective, and is probably part of your problem.
 
With the requirements you posted, Open Elective will only be used if the holder has chinese imperial vassal government and the top liege has chinese imperial government. This is going to cause issues for every non-chinese location that uses Open Elective, and is probably part of your problem.

I've been trying every combination I can think of for the last two days and I can't seem to get it working. When I had it as an OR statement it wasn't working either, which I thought it would since a Chinese imperial vassal would meet the conditions since the top liege was Chinese imperial and they themselves had the Chinese imperial vassal government. I did realize that the "is_feudal = yes" was a mistake on my part, it was something I hadn't cleaned up when I was spitballing trying to solve the error.
 
Try walking through the code by hand - the code as posted, or even if you change that to an OR, is going to fail for a republic baron whose lord is feudal, even though they should have Open Elective. Likely, what you should do is encase the entire potential code in an AND block, put then inside an OR block, then put your exception as another option in that OR block.
 
I noticed in the AGOT mod that certain characters at start dates are made with randomly generated siblings, parents, and/or children - sort of like how nomad clans start off bundled with family members. How do I do this myself (so that I don't have to console in concubines and pregnancies for every feudal lord)?
 
I'm trying to prevent the AI to creating retinues and spamming the map with those micro-armies. Which files should I modify to prevent the AI from creating retinues? They never seem to make any use of them anyways.

On the same lines, which files should I modify to increase the number of troops in the Varangian Guard and the Holy Sepulcher Order?

Lastly, is any way to prevent the AI barons/counts/dukes/kings from picking the Bussiness focus, as well as there is one to prevent them from choosing the Seduction/Intrigue ones? I don't want them getting the 'extra holding' event and spamming my realm with temples.
 
For the retinues, in common/retinue_subunits/00_retinue_subunits.txt, add ai = no to all the potential blocks. Then the AI will never be able to create any retinues.
For the holy orders and mercenaries, in common/mercenarites/00_mercenaries.txt, increase the levy_size (the other numbers just determine the percentages of each troop type - increasing those won't increase the total number of troops)
For the focus, in common/objectives/00_focuses.txt, add ai = no to the allow blocks. If you still want emperors to be able to select it, add this instead:
Code:
OR = {
    ai = no
    tier = emperor
}
Alternately, if you just don't want the extra holding events, locate those events and add the above code to their trigger blocks (adding a trigger block if needed). This will allow them to take the focus without getting that event.

A couple points on your last one which you didn't directly ask, but are relevent
1. There's already a game rule you can change to stop the AI from taking seduction focus
2. Business doesn't have an event to create an extra holding. Rulership has an event to build a castle cheap, but it requires a free holding slot. The event that creates new holding slots is part of the prosperity system and not tied to any focus, so it will still happen if you disable business focus, or even all of WoL.
 
Ow, that sucks. I'll have to be extra-attentive and save often, so every time that the number of holdings in my realm increases mysteriously, I reload the save.

Thank you, I'll try the changes with the retinues and the other troops.

Found the event, by the way. It's the 'Reclaimed Land' event from Reaper's Due, code RIP.11705. I'll add those lines to the triggers and hope that it prevents the vassals from spamming holdings.
 
Last edited:
I noticed in the AGOT mod that certain characters at start dates are made with randomly generated siblings, parents, and/or children - sort of like how nomad clans start off bundled with family members. How do I do this myself (so that I don't have to console in concubines and pregnancies for every feudal lord)?
The AGOT mod has a big maintenance event that fires on start only (on_startup). You can find it in roberts_rebellion_events.txt the first event.

Scroll down to #Auto Generate missing wives/mothers, and #Auto Generate additional children below it. There you can see it calls event roberts_rebellion.150 to add wives, and event roberts_rebellion.151 to add random sibs.
 
The reference to EMFXActorType is to the file /interface/mapitems.gfx, right under the heading of "Western shields". Each graphical culture has an entry for count, duke, king, and emperor. If this is for a custom graphical culture, you don't have to mod that file, but create your own EMFXActorType entries in your own file in /interface/. If you're just changing an existing graphical culture, you don't even need to mod or create the EMFXActorTypes, just name your models' *.xac files the same as the existing graphical culture's *.xac files. Either way, that links the graphical culture to your *.xac files.

I'm not sure why your 2D versions aren't clickable. Any chance you could post what you have of your mod here, so we could actually see what you've done?
Hi jursamaj, and thanks for helping me (again! ;) )
I did put a gfx file in the interface folder with those EMFXActorType, and now my CoA appears on map normally. However they still are not clickable. I continued to do some research, and found in the ck2 vanilla folder the generalstuff.gfx (interface folder) which feature some lines "spriteTypes" at the beginning of the file, using I assume the models for shields. I copied the file into my mod interface folder and tried to add some lines with the ulmaad gfx ("GFX_shield_big_ulmaad") but nothing have changed, yet I suppose it is connected to the 3D rendering of the shield and the ability to hover them and click them.

Here's my mod work in progress, I joined in the .rar a .txt with my current "things to do". Hope you'll find the issue... I'm still searching and testing various things, yet for now, nothing special, the new shields appears on map and on the characters/provinces pannels but are not clickable. I'm not an expert, but I assume the game search the correct 3D model to apply to the shield, but as this is a custome frame, it can't apply a "physical" form, rendering it just in 2D and thus making it unclickable.

Basically I want to add some more frame to the shield as I found the basic froms (christian and round) very limiting the diversity of the game, I find it cool to have more diversity in shape, making it also easier to make a difference between religions and some cultures. I found a ton of mods and tutorial to change to design of the CoA, patterns etc... but not the shape of the shield itself. I conitnue to find a way to making it playable (clickable), but I'm wondering if that is not due to this possibility being hardcoded, thus impossible to change. Maybe CK2 can just use default and round shields... I don't know, I'm kind of stubborn at this point and still looking for a way to have more shape in the game. :p

Thank for you help! Let me know!
 

Attachments

  • Arkha WIP.rar
    30,2 MB · Views: 1
Is there a way to display a single loading tip instead of two?

I'm making a mod replacing the loading screen tips with contemporary medieval quotes (got the idea from Total War games), but my SSD loads up the game too fast to be able read the second quote.

Edit:

I've come across another problem, sometimes the original loading tips are displayed instead of the mod's. Sometimes a tip from both the original and the mod's file are displayed in succession during the same loading screen. Why does the game sometimes overrule or combine my custom csv? (I've used all tips, from LOADING_TIP_0 to LOADING_TIP_50.)
 
Last edited:
From my understanding, user inferfaces for religious groups such as muslim, jews, zoroastrian and pagans is hard coded in and you cannot override these nor add new ones. I was wondering if the case was the same for merchant republics? I want a custom user interface for a new government type but I assume the religion UI will override? I tried searching for where these user interfaces were defined but didn't come up with much apart from a few mappings to council backgrounds for pagans etc.
 
From my understanding, user inferfaces for religious groups such as muslim, jews, zoroastrian and pagans is hard coded in and you cannot override these nor add new ones. I was wondering if the case was the same for merchant republics? I want a custom user interface for a new government type but I assume the religion UI will override? I tried searching for where these user interfaces were defined but didn't come up with much apart from a few mappings to council backgrounds for pagans etc.
Currently most of it is hardcoded, yes. But luckily, this will get changed a bit in an upcoming patch (but not the next one yet afaik).
You will then be a able to decide which UI a religion should use, and also fiddle with Merchant Republics. The only restriction that will remain is that you can't define any entirely new ones.
 
Hi jursamaj, and thanks for helping me (again! ;) )
I enjoy challenges like these. I have a post somewhere in the forum where I added a shield-within-a-shield variant, just to see if I could. :)
I did put a gfx file in the interface folder with those EMFXActorType, and now my CoA appears on map normally. However they still are not clickable. I continued to do some research, and found in the ck2 vanilla folder the generalstuff.gfx (interface folder) which feature some lines "spriteTypes" at the beginning of the file, using I assume the models for shields. I copied the file into my mod interface folder and tried to add some lines with the ulmaad gfx ("GFX_shield_big_ulmaad") but nothing have changed, yet I suppose it is connected to the 3D rendering of the shield and the ability to hover them and click them.

Here's my mod work in progress, I joined in the .rar a .txt with my current "things to do". Hope you'll find the issue... I'm still searching and testing various things, yet for now, nothing special, the new shields appears on map and on the characters/provinces pannels but are not clickable. I'm not an expert, but I assume the game search the correct 3D model to apply to the shield, but as this is a custome frame, it can't apply a "physical" form, rendering it just in 2D and thus making it unclickable.

Basically I want to add some more frame to the shield as I found the basic froms (christian and round) very limiting the diversity of the game, I find it cool to have more diversity in shape, making it also easier to make a difference between religions and some cultures. I found a ton of mods and tutorial to change to design of the CoA, patterns etc... but not the shape of the shield itself. I conitnue to find a way to making it playable (clickable), but I'm wondering if that is not due to this possibility being hardcoded, thus impossible to change. Maybe CK2 can just use default and round shields... I don't know, I'm kind of stubborn at this point and still looking for a way to have more shape in the game. :p

Thank for you help! Let me know!
OK, here are some issues I found:

You have copied some vanilla files into your mod that you haven't changed. This is unnecessary, unless you use replace_path. It won't hurt, except it makes the mod bigger than needed, and if the vanilla files ever change, you'll still be using the old ones. This includes the seal* files in /gfx/interface/; frame.dds and all the party* files in /gfx/coats_of_arms/ etc. You probably don't need the matching replace_path command for gfx/coats_of_arms, unless you need to make sure *none* of the vanilla COA graphics files get used (but then you *will* need to copy or replace a bunch of vanilla files…). And you *definitely* don't need the replace_patch commands for interface/coats_of_arms.gfx & interface/coats_of_arms.txt, because replace_path is *only* for directories, not files.

/interface/coats_of_arms.gfx:
• coa_plain_ulmaad & coa_plain_halkan have scale = 0.5. All the other coa_plain_* items have scale = 1. This could render your COAs too small.

/interface/coats_of_arms.txt:
• I'm not sure I'd remove the christian "culture" entry. A lot of things about the game are hard-coded to expect christian stuff in the game. Might be better to leave it in.

/interface/generalstuff.gfx:
• You've added the ulmaad entries for the various sized shields, but they still use the overlay_muslim & mask_pagan textures. At the least, I'd expect this to cause graphical issues. I'm not sure what the maskedShieldType is used for, but it *might* include hit detection, so you'd have a round clickable area.

/gfx/coats_of_arms/:
• pattern_ulmaad_3.tga: Why is each pattern a green shield set in a field of blue? If the blue is all hidden by the frame, it will have no effect (altho I suppose it may be useful to you in arranging stuff *in* the shield). If any of the blue shows inside the frame, it will add a rim of color there. Come to think of it, that's an interesting effect itself… :)
• The vanilla plain.tga file is white on black *with* an alpha channel (transparency). Your plain_*.tga files are white shields on a black background, with no alpha channel. This could cause your COAs to be rendered in a black square.

I'm at a loss as to why the shields aren't clickable. I would expect either the /gfx/coats_of_arms/plain*.tga files or something in the /gfx/interface/shield* files to act as a hitbox. But you seem to have all the relevant files and sprite definitions. I'll take a look later at actually running the mod, but I need to get some rest now.
 
Currently most of it is hardcoded, yes. But luckily, this will get changed a bit in an upcoming patch (but not the next one yet afaik).
You will then be a able to decide which UI a religion should use, and also fiddle with Merchant Republics. The only restriction that will remain is that you can't define any entirely new ones.
Even that restriction will not remain, you can make as many new interfaces as you want all you need to do is make a new folder in the interface main folder and then reference that folder name when you build the skins in the religion or religion group.
I unhardcoded pretty much everything: you can add new skins, generate a religions skins by layering onto other skins, do things for an entire group then overwrite on a religion level, merge the republic interface in and have republic specific elements.
 
Without challenges, modding would be boring, hey? :p

You have copied some vanilla files into your mod that you haven't changed. This is unnecessary, unless you use replace_path. It won't hurt, except it makes the mod bigger than needed, and if the vanilla files ever change, you'll still be using the old ones. This includes the seal* files in /gfx/interface/; frame.dds and all the party* files in /gfx/coats_of_arms/ etc. You probably don't need the matching replace_path command for gfx/coats_of_arms, unless you need to make sure *none* of the vanilla COA graphics files get used (but then you *will* need to copy or replace a bunch of vanilla files…). And you *definitely* don't need the replace_patch commands for interface/coats_of_arms.gfx & interface/coats_of_arms.txt, because replace_path is *only* for directories, not files.
I have indeed a lot of unneeded files, most of the time just to remember to look into it or to change something in it. I have not yet clenned up my mod folder of unnecessary files, sorry for that (for example the "seal" files were copied just by following a tutorial without knowing at the time I won't need them...) For the .mod, most of the lines put after a jump of line were put for testing or whatever, again I have to clean it up. Sorry for the mess...

/interface/coats_of_arms.gfx:
• coa_plain_ulmaad & coa_plain_halkan have scale = 0.5. All the other coa_plain_* items have scale = 1. This could render your COAs too small.
I did not notice that, maybe I got confused with the scale of the emblems I don't use anymore. Noted.

/interface/coats_of_arms.txt:
• I'm not sure I'd remove the christian "culture" entry. A lot of things about the game are hard-coded to expect christian stuff in the game. Might be better to leave it in.
My bad! I was sure I left it like the other vanilla entries, thanks for noticing it!

/interface/generalstuff.gfx:
• You've added the ulmaad entries for the various sized shields, but they still use the overlay_muslim & mask_pagan textures. At the least, I'd expect this to cause graphical issues. I'm not sure what the maskedShieldType is used for, but it *might* include hit detection, so you'd have a round clickable area.
That was a quick test in my attempt to understand why the shields were not clikable, it did nothing particuliar in game, I just forgot it, to be honest. I kept the file just to remember that there's those lines I assume have something to do with the clickable aspect of the shields, by refering to 3D models...

/gfx/coats_of_arms/:
• pattern_ulmaad_3.tga: Why is each pattern a green shield set in a field of blue? If the blue is all hidden by the frame, it will have no effect (altho I suppose it may be useful to you in arranging stuff *in* the shield). If any of the blue shows inside the frame, it will add a rim of color there. Come to think of it, that's an interesting effect itself… :)
• The vanilla plain.tga file is white on black *with* an alpha channel (transparency). Your plain_*.tga files are white shields on a black background, with no alpha channel. This could cause your COAs to be rendered in a black square.
For the pattern, it's ugly but in game it gives the shield a border of random color. It's like a plain shield (green area) with a border (blue area). I have to work more the details, but had not the time for it lately.
About the alpha channel, this time this is again my poor knowledge of PS, I did not noticed that in the vanilla file. I did had weird rendering, including a black square, when I just duplicated the vanilla file and overwrited it with the new one. After that I created a new file (no copy of a vanilla one) with correct resolution and nothing wrong was noted ingame, the shields looks fine and the patterns apply nicely. However, maybe I will say something stupid here, is this alpha channel could be linked in any way with the clickable ability?

I'm at a loss as to why the shields aren't clickable. I would expect either the /gfx/coats_of_arms/plain*.tga files or something in the /gfx/interface/shield* files to act as a hitbox. But you seem to have all the relevant files and sprite definitions. I'll take a look later at actually running the mod, but I need to get some rest now.
That's what bugs me, I didn't find any line of code linking the gfx of the shield with a 3D model or what would seem like a hitbox, except the lines at the beginning of the generalstuff.gfx (reason why I kept the file in the mod folder). I'm still looking, in the vanilla file and in the Internet, but it is not a topic really open... That's why I thought at one point the 3D models of the shields and the fact CK2 only have two or three shape available, with no mod existing to changing it (at least at my knowledge) is because that particuliar feature is hardcoded or no moddable (yet not mention in the rejected part of the modding suggestions)
When in game, at least on my side, everything is good (no graphical error or glitches) but the shields are just there, unclickable, just 2D decoration.
Again, sorry for the mess, in the folder or ingame perhaps, I did not cleaned up my work yet... Hope you will be able to see it through, though...

Anyway, thanks a lot for taking the time, man, it means a lot! And if we find the solution, well it will be a good point for anyone willing to make a mod for more choices in shapes if shields! :)
 
I've been having some problems pertaining to mod events, so I'll give this a shot.

My mod's been working fine so far, but in this next update I've been trying to get events added in. I've made three events, all with unique IDs and IDs for their localization and options and such. I have three events (we'll call them knightly.0001, knightly.0002, and knightly.0003). The problem I am running into is that, no matter which of the three unique ID's I call (rather through a modded-in decision or by using the "event" console command) it will always call the same event (knightly.0002 I believe). Any ideas as to what could be causing these issues? Thanks in advance.

Edit: The event that does run seems to be set up and working as it should, it's just that this one event is called no matter which of the other events I try to trigger.
 
Even that restriction will not remain, you can make as many new interfaces as you want all you need to do is make a new folder in the interface main folder and then reference that folder name when you build the skins in the religion or religion group.
I unhardcoded pretty much everything: you can add new skins, generate a religions skins by layering onto other skins, do things for an entire group then overwrite on a religion level, merge the republic interface in and have republic specific elements.

Is this part of the patch we're getting next week? I've tried finding it in the patch notes, but either I'm searching for the wrong thing, it is missing from the patch notes, or it is coming later...
 
Alright, so I've been having an issue with governments in my mod when government's have no been changed or modded at all. The two provinces fit with leaders that I have in the game are given Iqta government randomly when I'd like it to be feudal. I have a feeling the culprit is my modded religions, which allow for two-wife polygamy. If that's the case, I can't seem to find any place to specify government type, nor would I know how to go about getting the government type changed regardless of the reason behind Iqta.

Also, if anyone knows what settings the vanilla atlas0.dds comes in, I'd be very thankful. Using paint.net (my editor for dds images), I can save the file with a setting that allows the textures to load decently, but I can tell that it makes the default plains texture a lot more grainy than it originally is. I have a lot of saving option, and all but one that I've tried allows for working texture and the custom texture to appear, but all have a grain to them.
 
Without challenges, modding would be boring, hey? :p


I have indeed a lot of unneeded files, most of the time just to remember to look into it or to change something in it. I have not yet clenned up my mod folder of unnecessary files, sorry for that (for example the "seal" files were copied just by following a tutorial without knowing at the time I won't need them...) For the .mod, most of the lines put after a jump of line were put for testing or whatever, again I have to clean it up. Sorry for the mess...


I did not notice that, maybe I got confused with the scale of the emblems I don't use anymore. Noted.


My bad! I was sure I left it like the other vanilla entries, thanks for noticing it!


That was a quick test in my attempt to understand why the shields were not clikable, it did nothing particuliar in game, I just forgot it, to be honest. I kept the file just to remember that there's those lines I assume have something to do with the clickable aspect of the shields, by refering to 3D models...


For the pattern, it's ugly but in game it gives the shield a border of random color. It's like a plain shield (green area) with a border (blue area). I have to work more the details, but had not the time for it lately.
About the alpha channel, this time this is again my poor knowledge of PS, I did not noticed that in the vanilla file. I did had weird rendering, including a black square, when I just duplicated the vanilla file and overwrited it with the new one. After that I created a new file (no copy of a vanilla one) with correct resolution and nothing wrong was noted ingame, the shields looks fine and the patterns apply nicely. However, maybe I will say something stupid here, is this alpha channel could be linked in any way with the clickable ability?


That's what bugs me, I didn't find any line of code linking the gfx of the shield with a 3D model or what would seem like a hitbox, except the lines at the beginning of the generalstuff.gfx (reason why I kept the file in the mod folder). I'm still looking, in the vanilla file and in the Internet, but it is not a topic really open... That's why I thought at one point the 3D models of the shields and the fact CK2 only have two or three shape available, with no mod existing to changing it (at least at my knowledge) is because that particuliar feature is hardcoded or no moddable (yet not mention in the rejected part of the modding suggestions)
When in game, at least on my side, everything is good (no graphical error or glitches) but the shields are just there, unclickable, just 2D decoration.
Again, sorry for the mess, in the folder or ingame perhaps, I did not cleaned up my work yet... Hope you will be able to see it through, though...

Anyway, thanks a lot for taking the time, man, it means a lot! And if we find the solution, well it will be a good point for anyone willing to make a mod for more choices in shapes if shields! :)
Well…

I just fired up the game with your mod. Selected the Elakian King, then used Ruler Designer to make him Ulmaad.

In game, I'm having no trouble clicking the shields. On the character window, I can click his dynasty shield to get the dynasty window, or any of his title shields to go to the title. On the law window, I can click his kingdom shields to see the laws of either kingdom. The shield on the faction window takes me to his kingdom page. If I click a province, all the shields there take me to the appropriate title page. All these shields are your shape & patterns.

On the other hand, the shields on the map aren't in your shape at all. Presumably because the counties aren't Ulmaad. :( Searching for characters, I can't find any that have Ulmaad religion, to look at their provinces. Then I had a crash.

Restarted, and found the Ulmaad emperor on the selection screen. Played him. All the 2D shields are still clickable. And now, I can see Ulmaad COAs on the map… sort of. I assume you just copied the Christian 3D models for the shield frames, because that's the frames I'm seeing on the map. But inside the wrong frame, the COAs themselves are your shape. (I know the vanilla frames are *.XAC files, which we can't easily make. But the game also supports *.mesh files for models, so you *can* make new frames, when you get around to it.)

New issue: I see some character names with funky characters in them. I traced this to (at least) your cultures file. It's saved us "Unicode, UTF-8 with BOM". You need to convert it back to "Windows Latin 1". Same for any other Unicode files.

For what it's worth: On the province window, the Ulmaadin religion gets truncated to "Ulmaadin …".