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

Scripted effect · The Fate of Iberia files

purchase_truce_interaction_work_out_purchase_cost_effect

purchase_truce_interaction_work_out_purchase_cost_effect = yes

game/common/scripted_effects/03_dlc_fp2_scripted_effects.txt, line 1059 (75 lines). No parameters.

purchase_truce_interaction_work_out_purchase_cost_effect is a scripted effect in Crusader Kings III, in the The Fate of Iberia files, written at line 1059 of its file. It takes no parameters: purchase_truce_interaction_work_out_purchase_cost_effect = yes. The game's script calls it in 1 place, among them Purchase Truce (interaction). Patch 1.20.1.2, from game/common/scripted_effects/03_dlc_fp2_scripted_effects.txt.

What it does

  • scope:puppet_or_actor:
    • If the Personal Tenets unlock tenet peace of god personal truce:
      • If never:
        • add_piety = { value = pt_sum_small_value multiply = -1 }
        • scope:recipient: Gain … Piety
      • Else, if never:
        • add_piety = { value = pt_sum_large_value multiply = -1 }
        • scope:recipient: Gain … Piety
      • Otherwise:
        • add_piety = { value = pt_sum_medium_value multiply = -1 }
        • scope:recipient: Gain … Piety
    • Otherwise:
      • If never:
        • pay_short_term_gold = { … }
      • Else, if never:
        • pay_short_term_gold = { … }
      • Otherwise:
        • pay_short_term_gold = { … }

• 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 (75 lines of game script)
purchase_truce_interaction_work_out_purchase_cost_effect = {
	scope:puppet_or_actor = {
		if = {
			limit = {
				has_personal_tenet_flag = tenet_peace_of_god_personal_truce
			}
			# Small cost.
			if = {
				limit = { always = scope:pt_sum_small }
				add_piety = {
					value = pt_sum_small_value
					multiply = -1
				}
				scope:recipient = {
					add_piety = scope:puppet_or_actor.pt_sum_small_value
				}
			}
			# Large cost.
			else_if = {
				limit = { always = scope:pt_sum_large }
				add_piety = {
					value = pt_sum_large_value
					multiply = -1
				}
				scope:recipient = {
					add_piety = scope:puppet_or_actor.pt_sum_large_value
				}
			}
			# Medium cost; we do this last as a fallback.
			else = {
				add_piety = {
					value = pt_sum_medium_value
					multiply = -1
				}
				scope:recipient = {
					add_piety = scope:puppet_or_actor.pt_sum_medium_value
				}
			}
		}
		else = {
			# Small cost.
			if = {
				limit = { always = scope:pt_sum_small }
				pay_short_term_gold = {
					target = scope:recipient
					gold = {
						value = 0
						add = pt_sum_small_value
					}
				}
			}
			# Large cost.
			else_if = {
				limit = { always = scope:pt_sum_large }
				pay_short_term_gold = {
					target = scope:recipient
					gold = {
						value = 0
						add = pt_sum_large_value
					}
				}
			}
			# Medium cost; we do this last as a fallback.
			else = {
				pay_short_term_gold = {
					target = scope:recipient
					gold = {
						value = 0
						add = pt_sum_medium_value
					}
				}
			}
		}
	}
}

As written in game/common/scripted_effects/03_dlc_fp2_scripted_effects.txt.

Where it is used

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

Character interactions (1)

Source: game/common/scripted_effects/03_dlc_fp2_scripted_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?