Jump to content

[Modding] Explanation required for an event.


rance

Recommended Posts

I decided to try my hand at modding and I am trying to understand the following Culture Conversion event from the vanilla game.

 

# Visigothic province converts to Castilian
province_event = {
	id = OC.7
	desc = EVTDESC_CM_7
	picture = GFX_evt_stone_church

	trigger = {
		should_evolve_cultures_trigger = yes
		culture = visigothic
		NOT = { religion_group = muslim }
		OR = {
			region = custom_castillian
			owner = { culture = castillan }
		}
		any_province_holding = {
			NOT = { holding_type = nomad }
		}
		NOT = {
			owner = { 
				top_liege = { 
					culture = visigothic 
					OR = {
						tier = emperor
						num_of_king_titles = 2
					}
				} 
			}
		}
		NOT = {
			owner = { 
				religion_head = { culture = visigothic }
			}
		}
		year = 850
	}
	
	mean_time_to_happen = {
		months = 3600
		modifier = {
			factor = 0.5
			owner = {
				culture = castillan
			}
		}
		modifier = {
			factor = 0.3
			OR = {
				has_game_rule = {
					name = culture_conversion
					value = faster_melting_pots
				}
				has_game_rule = {
					name = culture_conversion
					value = faster_melting_pots_and_slower_normal
				}
			}
		}
	}

	option = {
		name = EVTOPTA_CM_7
		culture = castillan
	}
}

What I am trying to understand is this part:

 

NOT = {
			owner = { 
				top_liege = { 
					culture = visigothic 
					OR = {
						tier = emperor
						num_of_king_titles = 2
					}
				} 
			}
		}

Does this mean that, in order for the trigger to fire, the top liege must NOT be of Visigothic culture OR be an Emperor AND posses two King Titles?

Thank you for your time!

Link to comment

Oh, I understand, say you are playing visigoths and you vassalize the Castilians and give them Visigoth territory, that code stops the event from happening, i. e. NO convert if liege is Visigoth (independence first!). Also NO convert if liege is Emperor rank, aha. Like "before X date," you should get the event "before X rank" or it will never happen.

Link to comment
1 hour ago, rance said:

I decided to try my hand at modding and I am trying to understand the following Culture Conversion event from the vanilla game.

 


# Visigothic province converts to Castilian
province_event = {
	id = OC.7
	desc = EVTDESC_CM_7
	picture = GFX_evt_stone_church

	trigger = {
		should_evolve_cultures_trigger = yes
		culture = visigothic
		NOT = { religion_group = muslim }
		OR = {
			region = custom_castillian
			owner = { culture = castillan }
		}
		any_province_holding = {
			NOT = { holding_type = nomad }
		}
		NOT = {
			owner = { 
				top_liege = { 
					culture = visigothic 
					OR = {
						tier = emperor
						num_of_king_titles = 2
					}
				} 
			}
		}
		NOT = {
			owner = { 
				religion_head = { culture = visigothic }
			}
		}
		year = 850
	}
	
	mean_time_to_happen = {
		months = 3600
		modifier = {
			factor = 0.5
			owner = {
				culture = castillan
			}
		}
		modifier = {
			factor = 0.3
			OR = {
				has_game_rule = {
					name = culture_conversion
					value = faster_melting_pots
				}
				has_game_rule = {
					name = culture_conversion
					value = faster_melting_pots_and_slower_normal
				}
			}
		}
	}

	option = {
		name = EVTOPTA_CM_7
		culture = castillan
	}
}

What I am trying to understand is this part:

 


NOT = {
			owner = { 
				top_liege = { 
					culture = visigothic 
					OR = {
						tier = emperor
						num_of_king_titles = 2
					}
				} 
			}
		}

Does this mean that, in order for the trigger to fire, the top liege must NOT be of Visigothic culture OR be an Emperor AND posses two King Titles?

Thank you for your time!

Nope, it indicates that the top liege cannot be Visigothic AND cannot be an emperor OR have two king titles. 

 

                top_liege = { 
                    culture = visigothic *As this is out side of the OR brackets it means it must always be true*
                    OR = {
                        tier = emperor *Things listed in the OR bracket indicate that not everything must be true. Only ONE item in the OR bracket needs to be true for it to take effect.
                        num_of_king_titles = 2
                    }
                } 

 

I hope I explained this well enough! If you are looking into understanding this stuff the ck2 wiki is always a great start. (Looks like it is down right now though.)

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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