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

fp2_contract_assistance_invalidated_effect

fp2_contract_assistance_invalidated_effect = yes

game/common/scripted_effects/03_dlc_fp2_scripted_effects.txt, line 1365 (43 lines). No parameters.

fp2_contract_assistance_invalidated_effect is a scripted effect in Crusader Kings III, in the The Fate of Iberia files, written at line 1365 of its file. It takes no parameters: fp2_contract_assistance_invalidated_effect = yes. The game's script calls it in 1 place, among them on_war_invalidated (on action). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/03_dlc_fp2_scripted_effects.txt.

What it does

  • If

    • Any war participant:
      • Has “owed contract assistance war” (a variable the game's script sets)
      • Owed contract assistance war is scope:war

    Then

    • Every war participant:
      • Where:
        • Has “owed contract assistance war” (a variable the game's script sets)
        • Owed contract assistance war is scope:war
      • scope:contract_assistance_hirer: You did not pay … for Military Assistance, because the war was invalidated
      • scope:contract_assistance_helper: You were not paid by … for Military Assistance, because the war was invalidated

• 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 (43 lines of game script)
fp2_contract_assistance_invalidated_effect = {
	if = {
		limit = {
			any_war_participant = {
				has_variable = owed_contract_assistance_war
				var:owed_contract_assistance_war = scope:war
			}
		}
		every_war_participant = {
			limit = {
				has_variable = owed_contract_assistance_war
				var:owed_contract_assistance_war = scope:war
			}
			remove_variable = owed_contract_assistance_war
			remove_variable = owed_contract_assistance_contribution
			remove_variable = owed_contract_assistance_gold
			save_scope_as = contract_assistance_helper
			if = {
				limit = { is_attacker_in_war = scope:war }
				scope:war.primary_attacker = { save_scope_as = contract_assistance_hirer }
			}
			else = {
				scope:war.primary_defender = { save_scope_as = contract_assistance_hirer }
			}
			scope:contract_assistance_hirer = {
				send_interface_message = {
					type = event_gold_neutral
					title = contract_assistance_war_msg_title
					left_icon = scope:contract_assistance_helper
					custom_tooltip = contract_assistance_war_msg_hirer_invalidated_desc
				}
			}
			scope:contract_assistance_helper = {
				send_interface_message = {
					type = event_gold_neutral
					title = contract_assistance_war_msg_title					
					left_icon = scope:contract_assistance_hirer
					custom_tooltip = contract_assistance_war_msg_helper_invalidated_desc
				}
			}
		}
	}
}

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 fp2_contract_assistance_invalidated_effect.

On actions (the game's own hooks) (1)

  • on_war_invalidated

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?