Scripted effect
select_poem_subject_gender_effect
select_poem_subject_gender_effect = { SUBJECT = … SUBJECT_TARGET = … }game/common/scripted_effects/00_poetry_effects.txt, line 71 (38 lines). Parameters: $SUBJECT$, $SUBJECT_TARGET$.
select_poem_subject_gender_effect is a scripted effect in Crusader Kings III, written at line 71 of its file. A call passes 2 parameters: SUBJECT and SUBJECT_TARGET. The game's script calls it in 12 places, among them Send Poem (interaction), Write Poetry (court task) and A Familial Reflection (event bp1_yearly.4001). Patch 1.20.1.2, from game/common/scripted_effects/00_poetry_effects.txt.
The comment above it in the file
Subject Used to select subject genders, taking any of the following: flag:specific flag:woman flag:man flag:random SUBJECT_TARGET needs to be filled out regardless to prevent errors, but is inert unless you've also set flag:specific. Just stick it to root or whoever if not actively using it.
What it does
- Otherwise:
Otherwise
- One random dummy gender soldier effect:
SCOPE_NAME = subject
- One random dummy gender soldier effect:
• 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 (38 lines of game script)
select_poem_subject_gender_effect = {
save_temporary_scope_value_as = {
name = subject
value = $SUBJECT$
}
# If we have a $CHARACTER$ designated, select that.
if = {
limit = { scope:subject = flag:specific }
$SUBJECT_TARGET$ = { save_scope_as = subject }
}
# If we have a manually selected gender, grab that.
else_if = {
limit = { scope:subject = flag:woman }
dummy_female = { save_scope_as = subject }
}
else_if = {
limit = { scope:subject = flag:man }
dummy_male = { save_scope_as = subject }
}
# Otherwise, generate a dummy.
else = {
# Is this a romantic poem?
if = {
limit = { exists = scope:poetry_romance_target }
# If so, only target the correct gender for preference.
romance_target_gender_effect = { SCOPE_NAME = subject }
}
# Otherwise, just a random dummy is fine.
else = {
random_dummy_gender_soldier_effect = { SCOPE_NAME = subject }
}
}
# Finally, set this as a variable on root so that custom loc can access it.
set_variable = {
name = poem_subject
value = scope:subject
}
}As written in game/common/scripted_effects/00_poetry_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls select_poem_subject_gender_effect.
Character interactions (1)
Court position tasks (1)
- Write Poetry
Events (10)
- A Familial Reflection
bp1_yearly.4001 - A Knight's Declaration
court.9000 - A Poetic Friendship
bp1_yearly.4020 - Court Jester: A Flatulist and a Gentle…
jester.400 - Evening Reflections
trait_specific.9001 - Learn Language: The Lure of Poetry
learn_language_ongoing.1110
4 more
- Study Rite: The Allure of … Poetry
study_faith_ongoing.1110 - The Poetry of …
emperor_imperial_examination.500 - A Rambunctious Recital
contest_events.5000 - A Virtuous Verse
contest_events.5020
Source: game/common/scripted_effects/00_poetry_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.