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

imperial_examination_gather_stray_entrants_effect

imperial_examination_gather_stray_entrants_effect = yes

game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt, line 1450 (131 lines). No parameters.

imperial_examination_gather_stray_entrants_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 1450 of its file. It takes no parameters: imperial_examination_gather_stray_entrants_effect = yes. The game's script calls it in 2 places, among them Capital Examination (activity) and Local Examination (activity). Patch 1.20.1.2, from game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt.

What it does

  • If

    • scope:activity:
      • One of these

        • All of these

          • has_activity_option = { category = imperial_examination_breadth option = imperial_examination_breadth_exclusive }
          • Attending character (less than 249):
        • or

          All of these

          • has_activity_option = { category = imperial_examination_breadth option = imperial_examination_breadth_restricted }
          • Attending character (less than 499):
        • or

          All of these

          • has_activity_option = { category = imperial_examination_breadth option = imperial_examination_breadth_open }
          • Attending character (less than 999):

    Then

    • current_travel_plan ?= { … }
    • Every in list:
      • If

        • NOT = { involved_activity ?= scope:activity }
        • location = scope:activity.activity_location
        • can_join_activity = scope:activity

        Then

        • add_to_activity_without_travel = scope:activity
      • If

        • involved_activity ?= scope:activity

        Then

        • scope:activity:
          • add_to_guest_subset = { name = entrants target = prev }

• 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)
imperial_examination_gather_stray_entrants_effect = {
	if = {
		# Before we add anyone to the activity, we have to make sure it is not already full.
		limit = {
			scope:activity = {
				OR = {
					AND = {
						has_activity_option = {
							category = imperial_examination_breadth
							option = imperial_examination_breadth_exclusive
						}
						any_attending_character = {
							count < exclusive_exam_guests_full_calc
						}
					}
					AND = {
						has_activity_option = {
							category = imperial_examination_breadth
							option = imperial_examination_breadth_restricted
						}
						any_attending_character = {
							count < restricted_exam_guests_full_calc
						}
					}
					AND = {
						has_activity_option = {
							category = imperial_examination_breadth
							option = imperial_examination_breadth_open
						}
						any_attending_character = {
							count < open_exam_guests_full_calc
						}
					}
				}			
			}
		}
		every_courtier = {
			limit = {
				involved_activity ?= scope:activity
				this != root
				trigger_if = {
					limit = {
						scope:activity = {
							has_activity_type = activity_imperial_examination
						}
					}
					NOT = { has_character_flag = passed_palace_exam}
				}
				trigger_else = {
					has_none_of_variables = {
						name = passed_provincial_exam
						name = passed_metropolitan_exam
					}
				}
				# To make sure no characters appear that shouldn't.
				NOR = {
					has_trait = devoted
					has_trait = eunuch
				}
				tgp_gender_can_be_exam_entrant_trigger = yes
			}
			add_to_list = entourage_entrants
		}
		current_travel_plan ?= {
			every_entourage_character = {
				limit = {
					this != root
					is_landed = no
					trigger_if = {
						limit = {
							scope:activity = {
								has_activity_type = activity_imperial_examination
							}
						}
						NOT = { has_character_flag = passed_palace_exam }
					}
					trigger_else = {
						has_none_of_variables = {
							name = passed_provincial_exam
							name = passed_metropolitan_exam
						}
					}
					# To make sure no characters appear that shouldn't.
					NOR = {
						has_trait = devoted
						has_trait = eunuch
					}
					trigger_if = {
						limit = {
							exists = primary_title
						}
						primary_title = {
							is_mercenary_company = no
							is_holy_order = no
						}
					}
					tgp_gender_can_be_exam_entrant_trigger = yes
				}
				add_to_list = entourage_entrants
			}
		}
		every_in_list = {
			list = entourage_entrants
			if = {
				limit = {
					NOT = {
						involved_activity ?= scope:activity
					}
					location = scope:activity.activity_location
					can_join_activity = scope:activity
				}
				add_to_activity_without_travel = scope:activity
			}
			if = {
				limit = {
					involved_activity ?= scope:activity
				}
				scope:activity = {
					add_to_guest_subset = {
						name = entrants

As written in game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt.

The first 120 of its 131 lines; the rest is in game/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt from line 1450.

Where it is used

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

Source: game/common/scripted_effects/tgp_imperial_examination_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?