# Character scope
on_startup = {
	events = {
		TOG.3105 # Varangian Captain gets Varangian trait
		62900 # Bagsecg of Jylland invades Mercia with "the Great Summer Army"
		TOG.580 # Runestones can no longer be commissioned
	}
}

# Character scope
on_yearly_pulse = {
	events = {
		TOG.400 # Discovery of Greenland
		TOG.401 # Greenland is settled
		TOG.402 # Leif Ericson discovers Vinland
		TOG.403 # Aztecs Encountered (Sunset Invasion only)
		TOG.580 # Runestones can no longer be commissioned
	}

	random_events = {
		# Various Events
		100 = TOG.3401 # Peijaiset
		100 = TOG.3402 # Will the real Odin please stand up?
		100 = TOG.3400 # Son of the Buffalo Woman

		# Former MTTH Events
		100 = TOG.3109 # Child wants to join the Varangians (Son) - Formerly 200 month MTTH

		# Replaced wholesale in Plus
	#	oldgods_adventurers = {
	#		970 = 0
	#
	#		20 = TOG.1200
	#		10 = TOG.1210
	#	}

		holmgang_events = {
			delay = 46

			833 = 0

			67 = TOG.5015 # Liege Hates You
			67 = TOG.5016 # Fellow Vassal Hates You
			67 = TOG.5017 # Your Vassal Hates You
		}
	}
}

# Character scope
on_bi_yearly_pulse = {
	events = {
		TOG.3005 # Lose Berserker Trait when too old
	}

	random_events = {
		20 = TOG.3006 # Berserker goes berserk against Courtier
		40 = TOG.3200 # Vlva Appears
		40 = TOG.3201 # Young Vlva Appears
		40 = TOG.3202 # Old Vlva Appears

		pet_bear_events = {
			delay = 44

			780 = 0

			35 = TOG.160 # Bear attacks courtier
			50 = TOG.163 # Visiting dignitaries impressed by bear
			50 = TOG.164 # Bear taught to dance
			50 = TOG.165 # Bear depressed
			35 = TOG.166 # Bear dies
		}
	}
}

# Character scope
on_five_year_pulse = {
	random_events = {
		# Zoroastrian pets
		1 = ZP.1 # As a pious Zoroastrian we need a holy dog

		jomsvikings = {
			903 = 0
			 97 = TOG.4001 # Founding of the Jomsvikings
		}
	}
}

# ROOT is the owner of the winning unit
# FROM is the taken holding title
on_siege_over_winner = {
	events = {
		TOG.1005 # Peasants take county capital
		TOG.1025 # Heretics take county capital
		TOG.1045 # Nationalists take county capital
		TOG.1065 # Religious rebels take county capital
	}
}

# Fires for all characters presumed to be in the Holding at the time
# ROOT is local character
# FROM is lost holding title
# new_character is owner of siege winner unit
on_siege_over_loc_chars = {
	random_events = {
		200 = TOG.1190 # Rebels kill character
	}
}

# Character scope
on_birth = {
	events = {
		TOG.3206 # Child Perceived to be Demon Born
		TOG.6001 # Children gains Saoshyant Descendant trait from Saoshyant
	}
}

# Character scope (at 2 months)
on_pregnancy = {
	events = {
		TOG.3204 # Vlva Warns About Child
	}
}

# When a holding is burned down
# ROOT is owner of looting unit
# FROM is looted holding title
on_loot_settlement = {
	events = {
		TGF.3321 # Ravager
		TGF.3322 # Sea King
		TGF.3323 # Increase viking_raids counter
	}

	random_events = {
		50 = TGF.3320 # Viking Trait Gained

		5 = TOG.3300 # +2 Axe
		5 = TOG.3301 # Strange Chest
		5 = TOG.3302 # Key Found
		5 = TOG.3303 # Key Found by Child or relative
	}
}

# When rebels appear
# ROOT is province
on_rebel_revolt = {
	events = {
		TOG.999 # Rebels rise up (includes nomadic minor clan uprising)
	}
}

# ROOT is the navy's owner
# FROM is the province
on_navy_returns_with_loot = {
	events = {
		TOG.3404  # Prosperity gain from loot
	}
}

# Character converts religion, for whatever reason
# ROOT is the character after conversion
# FROM scope has the old religion
on_character_convert_religion = {
	events = {
		TOG.7101 # Removes main deity for defensive pagans
		ZP.6     # Clean up modifiers for zoroastrian pets
	}
}

# Character scope
on_adulthood = {
	events = {
		TOG.3260 # Clear demon child flags
	}
}

# FROM is attacker
# ROOT is defender
on_war_started = {
	events = {
		TOG.183 # Nerge abandoned due to war
	}
}

# Fires every month for characters who are preparing an invasion
# ROOT is preparing invasion
# FROM is targeted character
on_prepared_invasion_monthly = {
	events = {
	}

	random_events = {
		15 = 0
		15 = 62322 # A small force flocks to your banner
		15 = 62320 # A significant force flocks to your banner
		 2 = 62321 # A Hero joins your cause with his retinue
	}
}

# Fires if a prepared invasion becomes invalid
# ROOT is preparing invasion
# FROM is targeted character
on_prepared_invasion_aborts = {
	events = {
		62300 # Handle abort
	}
}

# Fires if a prepared invasion expires
# ROOT is preparing invasion
# FROM is targeted character
on_prepared_invasion_expires = {
	events = {
		62310 # Handle expiration
	}
}

# Character scope, isn't dead yet
on_death = {
	events = {
		TOG.3135 # Sons become Varangians on father's death
	}
}

# ROOT is the character
# FROM is the title
# FROMFROM is the old holder
on_new_holder = {
	events = {
		ZP.7 # Clean up zoroastrian pets on province modifiers in case capital lost
		TOG.3105 # Varangian Captain gets Varangian trait
	}
}

# ROOT is the character
# FROM is the title
# FROMFROM is the old holder
on_new_holder_inheritance = {
	events = {
		TOG.3105 # Varangian Captain gets Varangian trait
	}
}

# ROOT is the character
# FROM is the title
# FROMFROM is the old holder
on_new_holder_usurpation = {
	events = {
		TOG.3105 # Varangian Captain gets Varangian trait
	}
}