offmap_china = {
	name = china_china
	window_name = domestic_offmaps_window
	button_name = icon_offmaps_entry
	currency_name = TXT_GRACE
	currency_gain = monthly_grace
	currency_reset_on_dynasty_change = yes

	holder_title = title_china_emperor			# minor title used to identify a character as holder of this offmap power
	governor_title = e_china_west_governor
	tier = EMPEROR

	non_aggression_modifier = peace_deal_with_china
	coa_religion = taoist
	government = confucian_bureaucracy
	beginning_of_history = 618.6.18
	sound = china_interaction_interface

	display_trigger = {
		has_dlc = "Jade Dragon"
	}

	policies = {
		china_open
		china_isolationist
		china_expansionist
	}

	statuses = {
		china_stable
		china_unrest
		china_civil_war
		china_mongol_invasion
		china_jurchen_invasion
		china_famine
		china_plague
		china_golden_age
	}

	buttons = {
		offmap_gifts = {
			is_active_trigger = {
				china_offmap_tribute_decisions_enabled_trigger = yes
			}
		}

		offmap_boons = {
			is_active_trigger = {
				china_offmap_boon_decisions_enabled_trigger = yes
			}
		}

		offmap_hostility = {
			is_active_trigger = {
				china_offmap_hostile_decisions_enabled_trigger = yes
			}

			display_trigger = {
				NOT = { offmap_china = { offmap_ruler = { dynasty = FROM } } }
			}
		}

		offmap_hostility2 = {
			display_trigger = {
				always = no
			}
		}
	}

	#These conditions only effect the appearance of the button, it does not actually disable them from being clickable. The same triggers are used in all tribute/boon decisions respectively

	icon_triggers = {
		china_physician_cd = {
			frame = 9

			trigger = { has_character_flag = chinese_grace_physician_sent }
		}

		china_raid_cd = {
			frame = 8
			right = yes

			trigger = { has_character_modifier = china_raid_grace_cd }
		}

		china_famine_cd = {
			frame = 7

			trigger = { has_character_modifier = china_send_relief }
		}

		china_tributary_cd = {
			frame = 6

			trigger = { has_character_modifier = chinese_grace_tributary_timer }
		}

		china_boon_cd = {
			frame = 5
			right = yes

			trigger = { has_character_modifier = jd_china_boon_cd }
		}

		china_commander_cd = {
			frame = 4

			trigger = { has_character_modifier = chinese_grace_send_commander_timer }
		}

		china_eunuch_cd = {
			frame = 3

			trigger = { has_character_modifier = chinese_grace_send_eunuch_timer }
		}

		china_concubine_cd = {
			frame = 2

			trigger = { has_character_modifier = chinese_grace_send_concubine_timer }
		}

		china_gift_cd = {
			frame = 1

			trigger = { has_character_modifier = chinese_grace_send_gift_timer }
		}
	}

	monthly_currency_gain = {
		offmap_same_dynasty = {
			value = 10
			offmap_china = { offmap_ruler = { dynasty = FROM } }
		}

		offmap_war_with_me = {
			value = -10
			war_with = FROM
		}

		offmap_likes_me = {
			value = 1

			FROM = { is_liked_by_China_trigger = yes }
			is_within_diplo_range = FROM
		}

		offmap_likes_tributaries = {
			value = 2

			offmap_china = {
				offmap_has_like = likes_tributaries
			}

			FROM = {
				is_tributary = {
					type = offmap
				}
			}
		}

		vassal_of_WP = {
			value = 2

			FROM = {
				liege = {
					has_landed_title = e_china_west_governor
				}
			}
		}

		offmap_same_culture_and_religion = {
			value = 2

			offmap_ruler = {
				culture = FROM
				religion = FROM
			}

			is_within_diplo_range = FROM
		}
	}

	temple_names = {
		{ # Founder names
			Gaozu
			Taizu
			Shizu
			Zhaozu
			Jingzu
			Xianzu
			Liezu
			Chengzu
		}

		{ # Successor names
			Zhenzong
			Renzong
			Zhongzong
			Yingzong
			Shenzong
			Zhezhong
			Huizong
			Qinzong
			Xiaozong
			Guangzong
			Ningzong
			Lizong
			Duzong
			Duanzong
			Xuanzong
			Suzong
			Daizong
			Muzong
			Jingzong
			Wenzong
			Wuzong
			Zhaozong
			Xizong
			Shizong
			Zhangzong
			Ruizong
			Dingzong
			Xianzong
			Chengzong
			Mingzong
			Jinzong
			Yizong
			Xiangzong
			Huanzong
			Chongzong
			Daozong
			Liezong
			Aizong
			Dezong
			Shengzong
			Xingzong
			Kangzong
			Zhuangzong
			Pingzong
			Sizong
			Anzong
			Yangzong
			Shangzong
			Shunzong
			Zhizong
			Chuangzong
			Shaozong
			Gongzong
		}
	}

	holder_succession = {
		is_female = {					# chances of getting a female holder, as a percentage: if the total is >= 100, the new holder will always be female. If the total is <= 0, the new holder will always be male
			value = 5

			additive_modifier = {
				value = 45
				has_gender_equal_game_rule_trigger = yes
			}
		}
		culture = {
			han = { 		# Default culture for new emperor
				value = 99	# If any other value reaches 100, it will be picked instead
			}

			FROM = {		# Default culture for new emperor
							# the left side here (and for culture, religion, graphical_culture and dynasty)
							# can be a right hand side value (FROM, ROOT, a culture name, etc)
							# The right hand side / inside the brackets is a standard MTTH evaluation
							# Only the one with the highest weight will be used
							# If there's a tie, one of the tied values is picked at random
				value = 0

				additive_modifier = { #the new emperor will keep current culture if things are great
					value = 100
					#china_is_fine_trigger = yes
					FROM = { # Essentially a check that the previous emperor actually exists
						character = yes
					}
				}
			}

			red_panda = {
				value = 0

				additive_modifier = {
					value = 100

					has_alternate_start_parameter = {
						key = special_culture
						value = animal_world
					}
				}
			}
		}

		graphical_culture = {
			FROM = {
				value = 100
			}
		}

		religion = {
			taoist = { 		# Default religion for new emperor
				value = 99	# If any other value reaches 100, it will be picked instead (unless equal, then it will randomize)
			}

			FROM = {
				value = 0
				additive_modifier = { # The new emperor will keep current religion if things are great
					value = 100
					#china_is_fine_trigger = yes
					FROM = { religion_scope = { always = yes } } # Essentially a check that the previous emperor actually exists
				}
			}
		}

		dynasty = {
			FROM = { 		# Default dynasty for new emperor
				value = 99  # Might drop from modifiers -- highest value will be picked instead (unless equal, then it will randomize)
			}

			actually_culture = {
				value = 0

				additive_modifier = {
					value = 100
					NOT = { FROM = { character = yes } }
				}

				additive_modifier = { # Fix for simulating Chinese history on old save boot-up
					value = 100
					random < 12
					has_game_started = no
				}
			}
		}

		likes = {
			likes_concubines = {
				value = 300

				mult_modifier = {
					factor = 0.1
					FROMFROM = { is_female = yes }
				}
			}

			likes_eunuchs = {
				value = 300
			}

			likes_wealth = {
				value = 300
			}

			likes_tributaries = {
				value = 100
			}

			likes_albanians = {
				value = 100

				trigger = {
					any_province = {
						likes_albanians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_arabs = {
				value = 100

				trigger = {
					any_province = {
						likes_arabs = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_assyrians = {
				value = 100

				trigger = {
					any_province = {
						likes_assyrians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_balts = {
				value = 100

				trigger = {
					any_province = {
						likes_balts = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_berbers = {
				value = 100

				trigger = {
					any_province = {
						likes_berbers = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_brits = {
				value = 100

				trigger = {
					any_province = {
						likes_brits = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_caucasians = {
				value = 100

				trigger = {
					any_province = {
						likes_caucasians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_celts = {
				value = 100

				trigger = {
					any_province = {
						likes_celts = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_central_africans = {
				value = 100

				trigger = {
					any_province = {
						likes_central_africans = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_han = {
				value = 100

				trigger = {
					any_province = {
						likes_han = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_crusader_cultures = {
				value = 100

				trigger = {
					any_province = {
						likes_crusader_cultures = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_dravidians = {
				value = 100

				trigger = {
					any_province = {
						culture_group = dravidian_group
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_dutch = {
				value = 100

				trigger = {
					any_province = {
						likes_dutch = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_east_slavics = {
				value = 100

				trigger = {
					any_province = {
						likes_east_slavics = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_egyptians = {
				value = 100

				trigger = {
					any_province = {
						likes_egyptians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_finnics = {
				value = 100

				trigger = {
					any_province = {
						likes_finnics = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_franks = {
				value = 100

				trigger = {
					any_province = {
						likes_franks = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_frisians = {
				value = 100

				trigger = {
					any_province = {
						likes_frisians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_gallics = {
				value = 100

				trigger = {
					any_province = {
						likes_gallics = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_germans = {
				value = 100

				trigger = {
					any_province = {
						likes_germans = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_goths = {
				value = 100

				trigger = {
					any_province = {
						likes_goths = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_greeks = {
				value = 100

				trigger = {
					any_province = {
						likes_greeks = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_horn_africans = {
				value = 100

				trigger = {
					any_province = {
						likes_horn_africans = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_iberians = {
				value = 100

				trigger = {
					any_province = {
						likes_iberians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_indians = {
				value = 100

				trigger = {
					any_province = {
						culture_group = indo_aryan_group
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_iranians = {
				value = 100

				trigger = {
					any_province = {
						likes_iranians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_italians = {
				value = 100

				trigger = {
					any_province = {
						likes_italians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_jew_cultures = {
				value = 100

				trigger = {
					any_province = {
						likes_jew_cultures = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_magyars = {
				value = 100

				trigger = {
					any_province = {
						likes_magyars = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_mesoamericans = {
				value = 100

				trigger = {
					any_province = {
						likes_mesoamericans = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_mongolians = {
				value = 100

				trigger = {
					any_province = {
						likes_mongolians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_nubians = {
				value = 100

				trigger = {
					any_province = {
						likes_nubians = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_vlachs = {
				value = 100

				trigger = {
					any_province = {
						likes_vlachs = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_scandis = {
				value = 100

				trigger = {
					any_province = {
						likes_scandis = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_south_slavics = {
				value = 100

				trigger = {
					any_province = {
						likes_south_slavics = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_tibetans = {
				value = 100

				trigger = {
					any_province = {
						culture_group = tibetan_group
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_turks = {
				value = 100

				trigger = {
					any_province = {
						likes_turks = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_vandals = {
				value = 100

				trigger = {
					any_province = {
						likes_vandals = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_west_africans = {
				value = 100

				trigger = {
					any_province = {
						likes_west_africans = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_west_slavics = {
				value = 100

				trigger = {
					any_province = {
						likes_west_slavics = yes
						is_within_diplo_range = offmap_china
					}
				}
			}

			likes_arabic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_arabic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_arabic_pagans = yes }
				}
			}

			likes_baltic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_baltic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_baltic_pagans = yes }
				}
			}

			likes_berber_pagan = {
				value = 100

				trigger = {
					any_province = {
						likes_berber_pagan = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_berber_pagan = yes }
				}
			}

			likes_bon = {
				value = 100

				trigger = {
					any_province = {
						likes_bon = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_bon = yes }
				}
			}

			likes_buddhists = {
				value = 100

				trigger = {
					any_province = {
						religion = buddhist
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { religion = buddhist }
				}
			}

			likes_celtic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_celtic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_celtic_pagans = yes }
				}
			}

			likes_druze = {
				value = 100

				trigger = {
					any_province = {
						likes_druze = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_druze = yes }
				}
			}

			likes_eastern_christianity = {
				value = 100

				trigger = {
					any_province = {
						likes_eastern_christianity = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_eastern_christianity = yes }
				}
			}

			likes_egyptian_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_egyptian_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_egyptian_pagans = yes }
				}
			}

			likes_finnic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_finnic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_finnic_pagans = yes }
				}
			}

			likes_germanic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_germanic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_germanic_pagans = yes }
				}
			}

			likes_hellenic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_hellenic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_hellenic_pagans = yes }
				}
			}

			likes_hindus = {
				value = 100

				trigger = {
					any_province = {
						religion = hindu
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { religion = hindu }
				}
			}

			likes_islam_kharijite = {
				value = 100

				trigger = {
					any_province = {
						likes_islam_kharijite = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_islam_kharijite = yes }
				}
			}

			likes_islam_shia = {
				value = 100

				trigger = {
					any_province = {
						likes_islam_shia = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_islam_shia = yes }
				}
			}

			likes_islam_sunni = {
				value = 100

				trigger = {
					any_province = {
						likes_islam_sunni = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_islam_sunni = yes }
				}
			}

			likes_jains = {
				value = 100

				trigger = {
					any_province = {
						religion = jain
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { religion = jain }
				}
			}

			likes_canaan_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_canaan_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_canaan_pagans = yes }
				}
			}

			likes_jews = {
				value = 100

				trigger = {
					any_province = {
						religion_group = jewish_group
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_jews = yes }
				}
			}

			likes_manichaeans = {
				value = 100

				trigger = {
					any_province = {
						likes_manichaeans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_manichaeans = yes }
				}
			}

			likes_mazdans = {
				value = 100

				trigger = {
					any_province = {
						likes_mazdans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_mazdans = yes }
				}
			}

			likes_mesoamerican_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_mesoamerican_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_mesoamerican_pagans = yes }
				}
			}

			likes_slavic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_slavic_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_slavic_pagans = yes }
				}
			}

			likes_taoism = {
				value = 100

				trigger = {
					any_province = {
						likes_taoism = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_taoism = yes }
				}
			}

			likes_tengris = {
				value = 100

				trigger = {
					any_province = {
						likes_tengris = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_tengris = yes }
				}
			}

			likes_west_african_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_west_african_pagans = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_west_african_pagans = yes }
				}
			}

			likes_western_christianity = {
				value = 100

				trigger = {
					any_province = {
						likes_western_christianity = yes
						is_within_diplo_range = offmap_china
					}
				}
				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_western_christianity = yes }
				}
			}

			likes_yazidi = {
				value = 100

				trigger = {
					any_province = {
						likes_yazidi = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_yazidi = yes }
				}
			}

			likes_zunists = {
				value = 100

				trigger = {
					any_province = {
						likes_zunists = yes
						is_within_diplo_range = offmap_china
					}
				}

				mult_modifier = {
					factor = 0.5
					FROMFROM = { likes_zunists = yes }
				}
			}
		}

		dislikes = {
			likes_concubines = {
				value = 100

				mult_modifier = {
					factor = 5.0
					FROMFROM = { is_female = yes }
				}
			}

			likes_eunuchs = {
				value = 100
			}

			likes_tributaries = {
				value = 100
			}

			likes_wealth = {
				value = 100
			}

			likes_albanians = {
				value = 100

				trigger = {
					any_province = {
						likes_albanians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_albanians = no
					}
				}
			}

			likes_arabs = {
				value = 100

				trigger = {
					any_province = {
						likes_arabs = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_arabs = no
					}
				}
			}

			likes_assyrians = {
				value = 100

				trigger = {
					any_province = {
						likes_assyrians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_assyrians = no
					}
				}
			}

			likes_balts = {
				value = 100

				trigger = {
					any_province = {
						likes_balts = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_balts = no
					}
				}
			}

			likes_berbers = {
				value = 100

				trigger = {
					any_province = {
						likes_berbers = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_berbers = no
					}
				}
			}

			likes_brits = {
				value = 100

				trigger = {
					any_province = {
						likes_brits = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_brits = no
					}
				}
			}

			likes_caucasians = {
				value = 100

				trigger = {
					any_province = {
						likes_caucasians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_caucasians = no
					}
				}
			}

			likes_celts = {
				value = 100

				trigger = {
					any_province = {
						likes_celts = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_celts = no
					}
				}
			}

			likes_central_africans = {
				value = 100

				trigger = {
					any_province = {
						likes_central_africans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_central_africans = no
					}
				}
			}

			likes_han = {
				value = 100

				trigger = {
					any_province = {
						likes_han = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_han = no
					}
				}
			}

			likes_crusader_cultures = {
				value = 100

				trigger = {
					any_province = {
						likes_crusader_cultures = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_crusader_cultures = no
					}
				}
			}

			likes_dravidians = {
				value = 100

				trigger = {
					any_province = {
						likes_dravidians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_dravidians = no
					}
				}
			}

			likes_dutch = {
				value = 100

				trigger = {
					any_province = {
						likes_dutch = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_dutch = no
					}
				}
			}

			likes_east_slavics = {
				value = 100

				trigger = {
					any_province = {
						likes_east_slavics = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_east_slavics = no
					}
				}
			}

			likes_egyptians = {
				value = 100

				trigger = {
					any_province = {
						likes_egyptians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_egyptians = no
					}
				}
			}

			likes_finnics = {
				value = 100

				trigger = {
					any_province = {
						likes_finnics = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_finnics = no
					}
				}
			}

			likes_franks = {
				value = 100

				trigger = {
					any_province = {
						likes_franks = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_franks = no
					}
				}
			}

			likes_frisians = {
				value = 100

				trigger = {
					any_province = {
						likes_frisians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_frisians = no
					}
				}
			}

			likes_gallics = {
				value = 100

				trigger = {
					any_province = {
						likes_gallics = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_gallics = no
					}
				}
			}

			likes_germans = {
				value = 100

				trigger = {
					any_province = {
						likes_germans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_germans = no
					}
				}
			}

			likes_goths = {
				value = 100

				trigger = {
					any_province = {
						likes_goths = yes
						is_within_diplo_range = offmap_china
					}
					FROMFROM = {
						likes_goths = no
					}
				}
			}

			likes_greeks = {
				value = 100

				trigger = {
					any_province = {
						likes_greeks = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_greeks = no
					}
				}
			}

			likes_horn_africans = {
				value = 100

				trigger = {
					any_province = {
						likes_horn_africans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_horn_africans = no
					}
				}
			}

			likes_iberians = {
				value = 100

				trigger = {
					any_province = {
						likes_iberians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_iberians = no
					}
				}
			}

			likes_indians = {
				value = 100

				trigger = {
					any_province = {
						culture_group = indo_aryan_group
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						NOT = { culture_group = indo_aryan_group }
					}
				}
			}

			likes_iranians = {
				value = 100

				trigger = {
					any_province = {
						likes_iranians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_iranians = no
					}
				}
			}

			likes_italians = {
				value = 100

				trigger = {
					any_province = {
						likes_italians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_italians = no
					}
				}
			}

			likes_jew_cultures = {
				value = 100

				trigger = {
					any_province = {
						likes_jew_cultures = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_jew_cultures = no
					}
				}
			}

			likes_magyars = {
				value = 100

				trigger = {
					any_province = {
						likes_magyars = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_magyars = no
					}
				}
			}

			likes_mesoamericans = {
				value = 100

				trigger = {
					any_province = {
						likes_mesoamericans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_mesoamericans = no
					}
				}
			}

			likes_mongolians = {
				value = 100

				trigger = {
					any_province = {
						likes_mongolians = yes
						is_within_diplo_range = offmap_china
					}
					FROMFROM = {
						likes_mongolians = no
					}
				}
			}

			likes_nubians = {
				value = 100

				trigger = {
					any_province = {
						likes_nubians = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_nubians = no
					}
				}
			}

			likes_vlachs = {
				value = 100

				trigger = {
					any_province = {
						likes_vlachs = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_vlachs = no
					}
				}
			}

			likes_scandis = {
				value = 100

				trigger = {
					any_province = {
						likes_scandis = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_scandis = no
					}
				}
			}

			likes_south_slavics = {
				value = 100

				trigger = {
					any_province = {
						likes_south_slavics = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_south_slavics = no
					}
				}
			}

			likes_tibetans = {
				value = 100

				trigger = {
					any_province = {
						culture_group = tibetan_group
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						NOT = { culture_group = tibetan_group }
					}
				}
			}

			likes_turks = {
				value = 100

				trigger = {
					any_province = {
						likes_turks = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_turks = no
					}
				}
			}

			likes_vandals = {
				value = 100

				trigger = {
					any_province = {
						likes_vandals = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_vandals = no
					}
				}
			}

			likes_west_africans = {
				value = 100

				trigger = {
					any_province = {
						likes_west_africans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_west_africans = no
					}
				}
			}

			likes_west_slavics = {
				value = 100

				trigger = {
					any_province = {
						likes_west_slavics = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_west_slavics = no
					}
				}
			}

			likes_arabic_pagans = {
				value = 10

				trigger = {
					any_province = {
						likes_arabic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_arabic_pagans = no
					}
				}
			}

			likes_baltic_pagans = {
				value = 10

				trigger = {
					any_province = {
						likes_baltic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_baltic_pagans = yes
					}
				}
			}

			likes_berber_pagan = {
				value = 10

				trigger = {
					any_province = {
						likes_berber_pagan = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_berber_pagan = no
					}
				}
			}

			likes_bon = {
				value = 10

				trigger = {
					any_province = {
						likes_bon = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_bon = yes
					}
				}
			}

			likes_buddhists = {
				value = 100

				trigger = {
					any_province = {
						religion = buddhist
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						NOT = { religion = buddhist }
					}
				}
			}

			likes_celtic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_celtic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_celtic_pagans = no
					}
				}
			}

			likes_druze = {
				value = 100

				trigger = {
					any_province = {
						likes_druze = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_druze = no
					}
				}
			}

			likes_eastern_christianity = {
				value = 100

				trigger = {
					any_province = {
						likes_eastern_christianity = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_eastern_christianity = no
					}
				}
			}

			likes_egyptian_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_egyptian_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_egyptian_pagans = no
					}
				}
			}

			likes_finnic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_finnic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_finnic_pagans = no
					}
				}
			}

			likes_germanic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_germanic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_germanic_pagans = no
					}
				}
			}

			likes_hellenic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_hellenic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_hellenic_pagans = no
					}
				}
			}

			likes_hindus = {
				value = 100

				trigger = {
					any_province = {
						religion = hindu
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						NOT = { religion = hindu }
					}
				}
			}

			likes_islam_kharijite = {
				value = 100

				trigger = {
					any_province = {
						likes_islam_kharijite = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_islam_kharijite = no
					}
				}
			}

			likes_islam_shia = {
				value = 100

				trigger = {
					any_province = {
						likes_islam_shia = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_islam_shia = no
					}
				}
			}

			likes_islam_sunni = {
				value = 100

				trigger = {
					any_province = {
						likes_islam_sunni = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_islam_sunni = no
					}
				}
			}

			likes_jains = {
				value = 25

				trigger = {
					any_province = {
						religion = jain
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						NOT = { religion = jain }
					}
				}
			}

			likes_canaan_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_canaan_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_canaan_pagans = no
					}
				}
			}

			likes_jews = {
				value = 100

				trigger = {
					any_province = {
						religion_group = jewish_group
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						NOT = { religion_group = jewish_group }
					}
				}
			}

			likes_manichaeans = {
				value = 100

				trigger = {
					any_province = {
						likes_manichaeans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_manichaeans = no
					}
				}
			}

			likes_mazdans = {
				value = 100

				trigger = {
					any_province = {
						likes_mazdans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_mazdans = no
					}
				}
			}

			likes_mesoamerican_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_mesoamerican_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_mesoamerican_pagans = no
					}
				}
			}

			likes_slavic_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_slavic_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_slavic_pagans = no
					}
				}
			}

			likes_taoism = {
				value = 100

				trigger = {
					any_province = {
						likes_taoism = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_taoism = no
					}
				}
			}

			likes_tengris = {
				value = 100

				trigger = {
					any_province = {
						likes_tengris = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_tengris = no
					}
				}
			}

			likes_west_african_pagans = {
				value = 100

				trigger = {
					any_province = {
						likes_west_african_pagans = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_west_african_pagans = no
					}
				}
			}

			likes_western_christianity = {
				value = 100

				trigger = {
					any_province = {
						likes_western_christianity = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_western_christianity = no
					}
				}
			}

			likes_yazidi = {
				value = 100

				trigger = {
					any_province = {
						likes_yazidi = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_yazidi = no
					}
				}
			}

			likes_zunists = {
				value = 5

				trigger = {
					any_province = {
						likes_zunists = yes
						is_within_diplo_range = offmap_china
					}

					FROMFROM = {
						likes_zunists = no
					}
				}
			}
		}
	}

	diplomatic_range = { # Already includes the western governor's "normal" diplo range
		trigger_if = {
			limit = {
				has_game_rule = {
					name = chinese_interactions
					value = within_range
				}
			}

			OR = {
				top_liege = {
					suzerain = {
						has_landed_title = e_china_west_governor
					}
				}

				any_neighbor_independent_ruler = {
					OR = {
						has_landed_title = e_china_west_governor

						suzerain = {
							has_landed_title = e_china_west_governor
						}
					}
				}

				any_realm_province = { # Is within reach of the silk road
					OR = {
						region = world_steppe_east
						region = world_himalayas
						region = world_india
						region = world_persia
					}

					held_under_PREV = yes
				}
			}
		}
		trigger_else_if = {
			limit = {
				has_game_rule = {
					name = chinese_interactions
					value = restricted
				}
			}

			OR = {
				top_liege = {
					suzerain = {
						has_landed_title = e_china_west_governor
					}
				}

				any_neighbor_independent_ruler = {
					has_landed_title = e_china_west_governor
				}

				any_realm_province = { # Is within the Chinese region of influence
					OR = {
						region = world_steppe_tarim
						region = world_steppe_east
						region = world_himalayas
						region = world_india
					}

					held_under_PREV = yes
				}
			}
		}
		trigger_else = {
			has_game_rule = {
				name = chinese_interactions
				value = all
			}
		}
	}
}