Scripted effect
rightfully_imprison_character_effect
rightfully_imprison_character_effect = { IMPRISONER = … TARGET = … }game/common/scripted_effects/00_prison_effects.txt, line 2019 (183 lines). Parameters: $IMPRISONER$, $TARGET$.
rightfully_imprison_character_effect is a scripted effect in Crusader Kings III, written at line 2019 of its file. A call passes 2 parameters: IMPRISONER and TARGET. The game's script calls it in 103 places, among them Ceremonial Claimant Faction (casus belli), Restore Ceremonial Monarch (casus belli) and … Guile (event bp1_yearly.8131). Its body carries 4 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_prison_effects.txt.
The comment above it in the file
Exactly the same as imprison_character_effect, except it never adds tyranny USE THIS SPARINGLY. READ ME: It is usually better to set an opinion with an imprisonment reason for "custom situations". For cases where there is a "standard imprisonment reason", such as for murder, but that imprisonment reason set before this script has to be executed, double-check that the imprisonment you're doing is actually rightful.
What it does
If
scope:new_target:One of these
is_playable_character = yesor
is_close_or_extended_family_of = liegeor
is_spouse_of = liege
Then
scope:imprisoner:imprison = { target = scope:new_target type = house_arrest }scope:new_target:If
- Any close or extended family member:
NOT = { is_close_family_of = scope:imprisoner }NOT = { scope:imprisoner = this }
Then
- … Family members who are not Close Family of … lose 15 Opinion of …
- Any close or extended family member:
Otherwise
scope:imprisoner:imprison = { target = scope:new_target type = dungeon }scope:new_target:If
- Any close or extended family member:
NOT = { is_close_family_of = scope:imprisoner }NOT = { scope:imprisoner = this }
Then
- … Family members who are not Close Family of … lose 30 Opinion of …
- Any close or extended family member:
scope:imprisoner:scope:new_target:imprison_hostage_tooltip_effect = { WHO = scope:new_target }scope:imprisoner:If
- Any scheme:
is_scheme_target_type = characterscheme_target_character = scope:new_target
Then
- Every scheme:
- Where:
is_scheme_target_type = characterscheme_target_character = scope:new_target
end_scheme = yes
- Where:
- Any scheme:
scope:imprisoner:If
has_relation_lover = scope:new_targetNOT = { has_relation_rival = scope:new_target }
Then
- scope:new_target: Event lover.0101 (after 14–30 days)
imprison_remove_ward_guardian_effect = { IMPRISONER = scope:imprisoner PRISONER = scope:new_target }
• 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)
rightfully_imprison_character_effect = {
$TARGET$ = { save_scope_as = new_target }
$IMPRISONER$ = { save_scope_as = imprisoner }
if = {
limit = {
scope:new_target = {
exists = liege
OR = {
is_playable_character = yes
is_close_or_extended_family_of = liege
is_spouse_of = liege
}
}
}
scope:imprisoner = {
imprison = {
target = scope:new_target
type = house_arrest
}
scope:new_target = {
if = {
limit = {
any_close_or_extended_family_member = {
NOR = {
is_close_family_of = scope:imprisoner
scope:imprisoner = this
}
}
}
hidden_effect = {
every_close_or_extended_family_member = {
limit = {
NOR = {
is_close_family_of = scope:imprisoner
scope:imprisoner = this
}
}
add_opinion = {
target = scope:imprisoner
modifier = imprisoned_family_member
opinion = -15
}
}
}
custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_HOUSE_ARREST
}
}
}
}
else = {
scope:imprisoner = {
imprison = {
target = scope:new_target
type = dungeon
}
scope:new_target = {
if = {
limit = {
any_close_or_extended_family_member = {
NOR = {
is_close_family_of = scope:imprisoner
scope:imprisoner = this
}
}
}
hidden_effect = {
every_close_or_extended_family_member = {
limit = {
NOR = {
is_close_family_of = scope:imprisoner
scope:imprisoner = this
}
}
add_opinion = {
target = scope:imprisoner
modifier = imprisoned_family_member
opinion = -15
}
}
}
custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_DUNGEON
}
}
}
}
scope:imprisoner = {
if = {
limit = { exists = scope:disable_display_rightful_imprisonment_tooltip }
# No tooltip if we do this.
}
else_if = {
limit = {
exists = scope:recipient
has_imprisonment_reason = scope:new_target
}
custom_tooltip = IS_ALLOWED_TO_IMPRISON_DESC
}
else = { custom_tooltip = IS_ALLOWED_TO_IMPRISON_NO_RECIPIENT_DESC }
}
scope:new_target = {
if = {
limit = {
has_opinion_modifier = {
modifier = imprisoned_me_past
target = scope:imprisoner
}
}
hidden_effect = {
remove_opinion = {
target = scope:imprisoner
modifier = imprisoned_me
}
}
}As written in game/common/scripted_effects/00_prison_effects.txt.
The first 120 of its 183 lines; the rest is in game/common/scripted_effects/00_prison_effects.txt from line 2019.
Where it is used
Every place in common/, events/ and history/ that calls rightfully_imprison_character_effect.
Casus belli (2)
Events (87)
- … Guile
bp1_yearly.8131 - … Ultimatum
bp1_yearly.8180 - ...Comes Around
travel_events.2035 - 'Haunted' Manor: Safe and Sound
travel_events.2022 - A Common Cause
feast_default_laurence.102 - A Deviant on the Loose
yearly.8400
81 more
- A Disgrace to the Gods
fp1_jomsvikings.0041 - A Dissonant Voice
coronation_events.1033 - A Grave Opportunity
court_yearly.0103 - A Gruesome Morning
travel_events_oltner_2.1230 - A Heretic at …
pam_secular_faith_events.0017 - A Master Thief
pilgrimage.6850 - A Roughing Up
tour_grounds_events.3050 - A Scheme at …
hostile_scheme_discovery.1001 - A Secret Exposed!
secrets.0108 - A Shadow in the Night
hold_court.6190 - A Sick Leave
bp2_yearly.7000 - A Special Dharma Talk
devaraja.0003 - A Spectacular Courtier
court.0108 - A Study In …
bp1_yearly.2050 - Accusations of Witchery
epidemic_events.5007 - Accused of Violating Sumptuary Law!
court_amenities_interactions.0004 - Agent Discovered!
hostile_scheme_discovery.3001 - All Hail The …
bp1_yearly.2023 - An End?
travel_events.2036 - Another Lover
bp1_yearly.9009 - Artifactual Liability
feast_default.6301 - Attempted Atonement
fp1_yearly.0691 - Awakening
travel_events.2029 - Catching a Break
travel_events.2040 - Challenge Met: House …
fp3_misc_decisions.0042 - Compromising Letters
bp2_yearly.8051 - Court Jester: Masterful Juggling
jester.300 - Court of Vipers
ep1_flavor.2010 - court_yearly.1020
- Crimes of Passion
ep3_laamp_flavour_ewan.2091 - Crimes of Passion: Taking Action
harm.1071 - Danger: A Bad Crossing
travel_events.3140 - Disloyal Subjects
tour_grounds_events.3040 - Double Trouble
bp1_yearly.9013 - Dying Embers
travel_events_fp3.0010 - ep3_emperor_yearly.8010
- False Conversion
fp2_yearly.9001 - Find Secrets — Known Criminal
scheme_critical_moments.8071 - Fishy Business
fp1_yearly.0551 - fp2_struggle.2014
- From Nowhere
hunt.7801 - Great Expectations
bp1_yearly.2020 - In Line!
cultural_festival.2090 - Inspiration: Golden Dreams
fund_inspiration.8011 - Inspiration: In Mourning
fund_inspiration.8016 - Inspiration: Sabotage
fund_inspiration.2041 - Learn Language: Infantile Fables
learn_language_ongoing.1123 - Love on the Steppe
mpo_migration_travel_events.0050 - Lowlife at Court
court_yearly.0101 - Mare's Milk
travel_events_fp3.0040 - Miraculous Healing
governor_contract_event.2060 - Misdeeds of the …
fp2_struggle.2008 - Murders At Court: Caught Red-Handed
murders_at_court.9004 - Murders At Court: The Mistake
murders_at_court.9099 - Not Quite Alone
hunt.1081 - Out of Turn
tour_grounds_events.1007 - Pie-based Shenanigans
court.9400 - Prophet in the Halls
court.6010 - Provisional Catastrophe
bp1_yearly.7058 - Raunchy Runestone
fp1_yearly.2500 - Rivals' End
travel_events_oltner_2.1220 - Secrets and Lies
court.8180 - secrets.0123
- Study Rite: Heretical Tales
study_faith_ongoing.1123 - Temple: Sacrilegious Spree
ep2_locale_events.1510 - The Greater Good
ep1_flavor.2060 - The Last Day
yearly.7005 - The Macabre Scarecrow of …
travel_events.4029 - The Naked Truth
pam_secular_faith_events.0041 - The Outspoken Rebel
fp3_story_cycle_zanj_rebellion_events.0002 - The Two …s
bp1_yearly.9010 - Thieves: the Confrontation
travel_events.2301 - Tip the Host
travel_events.2026 - Tomb Raiders
travel_events_fp3.0050 - Two Ships In The Night
bp1_yearly.2010 - Unfinished Business: In the Red
ep2_wedding_ewan.0053 - Weird Whispers
travel_events.3150 - Where All the World Gazes
bp2_yearly.6070 - … …: … and …
contest_events.0810 - …: … Hood
contest_events.1553 - …: As … Made …
contest_events.3030
Scripted effects inside an event file (9)
- bp1_yearly_2020_duel_effect
- court_8170_torture_etc_setup_effect
- diarch_coup_attempt_end_diarchy_effect
- diarch_coup_attempt_imprison_usurper_effect
- diarchy_9021_liege_successful_effect
- ep1_flavor_2010_imprison_effect
3 more
- fp1_0111_correct_accusation_effect
- hold_court_8160_imprison_effect
- travel_danger_events_6010_imprison_effect
History files (the start of the game) (2)
- 226000 (characters)
- 85013 (characters)
Source: game/common/scripted_effects/00_prison_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.