• 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.
Feb 3, 2009
588
0
As I was getting into modding on a post in the main thread (and before I forced Veld to put on his Moderator hat), I thought it'd be better to continue it here. Original Post: http://forum.paradoxplaza.com/forum/showthread.php?t=413963

So I thought it only practical, since I basically wanted to keep this event, to add the Capital Province of Byzantian (496) to the allowable (ie - event won't fire) in the conditions for event 6102. I added condition = { type = not value = { type = area value = 496 } } to the first group of type=not values (as can be seen in my ADJUSTED Event, but the event fired anyway for the 6th time for the very same Dukedom 6 months after adjusting this event (6 months after I previously re-forcevassalized him from the last time this event fired). So obviously, what I did wasn't working. Any help/info on where to put my Catholic Capital of Byzantian/496 in this event would be greatly appreciated. From my reading of it, some of those exempted Catholic Capitals are even in Russia.

Code:
# Catholic vassals in Middle East or North Africa break free from distant lieges

character_event = {
	id = 6102

	picture = "event_claim"

	trigger = {
		condition = { type = is_vassal }
		condition = { type = religion value = catholic }
		condition = { type = not value = { type = atwar } }
		condition = { type = not value = { type = trait value = loyalist } }
		condition = { type = age value = 18 }
		condition = { type = not value = { type = primary_heir } }
		condition = { type = realm_ruler
			condition = { type = and
				condition = { type = religion value = catholic }
				$condition = { type = not value = { type = atwar } }
				condition = { type = not value = { type = prestige value = 5000 } }
			}
		}
		condition = { type = or
			condition = { type = and
				condition = { type = region value = Middle_East }
				condition = { type = capital
					condition = { type = region value = Middle_East }
				}
				condition = { type = liege
					condition = { type = capital
						condition = { type = and
							condition = { type = not value = { type = region value = Middle_East } }
							condition = { type = not value = { type = region value = Asia_Minor } }
							condition = { type = not value = { type = area value = 496 } } # Byzantian added by GJScarritt
							condition = { type = not value = { type = area value = 780 } }
							condition = { type = not value = { type = area value = 789 } }
							condition = { type = not value = { type = area value = 790 } }
							condition = { type = not value = { type = area value = 594 } }
							condition = { type = not value = { type = area value = 597 } }
							condition = { type = not value = { type = area value = 600 } }
							condition = { type = not value = { type = area value = 604 } }
							condition = { type = not value = { type = area value = 609 } }
							condition = { type = not value = { type = area value = 612 } }
							condition = { type = not value = { type = area value = 615 } }
							condition = { type = not value = { type = area value = 618 } }
						}
					}
				}
			}
			condition = { type = and
				condition = { type = region value = Asia_Minor }
				condition = { type = capital condition = { type = or
					condition = { type = area value = 762 }
					condition = { type = area value = 707 }
					condition = { type = area value = 756 }
					condition = { type = area value = 777 }
				} }
				condition = { type = liege
					condition = { type = capital
						condition = { type = and
							condition = { type = not value = { type = region value = Middle_East } }
							condition = { type = not value = { type = region value = Asia_Minor } }
							condition = { type = not value = { type = area value = 780 } }
							condition = { type = not value = { type = area value = 789 } }
							condition = { type = not value = { type = area value = 790 } }
						}
					}
				}
			}
			condition = { type = and
				condition = { type = region value = North_Africa }
				condition = { type = or
					condition = { type = and
						condition = { type = capital
							condition = { type = or
								condition = { type = area value = 821 }
								condition = { type = area value = 828 }
								condition = { type = area value = 831 }
								condition = { type = area value = 837 }
								condition = { type = area value = 839 }
								condition = { type = area value = 847 }
								condition = { type = area value = 848 }
							}
						}
						condition = { type = liege
							condition = { type = capital
								condition = { type = and
									condition = { type = not value = { type = region value = Spain } }
									condition = { type = not value = { type = region value = North_Africa } }
								}
							}
						}
					}
					condition = { type = and
						condition = { type = capital
							condition = { type = or
								condition = { type = area value = 815 }
								condition = { type = area value = 810 }
								condition = { type = area value = 805 }
							}
						}
						condition = { type = liege
							condition = { type = capital
								condition = { type = and
									condition = { type = not value = { type = area value = 339 } }
									condition = { type = not value = { type = area value = 334 } }
									condition = { type = not value = { type = region value = North_Africa } }
								}
							}
						}
					}
					condition = { type = and
						condition = { type = capital
							condition = { type = or
								condition = { type = area value = 780 }
								condition = { type = area value = 789 }
								condition = { type = area value = 790 }
								condition = { type = area value = 803 }
							}
						}
						condition = { type = liege
							condition = { type = capital
								condition = { type = and
									condition = { type = not value = { type = area value = 780 } }
									condition = { type = not value = { type = area value = 789 } }
									condition = { type = not value = { type = area value = 790 } }
									condition = { type = not value = { type = area value = 803 } }
									condition = { type = not value = { type = area value = 815 } }
									condition = { type = not value = { type = area value = 810 } }
									condition = { type = not value = { type = area value = 805 } }
									condition = { type = not value = { type = region value = Middle_East } }
									condition = { type = not value = { type = region value = Asia_Minor } }
								}
							}
						}
					}
				}
			}
		}
	}

	mean_time_to_happen = {
		months = 60

		modifier = {
			condition = { type = duchy }
			factor = 0.25
		}
		modifier = {
			condition = { type = has_vassal }
			factor = 0.5
		}
		modifier = {
			condition = { type = is_married }
			factor = 0.75
		}
		modifier = {
			condition = { type = martial value = 8 }
			factor = 0.9
		}
		modifier = {
			condition = { type = martial value = 12 }
			factor = 0.9
		}
		modifier = {
			condition = { type = stewardship value = 8 }
			factor = 0.9
		}
		modifier = {
			condition = { type = stewardship value = 12 }
			factor = 0.9
		}
		modifier = {
			condition = { type = diplomacy value = 8 }
			factor = 0.9
		}
		modifier = {
			condition = { type = diplomacy value = 12 }
			factor = 0.9
		}
		modifier = {
			condition = { type = intrigue value = 8 }
			factor = 0.9
		}
		modifier = {
			condition = { type = intrigue value = 12 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = proud }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = liege
				condition = { type = or
					condition = { type = diplomacy value = 9 }
					condition = { type = chancellor_csc condition = { type = diplomacy value = 12 } }
				}
			}
			factor = 2.0
		}
		modifier = {
			condition = { type = liege
				condition = { type = and
					condition = { type = not value = { type = diplomacy value = 5 } }
					condition = { type = not value = { type = chancellor_csc condition = { type = diplomacy value = 7 } } }
				}
			}
			factor = 0.5
		}
		modifier = {
			condition = { type = exists value = JERU }
			condition = { type = not value = { type = realm_ruler condition = { type = title value = JERU } } }
			condition = { type = or
				condition = { type = and
					condition = { type = region value = asia_minor }
					condition = { type = capital condition = { type = or
						condition = { type = area value = 769 } # Phoenicia
						condition = { type = area value = 777 } # Jordan
					} }
				}
				condition = { type = and
					condition = { type = region value = north_africa }
					condition = { type = capital condition = { type = area value = 780 } }
				}
			}
			factor = 0.1
		}
		modifier = {
			condition = { type = stability value = 1 }
			factor = 0.9
		}
		modifier = {
			condition = { type = stability value = 2 }
			factor = 0.9
		}
		modifier = {
			condition = { type = stability value = 3 }
			factor = 0.9
		}
		modifier = {
			condition = { type = not value = { type = stability value = 0 } }
			factor = 1.1
		}
		modifier = {
			condition = { type = not value = { type = stability value = -1 } }
			factor = 1.1
		}
		modifier = {
			condition = { type = not value = { type = stability value = -2 } }
			factor = 1.1
		}
	}

	action_a = {
		ai_chance = 99
		effect = { type = relation for = liege value = -50 }
		effect = { type = trigger for = liege value = 6103 }
		effect = { type = add_title_claim value = liege }
		effect = { type = independence }
		effect = { type = loyalty value = 1.0 }
		effect = { type = prestige value = 50 }
	}
	action_b = {
		ai_chance = 1
		effect = { type = relation for = liege value = 25 }
		effect = { type = loyalty value = 0.2 }
		effect = { type = prestige value = -20 }
		effect = { type = piety value = 20 }
		effect = { type = add_trait value = loyalist }
	}
}

# Reaction event for liege
character_event = {
	id = 6103

	picture = "event_intrigue"

	immidiate = {
		effect = { type = prestige value = 50 }
		effect = { type = piety value = 50 }
	}
}