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

Scripted effect

imprison_character_effect

imprison_character_effect = { IMPRISONER = … TARGET = … }

game/common/scripted_effects/00_prison_effects.txt, line 1644 (165 lines). Parameters: $IMPRISONER$, $TARGET$.

imprison_character_effect is a scripted effect in Crusader Kings III, written at line 1644 of its file. A call passes 2 parameters: IMPRISONER and TARGET. The game's script calls it in 62 places, among them Imprison (interaction), Negotiate Release (interaction) and Azariqa Rebellion (casus belli). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_prison_effects.txt.

What it does

  • scope:imprisonment_target:
  • imprison_hostage_tooltip_effect = { WHO = scope:imprisonment_target }
  • If

    • scope:imprisoner: Is not a landless ruler
    • scope:imprisonment_target:

    Then

    • scope:imprisoner:
      • imprison = { target = scope:imprisonment_target type = house_arrest }
      • scope:imprisonment_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:imprisonment_target type = dungeon }
      • scope:imprisonment_target:
        • If

          • Any close or extended family member:
            • NOT = { is_close_family_of = scope:imprisoner }
            • NOT = { scope:imprisoner = this }

          Then

  • scope:imprisoner:
  • scope:imprisoner:
    • If

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

      Then

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

      • has_relation_lover = scope:imprisonment_target
      • NOT = { has_relation_rival = scope:imprisonment_target }

      Then

      • scope:imprisonment_target: Event lover.0101 (after 14–30 days)
  • imprison_remove_ward_guardian_effect = { IMPRISONER = scope:imprisoner PRISONER = scope:imprisonment_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)
imprison_character_effect = {
	$TARGET$ = { save_scope_as = imprisonment_target }
	$IMPRISONER$ = { save_scope_as = imprisoner }
	
	scope:imprisonment_target = {
		if = {
			limit = {
				has_opinion_modifier = {
					modifier = imprisoned_me_past
					target = scope:imprisoner
				}
			}
			hidden_effect = {
				remove_opinion = {
					target = scope:imprisoner
					modifier = imprisoned_me
				}
			}
		}
		#Close family get closer to rivalling you
		if = {
			limit = {
				is_close_family_of = $IMPRISONER$
				NOR = {
					has_trait = forgiving
					has_trait = craven
				}
			}
			progress_towards_rival_effect = {
				CHARACTER = scope:imprisoner
				REASON = rival_imprisoned_family
				OPINION = 0
			}
		}
		add_opinion = {
			target = scope:imprisoner
			modifier = imprisoned_me
		}
	}

	imprison_hostage_tooltip_effect = { WHO = scope:imprisonment_target }

	if = {
		limit = {
			scope:imprisoner = { is_landless_ruler = no }
			scope:imprisonment_target = {
				exists = liege
				OR = {
					is_playable_character = yes
					is_close_or_extended_family_of = liege
					is_spouse_of = liege
				}
			}
		}
		
		scope:imprisoner = {
			imprison = {
				target = scope:imprisonment_target
				type = house_arrest
			}
			scope:imprisonment_target = {
				if = {
					limit = {
						any_close_or_extended_family_member = {
							NOR = {
								is_close_family_of = scope:imprisoner
								scope:imprisoner = this
							}
						}
					}
					custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_HOUSE_ARREST
					hidden_effect = {
						every_close_or_extended_family_member = {
							limit = {
								NOR = {
									is_close_family_of = scope:imprisoner
									scope:imprisoner = this
								}
							}
							add_opinion = {
								modifier = imprisoned_family_member
								target = scope:imprisoner
							}
						}
					}
				}
			}
		}
	}
		
	else = {
		scope:imprisoner = {
			imprison = {
				target = scope:imprisonment_target
				type = dungeon
			}
			scope:imprisonment_target = {
				if = {
					limit = {
						any_close_or_extended_family_member = {
							NOR = {
								is_close_family_of = scope:imprisoner
								scope:imprisoner = this
							}
						}
					}
					custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_DUNGEON
					hidden_effect = {
						every_close_or_extended_family_member = {
							limit = {
								scope:imprisoner != this
							}
							add_opinion = {
								modifier = imprisoned_family_member_dungeon
								target = scope:imprisoner
							}
						}
					}
				}
			}

As written in game/common/scripted_effects/00_prison_effects.txt.

The first 120 of its 165 lines; the rest is in game/common/scripted_effects/00_prison_effects.txt from line 1644.

Where it is used

Every place in common/, events/ and history/ that calls imprison_character_effect.

Character interactions (2)

Events (52)

46 more

Scripted effects inside an event file (2)

  • infidelity_confrontation_demand_break_up_failure_effect
  • yearly_1010_imprison_target_effect

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?