Scripted effect · Wards and Wardens files
bp2_university_student_setup
bp2_university_student_setup = yesgame/common/scripted_effects/05_dlc_bp2_effects.txt, line 954 (142 lines). No parameters.
bp2_university_student_setup is a scripted effect in Crusader Kings III, in the Wards and Wardens files, written at line 954 of its file. It takes no parameters: bp2_university_student_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 student
What it does
If
None of these
- scope:activity › Any attending character:
has_character_flag = student_1
- scope:activity › Any attending character:
Then
If
- Any pool character:
province = scope:locationis_available_healthy_ai_adult = yes
Then
- One random pool character:
- Where:
province = scope:location
Otherwise
create_character = { … }
- Any pool character:
scope:student_1:add_to_activity = scope:activity
If
None of these
- scope:activity › Any attending character:
has_character_flag = student_2
- scope:activity › Any attending character:
Then
If
- Any pool character:
province = scope:locationis_available_healthy_ai_adult = yes
Then
- One random pool character:
- Where:
province = scope:location
Otherwise
create_character = { … }
- Any pool character:
scope:student_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_student_setup = {
scope:activity.activity_location = { save_scope_as = location }
if = {
limit = {
NOT = {
scope:activity = {
any_attending_character = {
has_character_flag = student_1
}
}
}
}
if = {
limit = {
any_pool_character = {
province = scope:location
is_available_healthy_ai_adult = yes
NOT = {
exists = involved_activity
}
exists = this
}
}
random_pool_character = {
province = scope:location
limit = {
is_available_healthy_ai_adult = yes
NOT = {
exists = involved_activity
}
}
save_scope_as = student_1
}
}
else = {
create_character = {
template = adult_education_student
dynasty = none
location = scope:location
save_scope_as = student_1
after_creation = {
add_character_flag = created
}
}
scope:student_1 = {
add_character_flag = generated_character_uni
}
}
scope:student_1 = {
if = {
limit = {
has_character_flag = teacher_1
}
remove_character_flag = teacher_1
}
if = {
limit = {
has_character_flag = teacher_2
}
remove_character_flag = teacher_2
}
if = {
limit = {
has_character_flag = student_2
}
remove_character_flag = student_2
}
add_to_activity = scope:activity
add_character_flag = student_1
}
}
if = {
limit = {
NOT = {
scope:activity = {
any_attending_character = {
has_character_flag = student_2
}
}
}
}
if = {
limit = {
any_pool_character = {
province = scope:location
is_available_healthy_ai_adult = yes
NOT = {
exists = involved_activity
}
exists = this
}
}
random_pool_character = {
province = scope:location
limit = {
is_available_healthy_ai_adult = yes
NOT = {
exists = involved_activity
}
}
save_scope_as = student_2
}
}
else = {
create_character = {
template = adult_education_student
dynasty = none
location = scope:location
save_scope_as = student_2
after_creation = {
add_character_flag = created
}
}
scope:student_2 = {
add_character_flag = generated_character_uni
}
}
scope:student_2 = {
if = {As written in game/common/scripted_effects/05_dlc_bp2_effects.txt.
The first 120 of its 142 lines; the rest is in game/common/scripted_effects/05_dlc_bp2_effects.txt from line 954.
Where it is used
Every place in common/, events/ and history/ that calls bp2_university_student_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.