• 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.
Could anybody take a quick look at these two codes and tell me what mistakes I made? I'm still rookie when it comes to modding CK2.

Code:
artist_0 = {
		potential = {
		}

		allow = {
			scaled_wealth = 1.0
		}
		effect = {
			character_event = { id = 85000 days = 2 }
			}
		ai_will_do = {
			factor = 0
		}
		}
		
	
	}

This is supposed to be a decision. It doesn't trigger the event.

Code:
letter_event = {
	id = 85000
	desc = "EVTDESC85000"
	picture = GFX_evt_monk
	
	is_triggered_only = yes
		
	
		
	}	
	
	option = {
		name = "EVTOPTA85000" 
		scaled_wealth = -0.4
		prestige = 10
		random = {
			chance = 10
			add_trait = proud }
		}
		
	option = {
		name = "EVTOPTB85000" 
		scaled_wealth = -0.4
		piety = 10
		random = {
			chance = 10
			add_trait = proud }
		}
	
	option = {
		name = "EVTOPTC85000" 
		scaled_wealth = -0.8
		prestige = 25
		random = {
			chance = 30
			add_trait = proud }
		
	
	}

In this event I don't know why but when firing the event via console (no other way since the decision doesn't work) it makes the options completely different from what I was trying to set. It shows options for sth like maybe a hunting event - 1 maimed option and 2 wounded. How to fix that?
 
Brackets are broken in both--use notepad++ for stuff like this, and you'll see it quickly.

There's an extra brackets at the end of the decision, and above the options in the event, plus the event is missing a final bracket.

Also, the decision is not inside a decisions = { } bracket.
 
Thank you for your advice Jaol! I've fixed all the brackets easily with it. The problem is that even after fixing the brackets I have some problems with the event. There are 4 options and only one is what i wanted it to be.

155rkih.jpg


How can I help it?
 
Thank you for your advice Jaol! I've fixed all the brackets easily with it. The problem is that even after fixing the brackets I have some problems with the event. There are 4 options and only one is what i wanted it to be.
Can you repost the event, so we can see exactly what it is.

Does anyone know how current_heir works? For example, does ROOT = { current_heir = { character = FROM } } check if ROOT is heir of FROM or FROM is the heir of ROOT?
 
I am trying to make a mod where I play hereward the wake. I created my own dynasty "of Bourne" and placed all the characters in a character file and managed to do it. However I find that Paradox have already created a Hereward who keeps appearing in Lincoln.
So I copied the saxon text file and edited that changing Hereward (keeping same ID) to give him a mother/father. But now two Herewards appear as siblings.
Is there some way to just replace the saxon.txt file in history\characters or do I have to use replace_path and copy all character text files into my mod for this to work?
 
How to remove de jure claims from county and add another claim?

You need to remove the county from the de jury duchy in Crusader Kings/common/landed_titles.txt

In Crusader Kings II/history/characters find the character to who you want to give a claim and then add an entry like this

Code:
1203.1.1={
		add_claim = d_holland
	}


So that a character looks like this
Code:
206802 = {
	name="Lodewijk" #1191-1218
	dynasty=424
	martial=4
	diplomacy=8
	intrigue=4
	stewardship=7
	religion="catholic"
	culture="dutch"
	add_trait="charitable"
	add_trait="kind"
	add_trait="tough_soldier"
	father=206800
	mother=30021
	1180.1.1={
		birth="1180.1.1"
	}
	1203.1.1={
		add_spouse=31068
	}
	1203.1.1={
		add_claim = d_holland
	} 
	1218.7.30={
		death="1218.7.30"
	}
}
 
What is the syntax for checking buildings in a specific holding?

Code:
holding_scope
title_scope

Those don't work. I'm trying to make some buildings available ("potential" trigger) only if other buildings are previously built in that holding.
 
What is the syntax for checking buildings in a specific holding?

Code:
holding_scope
title_scope

Those don't work. I'm trying to make some buildings available ("potential" trigger) only if other buildings are previously built in that holding.

Isn't that what prerequisite = is for? You can only build a building if certain prerequisites exists, aka certain buildings were previously built!

If you are looking for a way to preserve culture-specific buildings in the event of ownership change, however, the Tweak mod has this:

Code:
building_name = {
		potential = {
			OR = {
				culture = culture_1
				culture = culture_2
			}
			NOT = { has_province_modifier = occupied_different_culturegroup }
		}
		trigger = {
			FROM = {
				culture = PREV
			}
		}
 
I'm trying to make "building trees" in which you can go 3 ways - specialize in units which do good in skirmish, melee or pursue combat.

I want it to be possible to have only one of those 3 types of building in a given holding (thus specializing - can't have all 3 or even 2 of 3)

AFAIK prerequisites only would work partially - it would prevent me from building the other 2 once I have 1 of them, but it would still display those buildings in the building panel.

The "potential" trigger removes would remove those buildings from the panel entirely.

Code:
	ca_infantry_1 = {
		potential = {
			NOT = { has_building = ca_cavalry_1 }
			NOT = { has_building = ca_skirmishers_1 }
		}
	effects etc etc
	}
The above weirdly doesn't work.
 
The "potential" trigger removes would remove those buildings from the panel entirely.

If I understand you correctly you want all buildings to show even if you can only build 1 of them. Try using trigger() instead of potential(), I tried that once and if I remember correctly that produced the exact result you're after, the building showed up in the panel of all provinces even though it could only be built in the capital.
 
If I understand you correctly you want all buildings to show even if you can only build 1 of them. Try using trigger() instead of potential(), I tried that once and if I remember correctly that produced the exact result you're after, the building showed up in the panel of all provinces even though it could only be built in the capital.
Excuse my vagueness, I will try to be more clear:

Point 1. I want all buildings to show as long as none of them are built. Once one of them is built, I want the other 2 to disappear from the panel.

Point 2. Additionally, I want to expand on the choice made in Point 1 by showing more new buildings once 1 of the 3 buildings in Point 1 is built. However, as long as no building in Point 1 is built, I want the building from Point 2 not to be visible.
 
Could someome explain to me (as simply as possible) how to change counties/duchies/kingdoms? I don't mean add new ones, I just mean - for example - to change Mallorca from being a duchy to a kingdom, and Navarra from being a titular kingdom to a de jure one.
 
I'm trying to make "building trees" in which you can go 3 ways - specialize in units which do good in skirmish, melee or pursue combat.

I want it to be possible to have only one of those 3 types of building in a given holding (thus specializing - can't have all 3 or even 2 of 3)

AFAIK prerequisites only would work partially - it would prevent me from building the other 2 once I have 1 of them, but it would still display those buildings in the building panel.

The "potential" trigger removes would remove those buildings from the panel entirely.

Code:
	ca_infantry_1 = {
		potential = {
			NOT = { has_building = ca_cavalry_1 }
			NOT = { has_building = ca_skirmishers_1 }
		}
	effects etc etc
	}
The above weirdly doesn't work.

Try using AND { } or OR {} maybe?
 
I think the game loads the potential{ } of all buildings on startup and then shows them accordingly, I'm not sure if it's possible to have building dissapear from the panel once they're loaded into the game.

On second thought, do cultural/religious buildings appear and disappear once the culture/religion of their lord change? If so then it should be possible.

On third thought, buildings do appear and disappear as they're being upgraded via the upgrades_from trigger.
 
I, too, thought that might be the problem, but this doesn't help.

I think the problem is with scopes, but I might be wrong here as well.
Like these?:

Code:
potential = {
			NOT = { has_building = ca_cavalry_1 
			             has_building = ca_skirmishers_1 }
		}

or
Code:
potential = {
			NOT = { 
                                       AND  = { has_building = ca_cavalry_1 
			                             has_building = ca_skirmishers_1 }
		                          }
                       }