• 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.
I tried the Validator, but it doesn’t detect any problems with the mod, it’s really strange.
I think you're doing something wrong. When I ran the Validator on your mod, it detected 3713 errors. Some are probably not a problem (missing history for unused provinces); but there are a lot of other errors, and some seem like they will cause major issues.

Maybe you set up the Validator incorrectly? I've circled the important things in the screenshot below.

1723568556834.png

(Similarly, ...\Documents\Paradox Interactive\Crusader Kings II\logs\error.log is nearly 15000 lines long. Much of that is title-related, but there's a large minority of other serious errors.)

---

When there are literally thousands of errors, it's very hard to locate the specific item that's causing the issue.

My suggestion is that you work through the list in the Validator, fixing as much as you can. I personally prefer my mods to have zero Validator errors, but I don't think that's practical in this case. So, I recommend you continue fixing until all of the errors in the list are either completely unavoidable (eg. missing history) or "not actually an error" (eg. unnecessary AND clause).

---

Side-note: Is there a reason you copied the entire "interface" folder from the base game without making any changes?!
 

Attachments

  • error.log
    1,6 MB · Views: 0
I think you're doing something wrong. When I ran the Validator on your mod, it detected 3713 errors. Some are probably not a problem (missing history for unused provinces); but there are a lot of other errors, and some seem like they will cause major issues.

Maybe you set up the Validator incorrectly? I've circled the important things in the screenshot below.

View attachment 1175084

(Similarly, ...\Documents\Paradox Interactive\Crusader Kings II\logs\error.log is nearly 15000 lines long. Much of that is title-related, but there's a large minority of other serious errors.)

---

When there are literally thousands of errors, it's very hard to locate the specific item that's causing the issue.

My suggestion is that you work through the list in the Validator, fixing as much as you can. I personally prefer my mods to have zero Validator errors, but I don't think that's practical in this case. So, I recommend you continue fixing until all of the errors in the list are either completely unavoidable (eg. missing history) or "not actually an error" (eg. unnecessary AND clause).

---

Side-note: Is there a reason you copied the entire "interface" folder from the base game without making any changes?!
Thank you so much for looking !

I will try to correct all these errors, and I will come back on this thread if I encounter any again.
(PS: I copied the interface folder because I thought that could be the problem, but it’s not :confused: )
 
  • 1Like
Reactions:
I will try to correct all these errors, and I will come back on this thread if I encounter any again.
You probably can't fix them all until you finish writing the mod - eg. the ~1000 history errors.

But there are a LOT of things in there you can fix - eg. bad use of curly brackets {}, misspelled commands. Focus on these, and it's possible the war declaration problem will be fixed as a side effect. If not, feel free to ask again :)
 
  • 1Like
Reactions:
How does the Coptic Pope usurp his capital barony? As it stands, it looks like he takes b_alexandria whenever it is held by someone of his religion and becomes a vassal of the top liege of the barony. I couldn't find where this behavior is dictated in the game files.

I'm hoping to use that same function for some other titular titles I'm making.
Is this hardcoded behaviour? In the mods I'm using, I could find similar events, but with restrictions, e.g. being at peace, or with an opinion penalty.
  1. 1st of every month: religious head usurps his capital barony (without opinion penalty while at war).
  2. Half-way through the month: he grants it to a created new vassal because it is the wrong holding type.
  3. Repeat (I noticed because new characters kept joining my court).
I have a vague memory of the AI always wanting its de jure capitals, and recklessly revoking them, but this is just instant "console command" usurpation.
 
Is this hardcoded behaviour? In the mods I'm using, I could find similar events, but with restrictions, e.g. being at peace, or with an opinion penalty.
  1. 1st of every month: religious head usurps his capital barony (without opinion penalty while at war).
  2. Half-way through the month: he grants it to a created new vassal because it is the wrong holding type.
  3. Repeat (I noticed because new characters kept joining my court).
I have a vague memory of the AI always wanting its de jure capitals, and recklessly revoking them, but this is just instant "console command" usurpation.

I believe some rel heads usurping proper temple baronies is hardcode related to autocephaly.

The events found in those mods probably try to emulate it with instant usurpation but might not sanity check that it is a proper holding, causing hardcode "Get rid of incorrect holdings!" to kick in, after which the maintenance event fires and it keeps on looping.
 
  • 1
Reactions:
Alright. The religion is autocephalous and it is a temple, so that must be it.
The religious head isn't a theocracy because he's just the top liege that inherited the title when the holder died. I've fixed it by switching to playing as the liege, and then granting the religious head title to the temple barony holder, but I should probably make an event to correct it if it happens again.
 
Hello everyone. Could you please tell me if it is possible to add factions for counties (counts) or is this mechanic hard-coded?
Do you mean that you want AI barons to be able to join factions against their count+ liege? If so, yes I believe this is possible - you would simply need to change the specifications for the relevant factions. However, this may significantly impact performance. (I believe that the devs made a deliberate decision to make AI barons incredibly passive, because allowing them to act "normally" caused performance issues.)

If you want baron-tier players to be able to join factions, this is impossible. (Because the only baron-tier players are MR patricians, and it will cause massive problems if they rebel against their liege.)

If you're asking for something else, well, please give more details and/or a concrete example :)
 
Do you mean that you want AI barons to be able to join factions against their count+ liege? If so, yes I believe this is possible - you would simply need to change the specifications for the relevant factions. However, this may significantly impact performance. (I believe that the devs made a deliberate decision to make AI barons incredibly passive, because allowing them to act "normally" caused performance issues.)

If you want baron-tier players to be able to join factions, this is impossible. (Because the only baron-tier players are MR patricians, and it will cause massive problems if they rebel against their liege.)

If you're asking for something else, well, please give more details and/or a concrete example :)
Yes, I meant for AI barons to be able to join factions. And try to make about the same fractions as in this mod [LMM] Powerful Vassals Factions. Could you tell us in more detail how to do this or send it to the right management. I am very grateful in advance.
 
Yes, I meant for AI barons to be able to join factions. And try to make about the same fractions as in this mod [LMM] Powerful Vassals Factions. Could you tell us in more detail how to do this or send it to the right management. I am very grateful in advance.
I'm not familiar with the mod. (And, frankly, I'm not going to take the several hours I'd need to search it out, download it, and read enough of it that I can understand what it's trying to do.)

The file you need to modify is ...\objectives\00_factions.txt. (For base game factions. Modded factions may use different filenames.)

Unfortunately, the expected behaviour of factions is rather thinly documented on the wiki, and I haven't tried modding them myself, so you will need to do some experimentation to find out exactly what's blocking barons from joining. (Or, it's possible that someone who has actually modded factions might reply here. I'm very happy to be corrected!)

My best guess, at the moment, is that the tier restriction in the potential clause is what's blocking barons from joining. (In part because this is the only usage of tier that is common in all the factions I checked. And in part because any faction member is a potential faction leader (if the previous faction leader leaves/dies), so perhaps people are only allowed to join the faction if they are potential faction leaders?)

Code:
faction_independence = {
...
    potential = {
...
        higher_tier_than = BARON

So, my recommendation is that you delete this line (in every faction) and see what happens.
 
I would like to use the Coat of Arms/Title Generator utility, assuming it still works in the current version, but the Download buttons don't appear to do anything. Is there a way around this, or another place to download it?

You could try writing decisions that use the create_title command? This allows you to create titular titles with CoA identical to any existing base game title. (However, unfortunately, the map colour is semi-randomly-generated and is usually absolutely disgusting. EDIT: In this case, "semi-random" means "it's always the same for any given title (except perhaps the very first time you try), but the specific colour that will be chosen is not easily predictable".)
 
Last edited:
You could try writing decisions that use the create_title command? This allows you to create titular titles with CoA identical to any existing base game title. (However, unfortunately, the map colour is semi-randomly-generated and is usually absolutely disgusting. EDIT: In this case, "semi-random" means "it's always the same for any given title (except perhaps the very first time you try), but the specific colour that will be chosen is not easily predictable".)
I'm not sure how this helps? I want to create a custom coat of arms/flag for a barony title, instead of them being generated randomly. However, parsing what the flag will actually look like in the game just from the code is a headache, so the utility would be helpful, as it seems like it allows you to customize a coat of arms and generates the proper code for it to insert.
 
I'm not sure how this helps? I want to create a custom coat of arms/flag for a barony title, instead of them being generated randomly. However, parsing what the flag will actually look like in the game just from the code is a headache, so the utility would be helpful, as it seems like it allows you to customize a coat of arms and generates the proper code for it to insert.
I reread the description of the mod you linked, and it creates titular duchies, kingdoms and empires - with the same CoA as their lower title. (I can't see anything in there about baronies, or about previewing custom CoAs.) Which is why I previously suggested the create_title command.

Unfortunately, the best I can suggest for barony CoAs is the relevant info on the wiki. Maybe you can use the in-game customisation tool to create a dynastic CoA that looks the way you want, and copy the code from a save file? If you only need a small number of CoAs, this should be pretty quick.
 
Last edited:
I reread the description of the mod you linked, and it creates titular duchies, kingdoms and empires - with the same CoA as their lower title. (I can't see anything in there about baronies, or about previewing custom CoAs.) Which is why I previously suggested the create_title command.

Unfortunately, the best I can suggest for barony CoAs is the relevant info on the wiki. Maybe you can use the in-game customisation tool to create a dynastic CoA that looks the way you want, and copy the code from a save file? If you only need a small number of CoAs, this should be pretty quick.
Whoops! I linked the wrong one, it's by the same guy so I copied the wrong link by mistake.


I have no interest in the other utility I mistakenly linked earlier.

Yeah, I looked at the Coat of arms modding page, which links this utility at the bottom, and goes into barony CoA creation in more detail. But yeah, assuming a save game's code uses the same code for CoA as landed_titles.txt would, that should work. Thanks.
 
Last edited:
  • 1Like
Reactions:
Okay, so, this isn't working. Specifically I'm trying to customize the coat of arms that b_hagiasophia uses. In landed_titles.txt, it normally reads like this.
Code:
b_hagiasophia = {
       pentarchy = yes
       turkish = "Ayasofya"
}

I made a new game and customized a dynasty CoA with Ruler Designer, while my ruler was set to GM_mymod_religion as his religion. I saved, then opened the save file. Finding the proper dynasty in the save file has this.
Code:
1000102599=
        {
            name="GMtestCOAdynasty"
            culture="GM_mymod_culture"
            religion="GM_mymod_religion"
            is_modified=yes
            coat_of_arms=
            {
                data=
                {
                    0 2 25 5 6 2 9 2 0 8 2 0 0 2 0 8 2 0 0 2 0 8 2 0 0 
                }
                religion="GM_mymod_religion"
            }
        }

I copied that coat of arms code into b_hagiasophia in landed_titles.txt so it looks like this now.
Code:
                b_hagiasophia = {
                    pentarchy = yes
                    turkish = "Ayasofya"
                    coat_of_arms=
                    {
                        data=
                        {
                            0 2 25 5 6 2 9 2 0 8 2 0 0 2 0 8 2 0 0 2 0 8 2 0 0 
                        }
                        religion="GM_mymod_religion"
                    }
                }

I loaded up the game, made sure the barony is held by someone of my culture and religion (GM_mymod_culture and GM_mymod_religion), but the barony's CoA is still a random creation. (I started other new games, made sure the barony was held by the proper culture and religion again, and the barony's CoA was different once again, hence I assume it's random.)

Then I tried making a decision to force the issue with the set_coa command. In my decisions file, under title_decisions = {}, I added this.
Code:
GM_set_hagiasophia_coa = {
        potential = {
            FROM = {
                ai = no
                religion = GM_mymod_religion
            }
        }
        
        allow = {
            
        }
        
        effect = {
            set_coa = b_zzz_hagiasophia_dummy_coa
        }
        
        revoke_allowed = {
            always = no
        }
        
        ai_will_do = {
            factor = 0
        }
    }

Meanwhile I made a "dummy" title, like the set_coa command's entry suggests, at the end of landed_titles.txt, so the command can draw the CoA from that.
Code:
b_zzz_hagiasophia_dummy_coa = {
    coat_of_arms=
    {
        data=
        {
            0 2 25 5 6 2 9 2 0 8 2 0 0 2 0 8 2 0 0 2 0 8 2 0 0 
        }
        religion="GM_mymod_religion"
    }
}

I loaded up the game and used the decision on the barony title. The CoA does not change. Experimentally, I used the decision on the county and duchy titles for Constantinople as well. Their CoAs were changed, but instead of being changed to what is specified in the b_zzz_hagiasophia_dummy_coa title, they changed to the custom CoA being used for my empire (of which the Constantinople county is my capital).

I tested another angle by changing b_zzz_hagiasophia_dummy_coa to d_zzz_hagiasophia_dummy_coa. Once again, using it on a barony title does not change its CoA, but this time using it on a county or duchy title changes their CoA to blank black (possibly because county-tier and higher titles tend to draw from gfx/flags and there is no flag graphic file for the dummy title).

I'm flummoxed. Help please?
 
I'm not familiar with the mod. (And, frankly, I'm not going to take the several hours I'd need to search it out, download it, and read enough of it that I can understand what it's trying to do.)

The file you need to modify is ...\objectives\00_factions.txt. (For base game factions. Modded factions may use different filenames.)

Unfortunately, the expected behaviour of factions is rather thinly documented on the wiki, and I haven't tried modding them myself, so you will need to do some experimentation to find out exactly what's blocking barons from joining. (Or, it's possible that someone who has actually modded factions might reply here. I'm very happy to be corrected!)

My best guess, at the moment, is that the tier restriction in the clause is what's blocking barons from joining. (In part because this is the only usage of that is common in all the factions I checked. And in part because any faction member is a potential faction leader (if the previous faction leader leaves/dies), so perhaps people are only allowed to join the faction if they are potential faction leaders?)potentialtier

Code:
faction_independence = {
...
    potential = {
...
        higher_tier_than = BARON

So, my recommendation is that you delete this line (in every faction) and see what happens.
Thank you so much for your help. I tried all sorts of options based on other faction mods, but nothing worked out. Apparently this part of the code is really hard-coded or the barons themselves have some restrictions.
 
Okay, so, this isn't working. Specifically I'm trying to customize the coat of arms that b_hagiasophia uses. In landed_titles.txt, it normally reads like this.
Code:
b_hagiasophia = {
       pentarchy = yes
       turkish = "Ayasofya"
}

I made a new game and customized a dynasty CoA with Ruler Designer, while my ruler was set to GM_mymod_religion as his religion. I saved, then opened the save file. Finding the proper dynasty in the save file has this.
Code:
1000102599=
        {
            name="GMtestCOAdynasty"
            culture="GM_mymod_culture"
            religion="GM_mymod_religion"
            is_modified=yes
            coat_of_arms=
            {
                data=
                {
                    0 2 25 5 6 2 9 2 0 8 2 0 0 2 0 8 2 0 0 2 0 8 2 0 0
                }
                religion="GM_mymod_religion"
            }
        }

I copied that coat of arms code into b_hagiasophia in landed_titles.txt so it looks like this now.
Code:
                b_hagiasophia = {
                    pentarchy = yes
                    turkish = "Ayasofya"
                    coat_of_arms=
                    {
                        data=
                        {
                            0 2 25 5 6 2 9 2 0 8 2 0 0 2 0 8 2 0 0 2 0 8 2 0 0
                        }
                        religion="GM_mymod_religion"
                    }
                }

I loaded up the game, made sure the barony is held by someone of my culture and religion (GM_mymod_culture and GM_mymod_religion), but the barony's CoA is still a random creation. (I started other new games, made sure the barony was held by the proper culture and religion again, and the barony's CoA was different once again, hence I assume it's random.)

Then I tried making a decision to force the issue with the set_coa command. In my decisions file, under title_decisions = {}, I added this.
Code:
GM_set_hagiasophia_coa = {
        potential = {
            FROM = {
                ai = no
                religion = GM_mymod_religion
            }
        }
       
        allow = {
           
        }
       
        effect = {
            set_coa = b_zzz_hagiasophia_dummy_coa
        }
       
        revoke_allowed = {
            always = no
        }
       
        ai_will_do = {
            factor = 0
        }
    }

Meanwhile I made a "dummy" title, like the set_coa command's entry suggests, at the end of landed_titles.txt, so the command can draw the CoA from that.
Code:
b_zzz_hagiasophia_dummy_coa = {
    coat_of_arms=
    {
        data=
        {
            0 2 25 5 6 2 9 2 0 8 2 0 0 2 0 8 2 0 0 2 0 8 2 0 0
        }
        religion="GM_mymod_religion"
    }
}

I loaded up the game and used the decision on the barony title. The CoA does not change. Experimentally, I used the decision on the county and duchy titles for Constantinople as well. Their CoAs were changed, but instead of being changed to what is specified in the b_zzz_hagiasophia_dummy_coa title, they changed to the custom CoA being used for my empire (of which the Constantinople county is my capital).

I tested another angle by changing b_zzz_hagiasophia_dummy_coa to d_zzz_hagiasophia_dummy_coa. Once again, using it on a barony title does not change its CoA, but this time using it on a county or duchy title changes their CoA to blank black (possibly because county-tier and higher titles tend to draw from gfx/flags and there is no flag graphic file for the dummy title).

I'm flummoxed. Help please?
No one has any ideas?

I discovered that manually editing the b_hagiasophia's coat_of_arms in the save file (to the same number string as the dynasty flag I customized) does work to give it that flag in-game, but that means I'd have to edit my save file every time I start up a game with the mod, instead of having it done automatically, which is pretty annoying. I have no idea why I can't change the flag using set_coa commands or title modding or something.
 
No one has any ideas?
Maybe an obvious question, but did you run the Validator?

I discovered that manually editing the b_hagiasophia's coat_of_arms in the save file (to the same number string as the dynasty flag I customized) does work to give it that flag in-game, but that means I'd have to edit my save file every time I start up a game with the mod, instead of having it done automatically, which is pretty annoying. I have no idea why I can't change the flag using set_coa commands or title modding or something.
For the set_coa command, did you try using a count+ tier title as the source? (Eg: b_hagiasophia = { set_coa = d_zzzbaronycoas_hagiasophia }.) (If you can't set one barony's CoA via title modding, I don't know why you'd expect to be able to set a different barony's CoA and then copy it... ;-p )
 
Maybe an obvious question, but did you run the Validator?


For the set_coa command, did you try using a count+ tier title as the source? (Eg: b_hagiasophia = { set_coa = d_zzzbaronycoas_hagiasophia }.) (If you can't set one barony's CoA via title modding, I don't know why you'd expect to be able to set a different barony's CoA and then copy it... ;-p )
I did run the Validator.

I did try using a duke title, yes. It still did nothing on the barony, but testing on a county or duchy title set their flag to a blank black instead.

According to the wiki, you should be able to set a barony title's coat of arms. There's even a vanilla example of it, albeit only the one.