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

Scripted effect · Silk and Silver files

gg_involvement_cb_participant_effect

gg_involvement_cb_participant_effect = { ATTACKER = … DEFENDER = … WAR_OUTCOME = … }

game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt, line 1554 (69 lines). Parameters: $ATTACKER$, $DEFENDER$, $WAR_OUTCOME$.

gg_involvement_cb_participant_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 1554 of its file. A call passes 3 parameters: ATTACKER, DEFENDER and WAR_OUTCOME. The game's script calls it in 1 place, among them gg_involvement_cb_effect (scripted effect). Its body carries 1 text of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt.

What it does

  • If

    • scope:attacker:
      • is_$ATTACKER$_trigger = yes
    • scope:defender:
      • is_$DEFENDER$_trigger = yes

    Then

    • scope:war › Every war participant:
      • Where:
        • is_$ATTACKER$_trigger = yes
        • is_attacker_in_war = scope:war
      • If

        • Has “gg involvement” (a variable the game's script sets)
        • scope:participant_actual_involvement_gain > gg_involvement_base_value

        Then

        • … gains participant actual involvement gain Involvement

• 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 (69 lines of game script)
gg_involvement_cb_participant_effect = {
	$WAR_OUTCOME$ = { save_scope_as = gg_outcome }
	if = {
		limit = {
			scope:attacker = { is_$ATTACKER$_trigger = yes }
			scope:defender = { is_$DEFENDER$_trigger = yes }
		}
		scope:war ?= {
			every_war_participant = {
				limit = {
					is_$ATTACKER$_trigger = yes
					is_attacker_in_war = scope:war
					NOT = { this = scope:attacker }
				}
				save_scope_as = participant_temp
				save_scope_value_as = {
					name = participant_war_contribution_value
					value = {
						value = "scope:war.war_contribution(scope:participant_temp)"
						divide = 1000
						round = yes
					}
				}
				save_scope_value_as = {
					name = participant_actual_involvement_gain
					value = {
						add = {
							value = gg_involvement_base_addition_value
							multiply = scope:participant_war_contribution_value
							if = {
								limit = { gg_phase_gives_half_involvement_trigger = yes }
								multiply = 0.5
							}
							if = {
								limit = { gg_phase_gives_double_involvement_trigger = yes }
								multiply = 2
							}
							round = yes
							if = {
								limit = { scope:gg_outcome = flag:victory }
								max = gg_involvement_cb_participant_value
							}
							else_if = {
								limit = { scope:gg_outcome = flag:white_peace }
								max = gg_involvement_cb_failure_value
							}
							else = {
								max = {
									value = gg_involvement_cb_failure_value
									divide = 2
								}
							}
						}
					}
				}
				if = {
					limit = { 
						has_variable = gg_involvement
						scope:participant_actual_involvement_gain > gg_involvement_base_value
					}
					custom_tooltip = {
						text = gg_involvement_cb_participant_actual_tt
						gg_add_involvement_effect = { AMOUNT = scope:participant_actual_involvement_gain }
					}
				}
			}
		}
	}
}

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

Where it is used

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

Scripted effects (1)

Source: game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.

Spotted a mistake on this page, or have an idea for the site?