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

Where are you getting these supposed ID numbers from? In all my CK2 and Stellaris modding I've never come across using ID numbers to refer to anything and I don't think CK3 is any different. I don't think the game recognizes any ID numbers because it isn't intended to. In my experience the PDX way is to refer to things exclusively with a name string.

What exactly do you mean by getting the House name from the Explorer? What house name specifically were you trying to use?

Here's a screenshot from debug mode that shows the IDs and names. I searched through this whole thread to find examples and at least some of them referenced being able to use the IDs. The wiki and a few other sources made me think you could too, but examples were hard to find.

It's the top row that I'm aiming for in this test case, but I would then know how to generalize. I'm not totally inept with programming. I'm just nearing 40 and don't do it on a daily basis anymore, so I have to revert to simple base cases and then scale upward as I learn.

Thanks for the response and sorry I wasn't more clear initially.

2020_09_28_3.png
 
@Greaper1024

I think the problem is in your scopes. I checked several decision files and none of them used scope:actor or scope:recipient. Those two scopes are used in interactions instead. I haven't tested it, so I might be off, but I expect the scope to use in decisions would be root. Not scope:root, mind you. Just root. That one gets used a couple times. It's the scope you use when you try to target the character taking the decision.

Decisions also automatically scope to the character taking the decision too, so scoping to scope:actor wouldn't be necessary even if that was the proper scope. As for scope:recipient, that one is probably empty. What you'd want to do instead is scope to the spouse of root, which you do with root.primary_spouse.

Try changing the effect to this:
Code:
    effect = {
        custom_tooltip = children_bestowed_by_gods_decision_effect_tooltip
        make_pregnant = {
                father = root.primary_spouse
        }
    }
}

Also try adding this to the conditions:
Code:
exists root.primary_spouse

That should make sure there actually is a husband available to be the father of the queen's children. You might also want to lower the age limit to 50 or so in order to avoid having a decade where the woman can't get natural babies, but also can't get babies gifted by the gods.
thank you, and I will rewrite it as you said.
 
Is there a "modding suggestion" thread/wiki entry/collection somewhere?
Or is putting them to the suggestions forum the right way?

It's just that in the suggestions forum it's hard to keep track of what others already requested...
 
@Greaper1024 Let me know if it works.

@roadkill_rodney Right. Characters do have IDs. My bad. It didn't occur to me because I've never really modded them. Turns out dynasties have number IDs too. However, as far as I can tell, Houses do not and neither do cultures or anything else I can think of.

The IDs for the "active dynasty houses" in the Object Browser do not appear to match anything in the game files. There is no dynasty with ID 4739 or 16785661. Whatever that tool you're using is, the IDs it's giving you do not seem to be anything recognized by the game. Maybe they are numbers that have been assigned internally within the tool.

Getting the house of a character requires 2 steps and getting the dynasty requires 4.

1. Identify a character with the same house that will be in the history files. Typically you want the highest tier ruler in a given start date. Find the character's culture.
2. Go to [...]/Crusader Kings III/game/history/characters/ and find the appropriate culture file then find the character in it. It might look like this:
Code:
6208 = {
    name = "Murchaid"
    dynasty_house = house_british_isles_briain
    martial = 7
    diplomacy = 4
    intrigue = 7
    stewardship = 7
    religion = "insular_celtic"
    culture = "irish"
    trait = education_intrigue_2
    father = 6207
    1043.1.2 = {
        birth = "1043.1.2"
    }
    1093.1.2 = {
        death = "1093.1.2"
    }
}

dynasty_house is the name of the house, which is what you'd probably need to use to make set_house work.

If you need the dynasty the two additional steps are:
3. Go to [...]/Crusader Kings III/game/common/dynasty_houses and open 00_dynasty_houses.txt.
4. Search for the name of the house you got in step 2. The entry will look like this:

Code:
house_british_isles_briain = {
    name = "dynn_Briain" # (695)
    dynasty = 100009
}

There you can get the ID of the dynasty.
 
Can anyone please point me to a mod that changes GUI for example window_court.gui cause I'm wondering how would one add an extra button or two to windows and I don't even know where to start even though I see the source I wouldn't know how to "inject" new code into the window.

I've tried using GUI editor from debug mode but I cannot click on the court, realm, army, etc window it selects the widget ingame_topbar option and opens it in the editor.

Or is there any CK2 documentation that would be applicable to window_court.gui file?
 
@Greaper1024 Let me know if it works.

@roadkill_rodney Right. Characters do have IDs. My bad. It didn't occur to me because I've never really modded them. Turns out dynasties have number IDs too. However, as far as I can tell, Houses do not and neither do cultures or anything else I can think of.

The IDs for the "active dynasty houses" in the Object Browser do not appear to match anything in the game files. There is no dynasty with ID 4739 or 16785661. Whatever that tool you're using is, the IDs it's giving you do not seem to be anything recognized by the game. Maybe they are numbers that have been assigned internally within the tool.

Getting the house of a character requires 2 steps and getting the dynasty requires 4.

1. Identify a character with the same house that will be in the history files. Typically you want the highest tier ruler in a given start date. Find the character's culture.
2. Go to [...]/Crusader Kings III/game/history/characters/ and find the appropriate culture file then find the character in it. It might look like this:
Code:
6208 = {
    name = "Murchaid"
    dynasty_house = house_british_isles_briain
    martial = 7
    diplomacy = 4
    intrigue = 7
    stewardship = 7
    religion = "insular_celtic"
    culture = "irish"
    trait = education_intrigue_2
    father = 6207
    1043.1.2 = {
        birth = "1043.1.2"
    }
    1093.1.2 = {
        death = "1093.1.2"
    }
}

dynasty_house is the name of the house, which is what you'd probably need to use to make set_house work.

If you need the dynasty the two additional steps are:
3. Go to [...]/Crusader Kings III/game/common/dynasty_houses and open 00_dynasty_houses.txt.
4. Search for the name of the house you got in step 2. The entry will look like this:

Code:
house_british_isles_briain = {
    name = "dynn_Briain" # (695)
    dynasty = 100009
}p :

There you can get the ID of the dynasty.
Thank you so much! I didn't know how to find those files. My installation is through GamePass, so I had to get into the WindowsApps folder, but I managed that and could follow exactly to the files you mentioned. I still can't get the set_house effect to work though. I'll show my code below and a screenshot of what happens. It does trigger, but doesn't change the house assignments. It triggers for all the right people too. For what it's worth, this code works perfectly fine if I swap to "set_culture" insead of "set_house" and use "culture:russian" (as an example).

I tried it with the number too (100009) and a couple other dynasties.

Thanks again for helping a stranger on the internet. I'm trying to get my head around the syntax and basic structure so I can generalize to other things. I've read quite a bit of this thread and found all the libraries on GitHub. I can see the logic kind of coming together in my head but am not quite there yet.

Code:
every_vassal_or_below = {
            limit = {
                NOT = {
                    dynasty_house = dynasty_house:dynn_Briain
                }
            }
            set_house = dynasty_house:dynn_Briain             
              
            }
        }
 

Attachments

  • 2020_09_28_4.png
    2020_09_28_4.png
    1,6 MB · Views: 0
This is a super basic question, everyone will be pointing fingers at me and have a laugh, but here it goes:

I have created a mod with the mod tools at the game's launcher. I have added the files I want my mod to use. Nothing happens. Is there another step I'm missing here?

Thanks.

1200px-Trial_of_a_sow_and_pigs_at_Lavegny.png
 
@roadkill_rodney You're using dynn_Briain when you should be using house_british_isles_briain.

If you look at our boy Murchad:

Code:
6208 = {
    name = "Murchaid"
    dynasty_house = house_british_isles_briain
    martial = 7
    diplomacy = 4
    intrigue = 7
    stewardship = 7
    religion = "insular_celtic"
    culture = "irish"
    trait = education_intrigue_2
    father = 6207
    1043.1.2 = {
        birth = "1043.1.2"
    }
    1093.1.2 = {
        death = "1093.1.2"
    }
}

Note the dynasty_house line. The name that identifies his house to the game is house_british_isles_briain.

What might be confusing is that house_british_isles_briain has a "name" property and that property is dynn_Briain. However, that is just telling the game how to display the name of the house on-screen in the game. There are localization files that will take dynn_Briain and render it on screen in whatever language the game is being played in (this is mainly done because the Chinese, Korean, and Russian languages all use their own script).
 
Anyone know how to set a character as the house and dynasty head?

The character I have isn't the oldest, or most powerful landed character, but would like them to start the game as dynasty head. Instead dynasty head goes to an older cousin. Then when the cousin died it goes to the oldest landed character of a different House within the dynasty.
 
@roadkill_rodney You're using dynn_Briain when you should be using house_british_isles_briain.

If you look at our boy Murchad:

Code:
6208 = {
    name = "Murchaid"
    dynasty_house = house_british_isles_briain
    martial = 7
    diplomacy = 4
    intrigue = 7
    stewardship = 7
    religion = "insular_celtic"
    culture = "irish"
    trait = education_intrigue_2
    father = 6207
    1043.1.2 = {
        birth = "1043.1.2"
    }
    1093.1.2 = {
        death = "1093.1.2"
    }
}

Note the dynasty_house line. The name that identifies his house to the game is house_british_isles_briain.

What might be confusing is that house_british_isles_briain has a "name" property and that property is dynn_Briain. However, that is just telling the game how to display the name of the house on-screen in the game. There are localization files that will take dynn_Briain and render it on screen in whatever language the game is being played in (this is mainly done because the Chinese, Korean, and Russian languages all use their own script).

Ah ha! I'm starting to understand. That makes sense now. I'll try again when I get home from work and the kids are asleep.

Very helpful for me to generalize when I want to do other things. Part of my goal is this specific task but really I'm trying to get a foundation of the overall naming conventions and syntax. Thank you for your detailed answers helping me do that.

I've played a little EU and CK2 but this is my deepest dive with Paradox. It seems like a lot changed from CK2 scripting so I can't lean on examples I found as much as I'd hoped.
 
It's really weird that the Hohenzollerns are in the game but are unlanded. You'd think they'd either be landed or not be in at all. Just tested the kingdom of Prussia mod by straight up using the console to give Friedrich Ostmark and switching over to him.
Have you remembered to actually add the mod into your playlist? It might sound silly but I have made that very mistake

Not when I tried it the first time, but yes, I have tried to play with the mod ticked on, and still nothing happens.
 
Is there a png mask for the trees (like for terrain types in general) or is manually adding them in the editor the only way to do it?
 
so i love the new lifestyle feature, and i enjoy mods that add more lifestyles. my problem is the game is looking for the buttons in a specific spot on the UI for lifestyles, and if you have too many style mods they push each other out of the spot and you can't click on them anymore.

what part of the lifestyle gui file do i need to edit to extend the hitbox to the left and right so i can play with all these styles?
 
When it comes to localization does anyone have a script or anything that can mass create the localization strings based on the error file. Apparently CK3 wants every name in localization and so when porting over a CK2 character file the error log gets clogged with a bunch of 'Missing loc name' and needless to say I don't want to manually add 1500 names. I mean it doesn't effect anything but the error log and I can easily remove it every time I look at it but I wouldn't mind being able to get rid of it.
 
Last edited:
Ah ha! I'm starting to understand. That makes sense now. I'll try again when I get home from work and the kids are asleep.

Very helpful for me to generalize when I want to do other things. Part of my goal is this specific task but really I'm trying to get a foundation of the overall naming conventions and syntax. Thank you for your detailed answers helping me do that.

I've played a little EU and CK2 but this is my deepest dive with Paradox. It seems like a lot changed from CK2 scripting so I can't lean on examples I found as much as I'd hoped.
For reference, here is what works. The key was that the game recognizes it as the "house" variable, not "dynasty_house" as it's listed elsewhere. You can obviously modify to specific characters or any other way of doing it. In my test case, they all end up as orphans in the dynasty tree view, but you could obviously solve that by adding relations. That seems like a good next challenge...

@Dragatus --Many thanks once again. You got me exactly what I needed/wanted! Now I can't wait to try to figure out more!

Code:
every_vassal_or_below = {
            limit = {
                NOT = {
                    dynasty_house = house:house_british_isles_briain
                }
            }
            set_house = house:house_british_isles_briain             
              

            }
        }
 
  • 1
Reactions:
When it comes to localization does anyone have a script or anything that can mass create the localization strings based on the error file. Apparently CK3 wants every name in localization and so when porting over a CK2 character file the error log gets clogged with a bunch of 'Missing loc name' and needless to say I don't want to manually add 1500 names. I mean it doesn't effect anything but the error log and I can easily remove it every time I look at it but I wouldn't mind being able to get rid of it.
Here is a bit of python code that you can try.
Code:
errorInput = open("error.log", "r",encoding='utf-8-sig',errors='ignore')
namesOutput = open("names_localization_l_english.yml", "w",encoding='utf-8-sig',errors='ignore')

namesOutput.write("l_english")
for line in errorInput:
    if("Missing loc for name") in line:
        fixName = ""
        tmpName = line[line.index("loc for name '")+14:line.index("' for character")]
        print(tmpName)
        if "'" in tmpName or " " in tmpName:
            fixName = tmpName
            tmpName = tmpName.replace("'","_").replace(" ","_")
        namesOutput.write("\n %s:0"%tmpName)
        namesOutput.write(" \"%s\""%line[line.index("loc for name '")+14:line.index("' for character")])
        if len(fixName)>0:
            namesOutput.write("\t\t#Code changed from:\t %s"%fixName)

namesOutput.close()
 
Here is a bit of python code that you can try.
Code:
errorInput = open("error.log", "r",encoding='utf-8-sig',errors='ignore')
namesOutput = open("names_localization_l_english.yml", "w",encoding='utf-8-sig',errors='ignore')

namesOutput.write("l_english")
for line in errorInput:
    if("Missing loc for name") in line:
        fixName = ""
        tmpName = line[line.index("loc for name '")+14:line.index("' for character")]
        print(tmpName)
        if "'" in tmpName or " " in tmpName:
            fixName = tmpName
            tmpName = tmpName.replace("'","_").replace(" ","_")
        namesOutput.write("\n %s:0"%tmpName)
        namesOutput.write(" \"%s\""%line[line.index("loc for name '")+14:line.index("' for character")])
        if len(fixName)>0:
            namesOutput.write("\t\t#Code changed from:\t %s"%fixName)

namesOutput.close()

Thanks for the script! Tried it out but unfortunately it ends up giving an invalid syntax error.

1601445245152.png
 
Is there a complete list anywhere yet of commands that can be used to call variable localization terms, like GetSheHe or GetBestName? The sort of thing found here at the CK2 wiki. So far there's not a corresponding page on the CK3 wiki...
 
I'm trying to change a character's realm law from partition to primogeniture
I tried:
Code:
effect = {
    character:1054843 = {
        add_realm_law = { single_heir_succession_law }
    }
}
but this doesn't do anything.
note: the character doesn't fulfill the requirements for single heir laws.
Can anyone help me, with this?

edit: add_realm_law = { single_heir_succession_law } is wrong i have to replace it with add_realm_law = single_heir_succession_law

edit2: if i type
Code:
effect = {
            add_realm_law = single_heir_succession_law
}
inside the character file, it then works.
so my question is how do i scope a specific character using the id, to then use an effect?
 
Last edited: