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

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:

    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

    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

  • scope:imprisoner:
    • Else, if all of these hold:
      • Conditions:
        • has_imprisonment_reason = scope:new_target
      • Then: … … a known Criminal (…), allowing … to imprison … without being viewed as a Tyrant
    • Otherwise: As … … a fair reason, no one will think … a Tyrant
  • scope:new_target:
  • imprison_hostage_tooltip_effect = { WHO = scope:new_target }
  • scope:imprisoner:
    • If

      • Any scheme:
        • is_scheme_target_type = character
        • scheme_target_character = scope:new_target

      Then

      • Every scheme:
        • Where:
          • is_scheme_target_type = character
          • scheme_target_character = scope:new_target
        • end_scheme = yes
  • scope:imprisoner:
    • If

      • has_relation_lover = scope:new_target
      • NOT = { 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.

Events (87)

81 more

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.

Spotted a mistake on this page?