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

Scripted effect

allies_progress_towards_friendship_effect

allies_progress_towards_friendship_effect = yes

game/common/scripted_effects/00_war_effects.txt, line 2670 (64 lines). No parameters.

allies_progress_towards_friendship_effect is a scripted effect in Crusader Kings III, written at line 2670 of its file. It takes no parameters: allies_progress_towards_friendship_effect = yes. The game's script calls it in 3 places, among them on_war_white_peace (on action), on_war_won_attacker (on action) and on_war_won_defender (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.

What it does

  • scope:war › Every war participant:
    • Where:
      • is_target_in_variable_list = { name = joined_as_ally target = scope:war }
      • scope:war:
        • war_contribution = { target = scope:ally_temp value > 0 }
    • If

      • scope:actor: Is played by the AI

      Then

• 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 (64 lines of game script)
allies_progress_towards_friendship_effect = {
	scope:war = {
		every_war_participant = {
			limit = {
				is_target_in_variable_list = {
					name = joined_as_ally
					target = scope:war
				}
				save_temporary_scope_as = ally_temp
				scope:war = {
					war_contribution = {
						target = scope:ally_temp
						value > 0
					}	
				}
			}
			if = {
				limit = { is_defender_in_war = scope:war }
				scope:defender = { save_scope_as = actor }
			}
			else = {
				scope:attacker = { save_scope_as = actor }
			}
			save_scope_as = ally
			if = { # if war leader is AI, directly increase friendship
				limit = {
					scope:actor = { is_ai = yes } 
				}
				scope:actor = {
					progress_towards_friend_effect = {
						CHARACTER = scope:ally
						OPINION = 0
						REASON = friend_alliance
					}
				}
			}
			else = { # otherwise create potential  friendship
				hidden_effect = { #To nudge friendship
					scope:actor = {
						if = {
							limit = {
								NOR = {
									has_relation_friend = scope:ally
									has_relation_potential_friend = scope:ally
								}
								scope:war = {
									war_contribution = {
										target = scope:ally
										value > 0
									}
								}
							}
							set_relation_potential_friend = scope:ally
						}
					}
				}
			}
			remove_list_variable = {
				name = joined_as_ally
				target = scope:war
			}
		}
	}
}

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

Where it is used

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

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

  • on_war_white_peace
  • on_war_won_attacker
  • on_war_won_defender

Source: game/common/scripted_effects/00_war_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?