CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect · All Under Heaven files

assign_completed_exams_based_on_merit_effect

assign_completed_exams_based_on_merit_effect = yes

game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 3142 (142 lines). No parameters.

assign_completed_exams_based_on_merit_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 3142 of its file. It takes no parameters: assign_completed_exams_based_on_merit_effect = yes. The game's script calls it in 4 places, among them on_game_start_after_lobby (on action), minister_courtier_recruitment_effect (scripted effect) and tgp_claim_mandate_of_heaven_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.

The comment above it in the file

Use this effect to set what exams a characters should have passed, based on their merit
Used on game start, but can also be used for generated characters

What it does

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.

The script as written (120 lines of game script)
assign_completed_exams_based_on_merit_effect = {
	# Empire merit ranked vassals have always passed the palace exams
	if = {
		limit = {
			merit >= empire_starting_merit_value
		}
		add_character_flag = passed_child_exam
		add_character_flag = passed_provincial_exam
		add_character_modifier = {
			modifier = tgp_passed_provincial_exam_modifier
		}
		add_character_flag = passed_metropolitan_exam
		add_character_modifier = {
			modifier = tgp_passed_metropolitan_exam_modifier
		}
		add_character_flag = passed_palace_exam
		add_character_modifier = {
			modifier = tgp_passed_palace_exam_modifier
		}
	}
	# Kingdom merit ranked vassals have always passed the metropolitan exams
	else_if = {
		limit = {
			merit >= kingdom_starting_merit_value
		}
		add_character_flag = passed_child_exam
		add_character_flag = passed_provincial_exam
		add_character_modifier = {
			modifier = tgp_passed_provincial_exam_modifier
		}
		add_character_flag = passed_metropolitan_exam
		add_character_modifier = {
			modifier = tgp_passed_metropolitan_exam_modifier
		}
		if = { # The AI has a chance to start with having passed additional exams
			limit = {
				is_ai = yes
			}
			random = {
				chance = 50
				add_character_flag = passed_palace_exam
				add_character_modifier = {
					modifier = tgp_passed_palace_exam_modifier
				}
			}
		}
		change_merit = merit_starting_boost_value
	}
	# Duchy merit ranked vassals have always passed the provincial exams
	else_if = {
		limit = {
			merit >= duchy_starting_merit_value
		}
		add_character_flag = passed_child_exam
		add_character_flag = passed_provincial_exam
		add_character_modifier = {
			modifier = tgp_passed_provincial_exam_modifier
		}
		if = { # The AI has a chance to start with having passed additional exams
			limit = {
				is_ai = yes
			}
			random = {
				chance = 60
				add_character_flag = passed_metropolitan_exam
				add_character_modifier = {
					modifier = tgp_passed_metropolitan_exam_modifier
				}

				random = {
					chance = 30
					add_character_flag = passed_palace_exam
					add_character_modifier = {
						modifier = tgp_passed_palace_exam_modifier
					}
				}
			}
		}
		change_merit = merit_starting_boost_value
	}
	# Everyone else have a chance to having passed the provincial exams
	else = {
		if = { # The AI has a chance to start with having passed the provincial exams
			limit = {
				is_ai = yes
			}
			random_list = {
				10 = {}
				50 = {
					add_character_flag = passed_provincial_exam
					add_character_modifier = {
						modifier = tgp_passed_provincial_exam_modifier
					}
					change_merit = {
						value = county_starting_merit_value
						add = age
						add = learning
					}
				}
				25 = {
					add_character_flag = passed_provincial_exam
					add_character_modifier = {
						modifier = tgp_passed_provincial_exam_modifier
					}
					add_character_flag = passed_metropolitan_exam
					add_character_modifier = {
						modifier = tgp_passed_metropolitan_exam_modifier
					}
					change_merit = {
						value = county_starting_merit_value
						add = age
						add = learning
					}
				}
				15 = {
					add_character_flag = passed_provincial_exam
					add_character_modifier = {
						modifier = tgp_passed_provincial_exam_modifier
					}
					add_character_flag = passed_metropolitan_exam

As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.

The first 120 of its 142 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt from line 3142.

Where it is used

Every place in common/, events/ and history/ that calls assign_completed_exams_based_on_merit_effect.

On actions (the game's own hooks) (1)

  • on_game_start_after_lobby

Scripted character templates (1)

  • pool_repopulate_local_flavor

Source: game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?