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

unmerged(98596)

Sergeant
Apr 24, 2008
66
0
I'm trying to write an event that goes rather like this:

If a ruler belongs to X or Y culture, but does not possess a certain inheritance, government, or ecclessiacal system (one of the three), they can be prompted to change all of them in a single event. It's for something I've been fiddling about with. An example (just using Irish and Scottish here for simplicities sake, though it's not what I intend to do with the event, just a theoretical what if);

If an Irish or Scottish ruler does not possess salic consanguinity, traditional custom, and monastic supremacy laws all at once, the event will fire offering the opportunity to adopt all of them in a single event.

This gets trickier, because some things I would like to vary between vassals and kings.

Same scenario as above, Irish or Scottish, doesn't possess, blah blah blah; the difference is, this event will only fire, for Scots, if the character is a vassal (but will fire for any Irish) or an independent count. Instead, for independent Scots in duchies or kingdoms, they get prompted for semisalic consanguinity, traditional custom, and regal supremacy laws.

...So. How would I go about scripting this if possible?
 
Somairle said:
If an Irish or Scottish ruler does not possess salic consanguinity, traditional custom, and monastic supremacy laws all at once, the event will fire offering the opportunity to adopt all of them in a single event.
Untested:
Code:
character_event = { 

	id = 40001
	picture = "event_law"

	trigger = {
		# must be a ruler
		condition = { type = ruler }
		# must be irish or scottish
		condition = {
			type = or
			condition = { type = culture value = irish }
			condition = { type = culture value = scottish }
		}
		# and must not have salic consanguinity, traditional custom, and monastic supremacy already
		condition = {
			condition = { type = not value = { type = has_law value = { salic_consanguinity_law = yes } } }
			condition = { type = not value = { type = has_law value = { traditional_custom_law = yes } } }
			condition = { type = not value = { type = has_law value = { monastic_supremacy = yes } } }
		}
	}

	mean_time_to_happen = {
		# 1/2 the default law-changing mtth, but without the modifiers
		years = 50
	}


	action_a = { #Good idea, lord!
		ai_chance = 50
			modifier = {
				condition = { type = trait value = modest }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = generous }
				factor = 1.1
			}
		effect = { type = set_law value = salic_consanguinity_law }
		effect = { type = set_law value = traditional_custom_law }
		effect = { type = set_law value = monastic_supremacy }
	}

	action_b = { #No, I shall rule this land as I always have
		ai_chance = 50
			modifier = {
				condition = { type = trait value = selfish }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = arbitrary }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = just }
				factor = 1.1
			}
		effect = { type = prestige value = 25 }
	}
}
 
Somairle said:
the difference is, this event will only fire, for Scots, if the character is a vassal (but will fire for any Irish) or an independent count.
Here's the modified original:
Code:
character_event = { 

	id = 40001
	picture = "event_law"

	trigger = {
		# must be a ruler
		condition = { type = ruler }
		# must be either irish...
		condition = { type = or
			condition = { type = culture value = irish }
			# or must be an independent scottish count or a scottish vassal
			condition = { type = and
				condition = { type = culture value = scottish }
				condition = { type = or				
					condition = { type = county }	# all counties are either independent or vassals
					condition = { type = is_vassal }
				}
			}
		}
		# and must not have salic consanguinity, traditional custom, and monastic supremacy already
		condition = {
			condition = { type = not value = { type = has_law value = { salic_consanguinity_law = yes } } }
			condition = { type = not value = { type = has_law value = { traditional_custom_law = yes } } }
			condition = { type = not value = { type = has_law value = { monastic_supremacy = yes } } }
		}
	}

	mean_time_to_happen = {
		# 1/2 the default law-changing mtth, but without the modifiers
		years = 50
	}


	action_a = { #Good idea!
		ai_chance = 50
			modifier = {
				condition = { type = trait value = modest }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = generous }
				factor = 1.1
			}
		effect = { type = set_law value = salic_consanguinity_law }
		effect = { type = set_law value = traditional_custom_law }
		effect = { type = set_law value = monastic_supremacy }
	}

	action_b = { #No, I shall rule this land as I always have
		ai_chance = 50
			modifier = {
				condition = { type = trait value = selfish }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = arbitrary }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = just }
				factor = 1.1
			}
		effect = { type = prestige value = 25 }
	}
}
Somairle said:
Instead, for independent Scots in duchies or kingdoms, they get prompted for semisalic consanguinity, traditional custom, and regal supremacy laws.
Code:
character_event = { 

	id = 40002
	picture = "event_law"

	trigger = {
		# must be a ruler
		condition = { type = ruler }
		# must be scottish
		condition = { type = culture value = scottish }
		# must be independent
		condition = { type = is_independent }
		# must be either a duke or king...i.e., not a county
		condition = { type = not value = { type = county } }
		# and must not have semisalic consanguinity, traditional custom, and regal supremacy already
		condition = {
			condition = { type = not value = { type = has_law value = { semisalic_consanguinity_law = yes } } }
			condition = { type = not value = { type = has_law value = { traditional_custom_law = yes } } }
			condition = { type = not value = { type = has_law value = { regal_supremacy = yes } } }
		}
	}

	mean_time_to_happen = {
		# 1/2 the default law-changing mtth, but without the modifiers
		years = 50
	}


	action_a = { #Good idea!
		ai_chance = 50
			modifier = {
				condition = { type = trait value = modest }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = generous }
				factor = 1.1
			}
		effect = { type = set_law value = semisalic_consanguinity_law }
		effect = { type = set_law value = traditional_custom_law }
		effect = { type = set_law value = regal_supremacy }
	}

	action_b = { #No, I shall rule this land as I always have
		ai_chance = 50
			modifier = {
				condition = { type = trait value = selfish }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = arbitrary }
				factor = 1.1
			}
			modifier = {
				condition = { type = trait value = just }
				factor = 1.1
			}
		effect = { type = prestige value = 25 }
	}
}
Still untested.
 
Try launching them for a valid character in the console (focus an Irish lord's portrait and type charevent 40001). The console will report if it worked or not, and what the MTTH is. If anything is wrong it will also display there.

Have you checked that you do not already have events with this range? They seem to be using the same range Grell used.