Scripted effect · Wards and Wardens files
bp2_university_teacher_setup
bp2_university_teacher_setup = yesgame/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
If
- scope:activity: No attending character:
Then
If
- Any pool character:
province = scope:locationis_available_healthy_ai_adult = yeshas_variable = { name = teacher_1 name = teacher_2 }
Then
- One random pool character:
- Where:
is_available_healthy_ai_adult = yeshas_variable = { name = teacher_1 name = teacher_2 }
province = scope:location
- Where:
Else if
- Any pool character:
province = scope:locationis_available_adult_education_teacher = yes
Then
- One random pool character:
- Where:
province = scope:location
Otherwise
create_character = { … }
- Any pool character:
scope:teacher_1:add_to_activity = scope:activity
If
- scope:activity: No attending character:
Then
If
- Any pool character:
province = scope:locationis_available_healthy_ai_adult = yeshas_variable = { name = teacher_1 name = teacher_2 }
Then
- One random pool character:
- Where:
is_available_healthy_ai_adult = yeshas_variable = { name = teacher_1 name = teacher_2 }
province = scope:location
- Where:
Else if
- Any pool character:
province = scope:locationis_available_adult_education_teacher = yes
Then
- One random pool character:
- Where:
province = scope:location
Otherwise
create_character = { … }
- Any pool character:
scope:teacher_2:add_to_activity = scope:activity
• 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_1As 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.