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

Scripted trigger

sword_could_be_longsword_trigger

sword_could_be_longsword_trigger = yes

game/common/scripted_triggers/00_artifact_triggers.txt, line 2367 (19 lines). No parameters.

sword_could_be_longsword_trigger is a scripted trigger in Crusader Kings III, written at line 2367 of its file. It takes no parameters: sword_could_be_longsword_trigger = yes (or no). The game's script calls it in 1 place, among them create_artifact_weapon_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_triggers/00_artifact_triggers.txt.

What it checks

  • If a check the game hides passes: the same again (2 lines)
    • scope:artifact.creator.culture:
      • has_unit_gfx = western_unit_gfx
      • has_cultural_era_or_later = culture_era_late_medieval
    Else if a check the game hides passes: the same again (2 lines)
    • Their culture:
      • has_unit_gfx = western_unit_gfx
      • has_cultural_era_or_later = culture_era_late_medieval

    Otherwise

    • Never

• 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 (19 lines of game script)
sword_could_be_longsword_trigger = {
	trigger_if = {
		limit = { exists = scope:artifact.creator.culture }
		scope:artifact.creator.culture = {
			has_unit_gfx = western_unit_gfx
			has_cultural_era_or_later = culture_era_late_medieval
		}
	}
	trigger_else_if = { #If the creator is not found we use the owner. Often this would be if the creator is a dummy, which has no culture
		limit = { exists = culture }
		culture = {
			has_unit_gfx = western_unit_gfx
			has_cultural_era_or_later = culture_era_late_medieval
		}
	}
	trigger_else = {
		always = no #We should never get here as all created artifacts should have an owner.
	}
}

As written in game/common/scripted_triggers/00_artifact_triggers.txt.

Where it is used

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

Scripted effects (1)

Source: game/common/scripted_triggers/00_artifact_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?