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

Scripted trigger · Roads to Power files

laamp_as_mercenary_payout_trigger

laamp_as_mercenary_payout_trigger = { WAR = … }

game/common/scripted_triggers/07_ep3_triggers.txt, line 1858 (26 lines). Parameters: $WAR$.

laamp_as_mercenary_payout_trigger is a scripted trigger in Crusader Kings III, in the Roads to Power files, written at line 1858 of its file. A call passes 1 parameter: WAR. The game's script calls it in 2 places, among them laamp_as_mercenary_payout_effect (scripted effect) and laamp_as_mercenary_payout_tooltip_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_triggers/07_ep3_triggers.txt.

What it checks

  • $WAR$ = { save_temporary_scope_as = war_temp }
  • scope:merc_temp:
    • var:joined_as_mercenary:
      • is_leader_in_war = scope:war_temp
      • If

        • is_attacker_in_war = scope:war_temp

        Then

        • scope:merc_temp:
          • is_attacker_in_war = scope:war_temp

        Otherwise

        • scope:merc_temp:
          • is_defender_in_war = scope:war_temp
    • NOT = { is_leader_in_war = scope:war_temp }
    • One of these

      • Armies are raised
      • or

        scope:war_temp:
        • war_contribution = { target = scope:merc_temp value > 0 }

• 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 (26 lines of game script)
laamp_as_mercenary_payout_trigger = {
	save_temporary_scope_as = merc_temp
	$WAR$ = { save_temporary_scope_as = war_temp }
	scope:merc_temp ?= {
		var:joined_as_mercenary ?= {
			is_leader_in_war = scope:war_temp
			trigger_if = {
				limit = { is_attacker_in_war = scope:war_temp }
				scope:merc_temp = { is_attacker_in_war = scope:war_temp }
			}
			trigger_else = {
				scope:merc_temp = { is_defender_in_war = scope:war_temp }
			}
		}
		NOT = { is_leader_in_war = scope:war_temp }
		OR = {
			has_raised_armies = yes
			scope:war_temp = {
				war_contribution = {
					target = scope:merc_temp
					value > 0
				}
			}
		}
	}
}

As written in game/common/scripted_triggers/07_ep3_triggers.txt.

Where it is used

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

Source: game/common/scripted_triggers/07_ep3_triggers.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?