Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

1 hour ago, lockeslylcrit said:

Having two copies of the same culture in different culture groups will lead to bad things happening. Deactivate the original.

Is it possible to use culture group as a judging condition? Like:

 

owner = {
				culture_group = liberian
				OR = {
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_john_doe
					}
					top_liege = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_john_doe
						}
					}
				}
			}

instead of listing each individual culture in the group?

Link to comment
1 hour ago, figandsalt said:

Is it possible to use culture group as a judging condition? Like:

 


owner = {
				culture_group = liberian
				OR = {
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_john_doe
					}
					top_liege = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_john_doe
						}
					}
				}
			}

instead of listing each individual culture in the group?

Yes, culture_group will work perfectly fine as a condition as long as you are listing the group, not the individual cultures (e.g. north_germanic, not norse)

Link to comment
On 12/30/2018 at 11:02 PM, lockeslylcrit said:

Yes, culture_group will work perfectly fine as a condition as long as you are listing the group, not the individual cultures (e.g. north_germanic, not norse)

Thank you for your reply.

 

There is one other thing that confused me for several days, couldn't work it out. I wonder if you can give me some advice.

 

How to give a character an artifact at the beginning of the game (like the Lombardy Crown)? I added a new artifact in my mod and tried to make a character in 867 start possess it. So I added "has_artifact = xxx" in the responding history file. But when I loaded the game the artifact didn't show up.

 

Fixing code of a mod is really inconvenient. In the MS visual studio all I have to do is pressing the compile button, but now I need to wait for the game booting up to check errors.

Link to comment
1 hour ago, figandsalt said:

Thank you for your reply.

 

There is one other thing that confused me for several days, couldn't work it out. I wonder if you can give me some advice.

 

How to give a character an artifact at the beginning of the game (like the Lombardy Crown)? I added a new artifact in my mod and tried to make a character in 867 start possess it. So I added "has_artifact = xxx" in the responding history file. But when I loaded the game the artifact didn't show up.

 

Fixing code of a mod is really inconvenient. In the MS visual studio all I have to do is pressing the compile button, but now I need to wait for the game booting up to check errors.

has_artifact is a condition, not a command. To get it to spawn, you will want add_artifact.

 

As for fixing code, https://forum.paradoxplaza.com/forum/index.php?threads/the-validator-find-errors-quickly-and-with-minimal-pain.597480/

Link to comment
10 minutes ago, lockeslylcrit said:

has_artifact is a condition, not a command. To get it to spawn, you will want add_artifact.

 

As for fixing code, https://forum.paradoxplaza.com/forum/index.php?threads/the-validator-find-errors-quickly-and-with-minimal-pain.597480/

Where should I put this line? Is it like:

 

...
	culture="han"
	trait=skilled_tactician
	trait=brave
	trait=inspiring_leader
	trait=strong
	trait=levy_coordinator
	trait=kow_tow_completed_tier_3
	add_artifact = magic_stone
	have_artifact = magic_stone
	martial = 6
	799.1.1={
		birth=yes
	}
...

or just put add_artifact alone?

Link to comment
16 minutes ago, figandsalt said:

Where should I put this line? Is it like:

 


...
	culture="han"
	trait=skilled_tactician
	trait=brave
	trait=inspiring_leader
	trait=strong
	trait=levy_coordinator
	trait=kow_tow_completed_tier_3
	add_artifact = magic_stone
	have_artifact = magic_stone
	martial = 6
	799.1.1={
		birth=yes
	}
...

or just put add_artifact alone?

For commands, you need to put them in a date block.

 

	culture="han"
	trait=skilled_tactician
	trait=brave
	trait=inspiring_leader
	trait=strong
	trait=levy_coordinator
	trait=kow_tow_completed_tier_3
	martial = 6
	799.1.1={
		birth=yes
		add_artifact = magic_stone
	}

 

Link to comment
2 hours ago, lockeslylcrit said:

The former. The MTTH wont even start to tick down until it is that specific year or later.

And culture flipping? Does it happen without needing a decision to start it? I already looked in the decisions folder and found none referring to the Norse back flip, but I want to make sure.

Link to comment
7 minutes ago, AlexWyrmin said:

And culture flipping? Does it happen without needing a decision to start it? I already looked in the decisions folder and found none referring to the Norse back flip, but I want to make sure.

Culture flipping never happens without an attached event.

Link to comment

noob to the game and just got myself into studying mod scripts to see how everything works, specifically the native "impregnate" function. I would like to know where should I check to know how does it handle things like enabling the option to call for a legitimize bastard event, and if it can be altered in any way. Any pointers would be greatly appreciated :)

Link to comment
16 minutes ago, Shuzi said:

noob to the game and just got myself into studying mod scripts to see how everything works, specifically the native "impregnate" function. I would like to know where should I check to know how does it handle things like enabling the option to call for a legitimize bastard event, and if it can be altered in any way. Any pointers would be greatly appreciated :)

There are two types of impregnation commands. Both are the same with the exception of how it deals with the true father. There are two types of fathers: real_father and true_father. The real father is either your husband (if normally impregnated, or a cuckoo and he doesn't figure things out) or your illicit lover (if the husband is a cuckoo). Basically, real father is who people think is the father of the child. The true father is the person who actually impregnated you.

 

impregnate = yes/0/[char id]/scope

will have the character you set in the command impregnate the woman. Yes or 0 will impregnate the woman from a non-existing character (ala devil worshiper orgy event). Using this command will always have the true_father known, so it's best not to use this command if you have an event set up with an illicit lover, unless you absolutely want that lover known.

 

impregnate_cuckoo = yes/0/[char id]/scope

will have the character you set in the command impregnate the woman and be hidden until the husband finds out.

 

If the woman is impregnated by someone other than her husband or concubine, then event 402 is triggered from the on_pregnancy on_action event in /common/on_actions/ file. This leads to the event in /events/birth_events.txt file which will eventually culminate in the husband finding out or the husband not finding out.

Link to comment

thanks, that's very helpful :D

I'm kinda curious as I have a case where I'm using Dark World Extra, where I as a female unmarried liege (High Lord) imprisoned another male highlord and wanted to request claim out from him but he wouldn't, so I raped him while he's in prison in an attempt to have a heir to transfer the claims once he's dead. The thing is the child on birth is just marked as a bastard, in my destiny and is not eligible for the claim.  and there is no event that trigger anything else, nor do I have a legitimize bastard event to choose from, so I'm wondering where the code actually landed on since I have not seen an event pop up.

Link to comment
1 hour ago, Shuzi said:

thanks, that's very helpful :D

I'm kinda curious as I have a case where I'm using Dark World Extra, where I as a female unmarried liege (High Lord) imprisoned another male highlord and wanted to request claim out from him but he wouldn't, so I raped him while he's in prison in an attempt to have a heir to transfer the claims once he's dead. The thing is the child on birth is just marked as a bastard, in my destiny and is not eligible for the claim.  and there is no event that trigger anything else, nor do I have a legitimize bastard event to choose from, so I'm wondering where the code actually landed on since I have not seen an event pop up.

Ask in the DWE thread or the DWF/House Irae discord channel (DWE's author hangs out there). It seems like a specific issue to that mod.

Link to comment

How tough would it be to change the graphical culture of a vanilla culture to another culture? I would like to make Romans use Outremer graphics. I'm finally getting used to the new Italian faces but the chinless/small nose thing on Romans is a bridge too far. I must beautify these people, and Outremer is dead sexy.

 

-edit

 

To be clear, I want to change the faces but not the clothes, castles or any of the rest. That's why I'm asking here. If I wanted to do a total swap I know I could do that.

Link to comment
52 minutes ago, namor360 said:

How tough would it be to change the graphical culture of a vanilla culture to another culture? I would like to make Romans use Outremer graphics. I'm finally getting used to the new Italian faces but the chinless/small nose thing on Romans is a bridge too far. I must beautify these people, and Outremer is dead sexy.

 

-edit

 

To be clear, I want to change the faces but not the clothes, castles or any of the rest. That's why I'm asking here. If I wanted to do a total swap I know I could do that.

Doubtful that it's hard at all. Experiment by copying the code of the culture you want from the /interface/portraits/ file and inserting it into the resulting culture. If you want to keep the clothes the same, then don't copy the lines of code with the clothing.

Link to comment
29 minutes ago, lockeslylcrit said:

Doubtful that it's hard at all. Experiment by copying the code of the culture you want from the /interface/portraits/ file and inserting it into the resulting culture. If you want to keep the clothes the same, then don't copy the lines of code with the clothing.

I think you're right! I'm working on it. Finding the location of the files was the hardest part. There are 75 dlc zips in my CK2 installation. However it turns out DLC 74 contains both the Outremer and Roman portraits.gfx file (good thing I got curious somewhere around DLC 20 and skipped to the bottom and started going bottom up!)

 

I'm using a mod from steam workshop that gives Norse characters German faces but retains the Norse clothing as my guide, since that's exactly what I want. I don't know how to make a separate mod so once I have this worked out I'm going to put it in my Dark World folder under interface and I think that should be fine. 

 

I don't imagine I'll ever learn to actually code this late in life but my experiments playing around with stuff by looking at already existing mods has been a lot of fun and I haven't even crashed my game once.

 

-edit-

 

Ouch, tougher than I hoped. I turns out the Outremer are a Frankenstein creation using a mix of the new Frankish parts with arab parts (which makes sense). so it has no clean defines the way the Roman portrait file does. Still gonna try to make this work though.

Link to comment
19 minutes ago, namor360 said:

I think you're right! I'm working on it. Finding the location of the files was the hardest part. There are 75 dlc zips in my CK2 installation. However it turns out DLC 74 contains both the Outremer and Roman portraits.gfx file (good thing I got curious somewhere around DLC 20 and skipped to the bottom and started going bottom up!)

A quick way of checking the DLC zips is going to the base game's /dlc_metadata/ folder and opening up the dlc_info.txt file. It will tell you which file contains what. dlc007.zip is Sword of Islam because dlc007 is marked as such in the file.

Link to comment

Alright, first attempt was a bust. For future reference the new Roman portrait models are used as the basis for the new Italian portraits (I thought the Italian references were in there as a back-up, they are not). I wound up with invisible Italians and Romans defaulting to... something. Looked like maybe Visigoths. And the roman clothing wasn't there even though I specifically put it in.

 

For this attempt I am going to abandon trying to copy over the Outremer-Frankenstein mess into the Roman portrait file and instead try to directly insert Frankish facial portrait pieces and Arab beards into the Roman portrait file. This will alter Romans and Italians, which I guess I'm fine with since I'm very lukewarm on the new Italian portraits. 

Link to comment

Beginner here, 

 

I've modded in four new martial education traits and I've actually gotten them to appear randomly in the game but it seems like they don't appear through finished education. When tutored by someone with the trait in question, the child ends up with one of the vanilla martial educations.

 

The thing looks like this:

 

mediocre_assailant = {
	attribute = martial
	education = yes
	
	martial = 2
	intrigue = 2
	learning = -3
	stewardship = -3
	
	combat_rating = 8 #old value: 1
	
	health = 0.3
	
	male_insult_adj = INSULT_RAGING
	female_insult = INSULT_HARRIDAN
	child_insult = INSULT_MEANIE
}

Did I forget something or was I just unlucky?

Link to comment

Has anybody managed to figure out how to mod new succession laws? I was excited to make one like eldership where the elders HEAVILY favor larger penis sizes so that it's basically succession based off of that. Then there could be variants which take breast size into account, or ones that don't so cognatic succession basically just means futas can inherit. I also thought some events that can randomly trigger like those with eldership could be fun. I was thinking maybe a penis-measuring contest for the potential heirs which could give opinion bonuses or maybe influence succession.

 

Anyway, the problem is that the custom succession laws are really complicated. Like oh my god just look at one. I have no idea what I'm looking at. I can understand most of CK2's files and modify them just fine, with only the occasional problem on very long conditions and such, but gosh there's just so much to succession laws. If anybody else has already figured them out and could give an explanation of how best to edit them, that'd be great.

Link to comment
11 hours ago, MrAnonym said:

Beginner here, 

 

I've modded in four new martial education traits and I've actually gotten them to appear randomly in the game but it seems like they don't appear through finished education. When tutored by someone with the trait in question, the child ends up with one of the vanilla martial educations.

 

The thing looks like this:

 


mediocre_assailant = {
	attribute = martial
	education = yes
	
	martial = 2
	intrigue = 2
	learning = -3
	stewardship = -3
	
	combat_rating = 8 #old value: 1
	
	health = 0.3
	
	male_insult_adj = INSULT_RAGING
	female_insult = INSULT_HARRIDAN
	child_insult = INSULT_MEANIE
}

Did I forget something or was I just unlucky?

Everything is based on events. The reason you're not getting it from the childhood education is because that trait needs to be added to the childhood education events. The event in question is ZE.14200 in the /events/ze_education_trait_events.txt file.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use