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

Scripted effect

modify_all_participants_fame_values

modify_all_participants_fame_values = { FAME_BASE = … IS_RELIGIOUS_WAR = … LOSER = … LOSER_ALLY_FAME_SCALE = … LOSER_FAME_SCALE = … WINNER = … WINNER_ALLY_FAME_SCALE = … WINNER_FAME_SCALE = … }

game/common/scripted_effects/00_casus_belli_effects.txt, line 35 (127 lines). Parameters: $FAME_BASE$, $IS_RELIGIOUS_WAR$, $LOSER$, $LOSER_ALLY_FAME_SCALE$, $LOSER_FAME_SCALE$, $WINNER$, $WINNER_ALLY_FAME_SCALE$, $WINNER_FAME_SCALE$.

modify_all_participants_fame_values is a scripted effect in Crusader Kings III, written at line 35 of its file. A call passes 8 parameters: FAME_BASE, IS_RELIGIOUS_WAR, LOSER, LOSER_ALLY_FAME_SCALE, LOSER_FAME_SCALE, WINNER, WINNER_ALLY_FAME_SCALE and WINNER_FAME_SCALE. The game's script calls it in 20 places, among them … China's Grand Campaign (casus belli), …… Ancestral Claim on … (casus belli) and Azariqa Rebellion (casus belli). Patch 1.20.1.2, from game/common/scripted_effects/00_casus_belli_effects.txt.

What it does

  • If

    • $WINNER$ = scope:attacker

    Then

    • If

      • $IS_RELIGIOUS_WAR$ = yes

      Then

      • scope:attacker:
        • add_piety_experience = { value = $FAME_BASE$ multiply = $WINNER_FAME_SCALE$ max = @maximum_piety_winner }

      Otherwise

      • scope:attacker:
        • add_prestige_experience = { value = $FAME_BASE$ multiply = $WINNER_FAME_SCALE$ max = @maximum_prestige_winner }

    Otherwise

    • If

      • $IS_RELIGIOUS_WAR$ = yes

      Then

      • scope:defender:
        • add_piety = { value = $FAME_BASE$ multiply = $WINNER_FAME_SCALE$ max = @maximum_piety_winner }

      Otherwise

      • scope:defender:
        • add_prestige = { value = $FAME_BASE$ multiply = $WINNER_FAME_SCALE$ max = @maximum_prestige_winner }
  • If

    • $WINNER$ = scope:attacker

    Then

    • scope:attacker › If government allows: merit:
      • change_merit = { value = $FAME_BASE$ multiply = $WINNER_FAME_SCALE$ max = @maximum_merit_winner }

    Otherwise

    • scope:defender › If government allows: merit:
      • change_merit = { value = $FAME_BASE$ multiply = $WINNER_FAME_SCALE$ max = @maximum_merit_winner }
  • modify_allies_of_participants_fame_values = { … }
  • If

    • $IS_RELIGIOUS_WAR$ = yes

    Then

    • $LOSER$ = { … }

    Otherwise

    • $LOSER$ = { … }

• 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 (120 lines of game script)
modify_all_participants_fame_values = {

	# Give the winner the appropriate type & amount of 'fame' (prestige or piety).
	if = {
		# If the attacker is the winner, we only award fame *experience* instead of actual fame currency.
		limit = {
			$WINNER$ = scope:attacker
		}
		if = {
			# Piety level progress for winning offensive religious wars.
			limit = {
				$IS_RELIGIOUS_WAR$ = yes
			}
			scope:attacker = {
				add_piety_experience = {
					value = $FAME_BASE$
					multiply = $WINNER_FAME_SCALE$
					max = @maximum_piety_winner
				}
			}
		}
		else = {
			# Prestige level progress for winning all other offensive wars.
			scope:attacker = {
				add_prestige_experience = {
					value = $FAME_BASE$
					multiply = $WINNER_FAME_SCALE$
					max = @maximum_prestige_winner
				}
			}
		}		
	}
	else = {
		# If the defender is the winner, they get actual fame currency as a reward.
		if = {
			# Gain piety for winning defensive religious wars.
			limit = {
				$IS_RELIGIOUS_WAR$ = yes
			}
			scope:defender = {
				add_piety = {
					value = $FAME_BASE$
					multiply = $WINNER_FAME_SCALE$
					max = @maximum_piety_winner
				}
			}
		}
		else = {
			# Gain prestige for winning all other defensive wars.
			scope:defender = {
				add_prestige = {
					value = $FAME_BASE$
					multiply = $WINNER_FAME_SCALE$
					max = @maximum_prestige_winner
				}
			}
		}
	}
	if = {
		# Award Merit to the victorious attacker
		limit = {
			$WINNER$ = scope:attacker
		}
		scope:attacker = {
			if = {
				limit = {
					government_allows = merit
				}
				change_merit = {
					value = $FAME_BASE$
					multiply = $WINNER_FAME_SCALE$
					max = @maximum_merit_winner
				}
			}
		}
	}
	else = {
		# Award Merit to the victorious defender
		scope:defender = {
			if = {
				limit = {
					government_allows = merit
				}
				change_merit = {
					value = $FAME_BASE$
					multiply = $WINNER_FAME_SCALE$
					max = @maximum_merit_winner
				}
			}
		}
	}

	# Award the appropriate type & amount of 'fame' to the allies of both primary participants.
	modify_allies_of_participants_fame_values = {
		WINNER = $WINNER$
		IS_RELIGIOUS_WAR = $IS_RELIGIOUS_WAR$
		FAME_BASE = $FAME_BASE$
		WINNER_ALLY_FAME_SCALE = $WINNER_ALLY_FAME_SCALE$
		LOSER_ALLY_FAME_SCALE = $LOSER_ALLY_FAME_SCALE$
	}

	# Take the appropriate type & amount of 'fame' away from the loser of the war.
	if = {
		# Religious wars cost Piety for the loser.
		limit = {
			$IS_RELIGIOUS_WAR$ = yes
		}

		$LOSER$ = {
			add_piety = {
				value = $FAME_BASE$
				multiply = $LOSER_FAME_SCALE$
				min = @minimum_piety_loser
			}
		}
	}
	else = {
		# All other war types cost  Prestige from the loser.
		$LOSER$ = {
			add_prestige = {

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

The first 120 of its 127 lines; the rest is in game/common/scripted_effects/00_casus_belli_effects.txt from line 35.

Where it is used

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

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