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

Scripted effect · Wards and Wardens files

bp2_university_teacher_setup

bp2_university_teacher_setup = yes

game/common/scripted_effects/05_dlc_bp2_effects.txt, line 769 (183 lines). No parameters.

bp2_university_teacher_setup is a scripted effect in Crusader Kings III, in the Wards and Wardens files, written at line 769 of its file. It takes no parameters: bp2_university_teacher_setup = yes. The game's script calls it in 1 place, among them University Visit (activity). Patch 1.20.1.2, from game/common/scripted_effects/05_dlc_bp2_effects.txt.

The comment above it in the file

Set up a University Teacher

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)
bp2_university_teacher_setup = {
	scope:activity.activity_location = { save_scope_as = location }
	if = {
		limit = {
			scope:activity = {
				NOT = {
					any_attending_character = {
						has_character_flag = teacher_1
					}
				}
			}
		}
		if = {
			limit = {
				any_pool_character = {
					province = scope:location
					is_available_healthy_ai_adult = yes
					has_variable = {
						name = teacher_1
						name = teacher_2
					}
				}
			}
			random_pool_character = {
				province = scope:location
				limit = {
					is_available_healthy_ai_adult = yes
					has_variable = {
						name = teacher_1
						name = teacher_2
					}
				}
				save_scope_as = teacher_1
			}
		}
		else_if = {
			limit = {
				any_pool_character = {
					province = scope:location
					is_available_adult_education_teacher = yes
				}
			}
			random_pool_character = {
				province = scope:location
				limit = {
					is_available_adult_education_teacher = yes
				}
				save_scope_as = teacher_1
			}
		}
		else = {
			create_character = {
				template = adult_education_teacher
				dynasty = none
				location = scope:location
				save_scope_as = teacher_1
				after_creation = {
					add_character_flag = created
				}
			}
		}
		scope:teacher_1 = {
			if = {
				limit = {
					has_character_flag = teacher_2
				}
				remove_character_flag = teacher_2
			}
			if = {
				limit = {
					has_character_flag = student_1
				}
				remove_character_flag = student_1
			}
			if = {
				limit = {
					has_character_flag = student_2
				}
				remove_character_flag = student_2
			}
			add_to_activity = scope:activity
			add_character_flag = teacher_1
		}
	}
	if = {
		limit = {
			scope:activity = {
				NOT = {
					any_attending_character = {
						has_character_flag = teacher_2
					}
				}
			}
		}
		if = {
			limit = {
				any_pool_character = {
					province = scope:location
					is_available_healthy_ai_adult = yes
					has_variable = {
						name = teacher_1
						name = teacher_2
					}
					trigger_if = {
						limit = { exists = scope:teacher_1 }
						this != scope:teacher_1
					}
				}
			}
			random_pool_character = {
				province = scope:location
				limit = {
					is_available_healthy_ai_adult = yes
					has_variable = {
						name = teacher_1
						name = teacher_2
					}
					trigger_if = {
						limit = { exists = scope:teacher_1 }
						this != scope:teacher_1

As written in game/common/scripted_effects/05_dlc_bp2_effects.txt.

The first 120 of its 183 lines; the rest is in game/common/scripted_effects/05_dlc_bp2_effects.txt from line 769.

Where it is used

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

Activities (1)

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