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

Interaction · Imprisonment actions

Ransom

No costThe AI weighs it

Ransom the other character's release for a payment of Gold or a Favor

What you need

You

  • If

    • The option “invalid” is chosen

    Then

    • Never
  • The other character:
    • If

      • Has “imprisoned by diarch” (a variable the game's script sets)
      • scope:secondary_recipient.var:imprisoned_by_diarch:
        • is_diarch_of_target = scope:secondary_recipient.liege

      Then

      • Cannot take any action that would release former Regent whilst current Regent is in office
  • … is currently being purged

The other character

  • Is imprisoned by you

Ransom is an imprisonment character interaction in Crusader Kings III. The AI weighs it. Reasons the AI weighs include Clergy acting towards a secular Ruler (+20), Unimportant Courtier (-10), They wants Freedom (+100) and 5 more. Patch 1.20.1.2, from game/common/character_interactions/00_prison_interactions.txt.

for a guide, post or blog
Quick answers (1)
How do I get the AI to accept Ransom?
The AI weighs it. Its reasons: Clergy acting towards a secular Ruler +20, Relative Level of Devotion, Greed, Generous, Unimportant Courtier -10, They wants Freedom +100, The other character is dear to the recipient +25, The other character is dear to the recipient +200, The other character is the recipient's Rival -200, The other character is the recipient's Nemesis -500, They is of the other character's Dynasty +10, Intimidated by you and Terrified of you.

Will they accept?

The AI adds these up and accepts above zero. Reasons in italics are the script's, with no label in the game.

ReasonAmount
Base0
Clergy acting towards a secular Ruler
when
+20
Relative Level of Devotion
when
  • Your Personal Tenets unlock tenet celestial hierarchy interaction acceptance
  • Your faith is the same as that of recipient
varies
Greed
when
  • scope:recipient.ai_greed >= medium_positive_ai_value
  • One of these

    • The option “gold” is chosen
    • or

      The option “current gold” is chosen
    • or

      The option “extortionate gold” is chosen
    • or

      The option “extortionate current gold” is chosen
    • or

      The option “herd send option” is chosen
    • or

      The option “current herd” is chosen
  • The target is not the other character
varies
Generous
when
  • One of these

    • The option “gold” is chosen
    • or

      The option “current gold” is chosen
    • or

      The option “extortionate gold” is chosen
    • or

      The option “extortionate current gold” is chosen
    • or

      The option “herd send option” is chosen
    • or

      The option “current herd” is chosen
  • The target is not the other character
  • scope:recipient.ai_greed <= medium_negative_ai_value
varies
Unimportant Courtier
when
  • The target is not the other character
  • The character you target:
    • Is not the other character’s spouse
    • Is not family of the other character
    • Does not have the other character as lover
    • Does not have the other character as friend
    • NOT = { has_secret_relation_lover = scope:secondary_recipient }
    • Does not have the other character as soulmate
    • Does not have the other character as best friend
    • Is not a parent of the other character
-10
They wants Freedom
when
  • The target is the other character
+100
The other character is dear to the recipient
when
  • The target is not the other character
  • The character you target:
    • One of these

      • Is the other character’s spouse
      • or

        Is family of the other character
      • or

        Has the other character as lover
      • or

        Has the other character as friend
      • or

        has_secret_relation_lover = scope:secondary_recipient
    • Does not have the other character as soulmate
    • Does not have the other character as best friend
    • Is not a parent of the other character
+25
The other character is dear to the recipient
when
  • The character you target:
    • One of these

      • Has the other character as soulmate
      • or

        Has the other character as best friend
      • or

        Is a parent of the other character
    • None of these

      • Is the other character’s spouse
      • All of these

        • Is not a parent of the other character
        • Is family of the other character
      • Has the other character as lover
      • Has the other character as friend
      • has_secret_relation_lover = scope:secondary_recipient
+200
The other character is the recipient's Rival
when
  • The character you target: Has the other character as rival
-200
The other character is the recipient's Nemesis
when
  • The character you target: Has the other character as nemesis
-500
They is of the other character's Dynasty
when
  • The target’s dynasty is the other character’s
  • The character you target:
    • Is not the other character’s spouse
    • Is not family of the other character
    • Does not have the other character as lover
    • Does not have the other character as soulmate
    • NOT = { has_secret_relation_lover = scope:secondary_recipient }
    • Does not have the other character as rival
    • Does not have the other character as nemesis
+10
Intimidated by you
when
  • The character you target:
    • Is a vassal (or below) of you
    • has_dread_level_towards = { target = scope:puppet_or_actor level = 1 }
intimidated_reason_value
Terrified of you
when
  • The character you target:
    • Is a vassal (or below) of you
    • has_dread_level_towards = { target = scope:puppet_or_actor level = 2 }
cowed_reason_value
Acceptance (ai_accept) (180 lines of game script)
base = 0
celestial_hierarchy_acceptance_modifier = {
	ACTOR = scope:puppet_or_actor
	RECIPIENT = scope:recipient
}
modifier = {
	add = {
		value = scope:recipient.ai_greed
		multiply = -0.5
		if = {
			limit = {
				OR = {
					scope:herd_send_option = yes
					scope:current_herd = yes
				}
			}
			multiply = 0.5
		}
	}
	scope:recipient.ai_greed >= medium_positive_ai_value
	OR = {
		scope:gold = yes
		scope:current_gold = yes
		scope:extortionate_gold = yes
		scope:extortionate_current_gold = yes
		scope:herd_send_option = yes
		scope:current_herd = yes
	}
	scope:recipient != scope:secondary_recipient
	desc = AI_VALUE_MODIFIER_GREED
}
modifier = {
	add = {
		value = scope:recipient.ai_greed
		multiply = -0.10
		if = {
			limit = {
				OR = {
					scope:herd_send_option = yes
					scope:current_herd = yes
				}
			}
			multiply = 0.5
		}
	}
	OR = {
		scope:gold = yes
		scope:current_gold = yes
		scope:extortionate_gold = yes
		scope:extortionate_current_gold = yes
		scope:herd_send_option = yes
		scope:current_herd = yes
	}
	scope:recipient != scope:secondary_recipient
	scope:recipient.ai_greed <= medium_negative_ai_value
	desc = AI_VALUE_MODIFIER_GENEROUS
}
modifier = {
	add = -10
	scope:recipient != scope:secondary_recipient
	scope:recipient = {
		NOR = {
			is_spouse_of = scope:secondary_recipient
			is_close_or_extended_family_of = scope:secondary_recipient
			has_relation_lover = scope:secondary_recipient
			has_relation_friend = scope:secondary_recipient
			has_secret_relation_lover = scope:secondary_recipient
			has_relation_soulmate = scope:secondary_recipient
			has_relation_best_friend = scope:secondary_recipient
			is_parent_of = scope:secondary_recipient
		}
	}
	desc = UNIMPORTANT_CHAR_REASON
}
modifier = {
	add = 100
	scope:recipient = scope:secondary_recipient
	desc = WANTS_FREEDOM_REASON
}
modifier = {
	add = 25
	scope:recipient != scope:secondary_recipient
	scope:recipient = {
		OR = {
			is_spouse_of = scope:secondary_recipient
			is_close_or_extended_family_of = scope:secondary_recipient
			has_relation_lover = scope:secondary_recipient
			has_relation_friend = scope:secondary_recipient
			has_secret_relation_lover = scope:secondary_recipient
		}
		NOR = {
			has_relation_soulmate = scope:secondary_recipient
			has_relation_best_friend = scope:secondary_recipient
			is_parent_of = scope:secondary_recipient
		}
	}
	desc = DEAR_TO_ME_REASON
}
modifier = {
	add = 200
	scope:recipient = {
		OR = {
			has_relation_soulmate = scope:secondary_recipient
			has_relation_best_friend = scope:secondary_recipient
			is_parent_of = scope:secondary_recipient
		}
		NOR = {
			is_spouse_of = scope:secondary_recipient
			AND = {
				NOT = {
					is_parent_of = scope:secondary_recipient
				}
				is_close_or_extended_family_of = scope:secondary_recipient
			}
			has_relation_lover = scope:secondary_recipient
			has_relation_friend = scope:secondary_recipient
			has_secret_relation_lover = scope:secondary_recipient
		}
	}
	desc = DEAR_TO_ME_REASON
}
modifier = {
	add = -200
	scope:recipient = {
		has_relation_rival = scope:secondary_recipient
	}
	desc = RIVAL_TO_ME_REASON
}
modifier = {
	add = -500
	scope:recipient = {
		has_relation_nemesis = scope:secondary_recipient
	}
	desc = NEMESIS_TO_ME_REASON
}
modifier = {
	add = 10
	scope:recipient = {
		NOR = {
			this = scope:secondary_recipient
			is_spouse_of = scope:secondary_recipient
			is_close_or_extended_family_of = scope:secondary_recipient
			has_relation_lover = scope:secondary_recipient
			has_relation_soulmate = scope:secondary_recipient
			has_secret_relation_lover = scope:secondary_recipient
		}
		NOR = {
			has_relation_rival = scope:secondary_recipient
			has_relation_nemesis = scope:secondary_recipient
		}
	}
	scope:recipient.dynasty = scope:secondary_recipient.dynasty
	desc = MY_DYNASTY_REASON
}
modifier = {
	add = intimidated_reason_value
	trigger = {
		scope:recipient = {
			target_is_liege_or_above = scope:puppet_or_actor
			has_dread_level_towards = {
				target = scope:puppet_or_actor
				level = 1
			}
		}
	}
	desc = INTIMIDATED_REASON
}
modifier = {
	add = cowed_reason_value
	trigger = {
		scope:recipient = {
			target_is_liege_or_above = scope:puppet_or_actor
			has_dread_level_towards = {
				target = scope:puppet_or_actor
				level = 2
			}
		}
	}
	desc = COWED_REASON
}

As written in game/common/character_interactions/00_prison_interactions.txt.

What happens

If they accept

  • If

    • The character you target: Has the Modifier: Allowed to go Outside

    Then

    • The character you target: Loses “Allowed to go Outside”
  • If

    • The character you target: Has the Modifier: Diet of Moldy Gruel

    Then

    • The character you target: Loses “Diet of Moldy Gruel”
  • If

    • The other character: Is imprisoned by you

    Then

    • The character you target:
      • If

        • Employs a Man-Haggler
        • One of these

          • The option “extortionate gold” is chosen
          • or

            The option “extortionate current gold” is chosen
          • or

            The option “gold” is chosen
          • or

            The option “current gold” is chosen

        Then

        • … Man-Haggler Aptitude: new ransom value
    • You:
      • If

        • Employs a Man-Haggler
        • One of these

          • The option “extortionate gold” is chosen
          • or

            The option “extortionate current gold” is chosen
          • or

            The option “gold” is chosen
          • or

            The option “current gold” is chosen

        Then

        • The character you target: … Man-Haggler Aptitude: +…
      • If

        • The portrait first is not the prisoner

        Then

        • The prisoner:
          • If

            a check the game hides

            Then

            • If

              • The payer: Is played by a person
              • The prisoner: Is played by the AI

              Then

              • Opinion: Ransomed Recently for 1 year
              • If

                • Is played by the AI
                • Ai honor at least 25
                • Ai greed at most 0

                Then

                • The payer:
                  • If

                    • can_add_hook = { target = scope:prisoner type = favor_hook }

                    Then

                    • Gain a Indebted on the prisoner

                Otherwise

                • The payer:
                  • progress_towards_hook_effect = { CHARACTER = scope:prisoner HOOK_TYPE = indebted_hook }
        • The payer:
          • Depending on always:
            • When always is scope:extortionate gold:
              • Pay gold to the imprisoner
              • The imprisoner:
                • Gain … Prestige
                • mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:prisoner.increased_ransom_cost_value }
            • When always is scope:extortionate current gold:
              • Pay gold to the imprisoner
              • The imprisoner:
                • Gain … Prestige
                • mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:ransom_saved_gold_value }
            • When always is scope:gold:
              • Pay gold to the imprisoner
              • The imprisoner:
                • mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:prisoner.normal_ransom_cost_value }
            • When always is scope:current gold:
              • Pay gold to the imprisoner
              • The imprisoner:
                • mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:ransom_saved_gold_value }
          • If

            • The option “favor” is chosen

            Then

            • If

              • The payer is the prisoner

              Then

              • Opinion: Demanded a Hook
            • The imprisoner: Gain a Favor on the payer
          • If

            • The option “influence send option” is chosen

            Then

            • The payer:
              • change_influence = { … }
            • The imprisoner: Influence changes
          • If

            • The option “herd send option” is chosen

            Then

            • The payer:
              • pay_herd = { target = scope:imprisoner value = scope:prisoner.ransom_herd_value }

            Else if

            • The option “current herd” is chosen

            Then

            • The payer:
              • pay_herd = { target = scope:imprisoner value = domicile.herd }
        • The payer:
          • If

            • The Personal Tenets unlock tenet philanthropia ransom captives
            • Philanthropia ransom gold more than 0

            Then

            • Gain … Piety
            • Spiritual fulfillment changes
        • The prisoner:
          • release_from_prison = yes

        Otherwise

        • The prisoner:
          • If

            a check the game hides

            Then

            • If

              • The payer: Is played by a person
              • The prisoner: … (more in the script below)
        • … (more in the script below)
      • … (more in the script below)

If they refuse

Options when sending

  • For a Hook
  • Demand Influence
  • Invalid

Events it fires: char_interaction.0131

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

Who can use it and sees it (is_available, is_shown) (4 lines of game script)
is_shown = scope:secondary_recipient ?= {
	is_imprisoned_by = scope:puppet_or_actor
}
scope:puppet_or_actor != scope:recipient

As written in game/common/character_interactions/00_prison_interactions.txt.

Can be sent when (is_valid…) (26 lines of game script)
trigger_if = {
	limit = {
		scope:invalid = yes
	}
	always = no
}
scope:secondary_recipient = {
	custom_description = {
		text = currently_being_tortured
		NOT = {
			has_character_flag = is_being_tortured
		}
	}
}
cannot_release_former_regent_whilst_old_regent_holds_power_trigger = {
	PRISONER = scope:secondary_recipient
	REGENT = scope:secondary_recipient.var:imprisoned_by_diarch
}
custom_tooltip = {
	text = is_currently_being_purged_tt
	scope:secondary_recipient = {
		NOT = {
			has_character_flag = is_currently_being_purged
		}
	}
}

As written in game/common/character_interactions/00_prison_interactions.txt.

Effects (on_send, on_accept, on_decline) (150 lines of game script)
on_accept = if = {
	limit = {
		scope:recipient = {
			has_character_modifier = allowed_to_go_outside
		}
	}
	scope:recipient = {
		remove_character_modifier = allowed_to_go_outside
	}
}
if = {
	limit = {
		scope:recipient = {
			has_character_modifier = moldy_gruel_diet
		}
	}
	scope:recipient = {
		remove_character_modifier = moldy_gruel_diet
	}
}
if = {
	limit = {
		scope:secondary_recipient = {
			is_imprisoned_by = scope:puppet_or_actor
		}
	}
	scope:secondary_recipient = {
		save_scope_as = prisoner
	}
	scope:recipient = {
		save_scope_as = payer
		if = {
			limit = {
				employs_court_position = person_haggler_camp_officer
				is_asking_for_gold_in_ransom_trigger = yes
			}
			random_court_position_holder = {
				type = person_haggler_camp_officer
				save_scope_as = haggler
			}
			scope:prisoner = {
				save_scope_value_as = {
					name = new_ransom_value
					value = haggler_ransom_cost_modifier
				}
			}
			custom_tooltip = has_person_haggler_decrease_ransom_cost
		}
		if = {
			limit = {
				OR = {
					exists = scope:current_gold
					exists = scope:extortionate_current_gold
				}
			}
			save_scope_value_as = {
				name = ransom_saved_gold_value
				value = scope:payer.current_gold_value
			}
		}
	}
	scope:puppet_or_actor = {
		save_scope_as = imprisoner
		if = {
			limit = {
				employs_court_position = person_haggler_camp_officer
				is_asking_for_gold_in_ransom_trigger = yes
			}
			random_court_position_holder = {
				type = person_haggler_camp_officer
				save_scope_as = haggler
			}
			scope:recipient = {
				scope:prisoner = {
					save_scope_value_as = {
						name = new_ransom_value
						value = haggler_ransom_cost_modifier
					}
				}
				custom_tooltip = has_person_haggler_increase_ransom_cost
			}
		}
		scope:recipient = {
			save_scope_as = portrait_first
		}
		if = {
			limit = {
				scope:portrait_first != scope:prisoner
			}
			scope:prisoner = {
				save_scope_as = portrait_second
			}
			send_interface_message = {
				type = interaction_prison_ransom
				title = msg_ransom_prisoner
				right_icon = scope:portrait_first
				left_icon = scope:portrait_second
				ransom_interaction_effect = yes
			}
		}
		else = {
			send_interface_message = {
				type = interaction_prison_ransom
				title = msg_ransom_prisoner
				right_icon = scope:portrait_first
				ransom_interaction_effect = yes
			}
		}
		if = {
			limit = {
				any_character_struggle = {
					involvement = involved
					activate_struggle_catalyst_secondary_character_involvement_involved_trigger = {
						CATALYST = catalyst_ransom_important
						CHAR = scope:secondary_recipient
					}
				}
			}
			every_character_struggle = {
				involvement = involved
				limit = {
					activate_struggle_catalyst_secondary_character_involvement_involved_trigger = {
						CATALYST = catalyst_ransom_important
						CHAR = scope:secondary_recipient
					}
				}
				activate_struggle_catalyst = {
					catalyst = catalyst_ransom_important
					character = scope:puppet_or_actor
				}
			}
		}
	}
}
on_decline = if = {
	limit = {
		scope:recipient = {
			is_ai = no
		}
	}
	scope:secondary_recipient = {
		add_character_flag = {
			flag = character_ransom_refused_by_player
			years = 10
		}
	}
}
scope:puppet_or_actor = {
	trigger_event = char_interaction.0131
}

As written in game/common/character_interactions/00_prison_interactions.txt.

Category
Imprisonment actions
In the menu
under More…
ID
ransom_interaction

Source: game/common/character_interactions/00_prison_interactions.txt and the English localisation, Crusader Kings III 1.20.1.2. “You” is the character who sends it (scope:actor, or a puppet acting for you); “the character you target” is the recipient.

Spotted a mistake on this page?