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

Scripted trigger

artifact_can_be_gift_to_trigger

artifact_can_be_gift_to_trigger = { RECIPIENT = … }

game/common/scripted_triggers/00_artifact_triggers.txt, line 83 (61 lines). Parameters: $RECIPIENT$.

artifact_can_be_gift_to_trigger is a scripted trigger in Crusader Kings III, written at line 83 of its file. A call passes 1 parameter: RECIPIENT. The game's script calls it in 26 places, among them Gift Artifact (interaction), Make a Request (interaction) and wedding_gift (activity pulse). Patch 1.20.1.2, from game/common/scripted_triggers/00_artifact_triggers.txt.

What it checks

  • artifact_can_be_gift_base_trigger = yes
  • If

    • NOT = { $RECIPIENT$ = { has_artifact_claim = prev } }

    Then

    • If has “banner dynasty” (a variable the game's script sets):
      • $RECIPIENT$.dynasty ?= var:banner_dynasty
      • artifact_owner = { … }
    • If has “banner house” (a variable the game's script sets):
      • $RECIPIENT$.house ?= var:banner_house
      • artifact_owner = { … }
    • If

      • is_holy_relic_for = artifact_owner.faith

      Then

      • $RECIPIENT$.faith = artifact_owner.faith
    • If has “relic religion” (a variable the game's script sets):
      • One of these

        • artifact_owner.religion != var:relic_religion
        • or

          $RECIPIENT$.religion = var:relic_religion
    • If

      • var:artifact_succession_title: Title already created

      Then

      • One of these

        • var:artifact_succession_title.holder = $RECIPIENT$
        • or

          var:artifact_succession_title.holder != artifact_owner

• 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 (61 lines of game script)
artifact_can_be_gift_to_trigger = {
	artifact_can_be_gift_base_trigger = yes
	trigger_if = {
		limit = {
			NOT = { $RECIPIENT$ = { has_artifact_claim = prev } }
		}
		trigger_if = {
			limit = {
				has_variable = banner_dynasty
			}
			$RECIPIENT$.dynasty ?= var:banner_dynasty
			artifact_owner = {
				# it make no sense giving your own banner to other member if you are dynast
				NAND = {
					var:banner_dynasty.dynast ?= this
					has_royal_court = yes
				}
			}
		}
		trigger_if = {
			limit = {
				has_variable = banner_house
			}
			$RECIPIENT$.house ?= var:banner_house
			artifact_owner = {
				# it make no sense giving your own banner to other member if you are dynast
				NAND = {
					var:banner_house.house_head ?= this
					has_royal_court = yes
				}
			}
		}
		trigger_if = {
			limit = {
				is_holy_relic_for = artifact_owner.faith
			}
			# Only gift holy relics to people of own faith
			$RECIPIENT$.faith = artifact_owner.faith
		}
		trigger_if = {
			limit = {
				has_variable = relic_religion
			}
			# make no sense gifting relic to heathen, but sending heathen stuff to others are acceptable
			OR = {
				artifact_owner.religion != var:relic_religion
				$RECIPIENT$.religion = var:relic_religion
			}
		}
		trigger_if = {
			limit = {
				var:artifact_succession_title ?= { is_title_created = yes }
			}
			# either its title destroyed, or recipient is rightfully owner, or you are not the title's holder
			OR = {
				var:artifact_succession_title.holder = $RECIPIENT$
				var:artifact_succession_title.holder != artifact_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 artifact_can_be_gift_to_trigger.

Character interactions (2)

Activity pulse actions (1)

  • wedding_gift

Events (20)

14 more

Scripted triggers inside an event file (3)

  • ach_coronation_0016_eligible_artifact
  • tgp_movement_events_0140_valid_artifact
  • tour_grounds_has_artifacts_trigger

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?