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

Scripted effect · Friends and Foes files

set_war_memory_casus_belli_effect

set_war_memory_casus_belli_effect = yes

game/common/scripted_effects/03_bp1_scripted_effects.txt, line 666 (367 lines). No parameters.

set_war_memory_casus_belli_effect is a scripted effect in Crusader Kings III, in the Friends and Foes files, written at line 666 of its file. It takes no parameters: set_war_memory_casus_belli_effect = yes. The game's script calls it in 2 places, among them on_join_war_as_secondary (on action) and on_war_started (on action). Patch 1.20.1.2, from game/common/scripted_effects/03_bp1_scripted_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (120 lines of game script)
set_war_memory_casus_belli_effect = {
	save_scope_as = memory
	scope:war = {
		casus_belli = {
			if = {
				limit = {
					any_target_title = { }
				}
				ordered_target_title = {
					order_by = tier
					save_scope_as = war_target
				}
				scope:memory = {
					set_variable = { name = war_title value = scope:war_target }
				}
			}
			if = {
				limit = { exists = claimant }
				claimant = { save_scope_as = war_claimant }
				scope:memory = {
					set_variable = { name = war_claimant value = scope:war_claimant }
				}
			}
		}
		scope:memory = {
			set_variable = {
				name = war_attacker
				value = scope:war.primary_attacker
			}
		}
		if = { # claim
			limit = {
				OR = {
					using_cb = claim_cb
					using_cb = claimant_faction_war
				}
			}
			scope:memory = {
				set_variable = { name = war_cb value = flag:war_memory_cb_claim }
			}
		}	
		else_if = { # conquest
			limit = {
				OR = {
					using_cb = county_conquest_cb
					using_cb = duchy_conquest_cb
					using_cb = county_struggle_cb
					using_cb = fp2_mediterranean_conquest_cb
					using_cb = nomadic_conquest_cb
					using_cb = nomadic_conquest_duchy_cb
					using_cb = domination_cb
					using_cb = de_jure_cb_nomadic
					using_cb = japan_install_bloc_member_cb
					using_cb = japan_soryo_conquest_county_landless_cb
					using_cb = japan_soryo_conquest_county_cb
				}
			}
			scope:memory = {
				set_variable = { name = war_cb value = flag:war_memory_cb_conquest }
			}
		}
		else_if = { # holy
			limit = {
				OR = {
					using_cb = minor_religious_war
					using_cb = religious_war
					using_cb = major_religious_war
				}
			}
			scope:memory = {
				set_variable = { name = war_cb value = flag:war_memory_cb_holy_war }
				set_variable = { name = war_faith value = scope:war.primary_defender.faith }
				set_variable = { name = war_faith_attacker value = scope:war.primary_attacker.faith }
			}
		}
		else_if = { # de jure
			limit = {
				OR = {
					using_cb = de_jure_cb
					using_cb = individual_county_de_jure_cb
					using_cb = individual_duchy_de_jure_cb
					using_cb = japan_imperial_reconquest_cb
				}
			}
			scope:memory = {
				set_variable = { name = war_cb value = flag:war_memory_cb_de_jure }
				scope:war_target = {
					ordered_this_title_or_de_jure_above = {
						limit = { holder.top_liege = scope:war.primary_attacker }
						order_by = tier
						save_scope_as = war_liege
					}
				}
				if = {
					limit = { exists = scope:war_liege }
					set_variable = { name = war_liege value = scope:war_liege }
				}
			}
		}
		else_if = { # invasion
			limit = {
				OR = {
					using_cb = mpo_nomad_invasion_cb
					using_cb = invasion_war
					using_cb = clan_invasion_war
					using_cb = mongol_invasion_war
					using_cb = mongol_realm_invasion_war
					using_cb = ep3_laamp_adventurer_county_invasion
					using_cb = ep3_laamp_adventurer_duchy_invasion
					using_cb = ep3_laamp_adventurer_kingdom_invasion
					using_cb = ep3_laamp_adventurer_empire_invasion
					using_cb = mpo_gok_onslaught_cb
					using_cb = japan_imperial_expansion_cb
				}
			}
			scope:memory = {
				set_variable = { name = war_cb value = flag:war_memory_cb_invasion }
			}
		}
		else_if = { # ghw

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

The first 120 of its 367 lines; the rest is in game/common/scripted_effects/03_bp1_scripted_effects.txt from line 666.

Where it is used

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

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

  • on_join_war_as_secondary
  • on_war_started

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