# Character scope
on_yearly_pulse = {
	events = {
		RIP.10012 # Check for plague notifications
		RIP.11700 # Prosperity system
		RIP.5050  # Scurvy event
		RIP.30316 # Clean up immortal crisis
		RIP.30317 # Immortal crisis spreads
		RIP.13000 # Epidemic Blame Game start
	}

	random_events = {
		# End of days events
		50 = RIP.14000 # Start doomsday event chain

		# Chess with death
		25 = RIP.30222 # Start event chain

		# Immortal vassal crisis
		25 = RIP.30315 # Immortal suspicions
		50 = RIP.30318 # Suspicions are confirmed

		# Immortal rival
		25 = RIP.30300 # Start event chains

		# Physician Flavor events
		100 = RIP.4010 # Court Physician recommends that you "Take it Easy"
		100 = RIP.4011 # Court Physician gifts you a guide dog
		200 = RIP.4013 # Court Physician suggests fertility treatment
		100 = RIP.4020 # Court Physician Friend teaches you medicine
		100 = RIP.4022 # Court Physician suggests you implement provincial apothecaries (prosperity boost)
		100 = RIP.4030 # Court Physician asks for patronage
		200 = RIP.4040 # Court Physician training event
		200 = RIP.4100 # A Physician-Missionary arrives in a Tribal or Nomadic Court

		# Random Prosperity Increasing Events
		125 = RIP.4300 # Steward suggests building new roads
		125 = RIP.4301 # Lord Spiritual suggests building shrines
		125 = RIP.4302 # Marshal suggests building outposts
		125 = RIP.4303 # Spymaster suggests setting up local messenger stations
		125 = RIP.4304 # Chancellor suggests sponsoring local harvest festivals
		125 = RIP.4305 # You decide upon personally visiting a province

		# Maimed Flavor events
		100 = RIP.29100 # Disfigured events
		100 = RIP.29200 # One-eyed events
		100 = RIP.29300 # One-handed events
		100 = RIP.29400 # One-legged events
		100 = RIP.29511 # Close relation taking care of you

		# Hospital events
		100 = RIP.4501 # Pilgrim physician arrives
		100 = RIP.4504 # Perform charity
		100 = RIP.4512 # Religious heads demand money for hospital presence
		 75 = RIP.4514 # Leper arrives at court
		100 = RIP.4520 # Soup kitchen is damaged
		100 = RIP.4530 # Court physician seek learning at hospital
	}
}

# Character scope
on_bi_yearly_pulse = {
	events = {
		RIP.11506 # Parrots flock to your banner
	}
}

# Character scope
on_decade_pulse = {
	events = {
		RIP.10031 # Clear global flags from bubonic plague
	}

	random_events = {
		immortality = {
			delay = 42

			960 = 0
			 40 = RIP.21000 # Contemplating mortality
		}
	}
}

# ROOT is winning army owner
# FROM opponent army owner
on_battle_won_owner = {
	events = {
		RIP.15115 # EoD prophet loses
	}
}

# ROOT is the owner of the winning unit
# FROM is the taken holding title
on_siege_over_winner = {
	events = {
		RIP.11702 # Prosperity lost when sieged
		RIP.11713 # Monument to Glory teardown
	}
}

# Character scope
on_birth = {
	events = {
		RIP.11064 # Babies born in seclusion get seclusion modifier
	}

	random_events = {
		50 = RIP.29600 # Firstborn/first son reaction
		 1 = RIP.29805 # Reincarnation for non west_african
	}
}

# Triggers when someone gets imprisoned for any reason
# ROOT is prisoner
# FROM is imprisoner
on_become_imprisoned_any_reason = {
	events = {
		RIP.12097 # Being thrown in prison removes seclusion modifier
	}
}

# Character scope, isn't dead yet
on_death = {
	events = {
		RIP.4400 # Nicknames for executions
	}

	random_events = {
		 1 = RIP.29800 # Reincarnation investigation
		25 = RIP.29000 # Lovers/rivals/friends react
	}
}

# When a holding is burned down
# ROOT is owner of looting unit
# FROM is looted holding title
on_loot_settlement = {
	events = {
		RIP.11720 # Wipe progress, chance to drop prosperity
	}
}

# ROOT is the character
# FROM is the title
# FROMFROM is the old holder
on_new_holder = {
	events = {
		RIP.11715 # Removes crown focus on new holder
		RIP.12095 # Remove seclusion from courtiers
		RIP.12098 # Check if we need to remove in_seclusion
	}
}

# ROOT is the character
# FROM is the title
# FROMFROM is the old holder
on_new_holder_inheritance = {
	events = {
		RIP.11715 # Removes crown focus on new holder
		RIP.12095 # Remove seclusion from courtiers
	}
}

# ROOT is the character
# FROM is the title
# FROMFROM is the old holder
on_new_holder_usurpation = {
	events = {
		RIP.11715 # Removes crown focus on new holder
	}
}

# ROOT is builder
# FROM is holding title
on_holding_building_start = {
	events = {
		RIP.30100 # Vassals appreciate when the liege builds stuff in their Holdings
	}
}

# ROOT is owner of province
# FROM is province
on_outbreak = {
	events = {
		RIP.10000 # The Black Death has been discovered
		RIP.4000  # Dancing Plague Starts
	}
}

# ROOT is province
on_province_major_modifier = {
	events = {
		RIP.10030 # Depopulation modifier dissipating
	}
}

# Triggers when a change of employer has been detected. Note that the FROM scope is empty for newly created characters.
# ROOT is character that got a new employer
# FROM is previous employer
# FROMFROM is new employer
on_employer_change = {
	events = {
		RIP.12096 # For safety, to prevent everlasting food-shortage from Seclusion
	}
}

# Triggers when a change of host has been detected. Note that the FROM scope is empty for newly created characters. "on_employer_change" is triggered first if a character has had both their employer and host changed since the last check was made.
# ROOT is the character that got a new host
# FROM is the previous host
# FROMFROM is new employer
on_host_change = {
	events = {
		RIP.12096 # For safety, to prevent everlasting food-shortage from Seclusion
	}
}