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 = yesIf
NOT = { $RECIPIENT$ = { has_artifact_claim = prev } }
Then
- If has “banner dynasty” (a variable the game's script sets):
$RECIPIENT$.dynasty ?= var:banner_dynastyartifact_owner = { … }
- If has “banner house” (a variable the game's script sets):
$RECIPIENT$.house ?= var:banner_houseartifact_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_religionor
$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)
- A Capital Artifact
cultural_festival.2060 - A Gift Fit for a …
host_dinner_events.3120 - A Gift Worthy of a …
ach_coronation.0016 - A Night to Remember
ep2_wedding.3030 - A Visit to The Count's Arms
tour_travel.3120 - Exile: For the Love of the …
cid.1030
14 more
- fp2_struggle.2014
- Gift Exchange
cultural_festival.4300 - Gift Exchange
cultural_festival.4302 - Gift Preparation
feast_tsagaan_sar_events.0004 - Greasing Mouths
legend_spread_events.5320 - Heirloom Offering
emperor_imperial_examination.300 - Lay of the Land
ep3_laamps.5035 - Negotiate Joining Wars
ep3_interactions_events.0111 - Noble Privileges
hold_court.8180 - Steal Artifact: The Antiquarian
steal_back_artifact_ongoing.1001 - Underequipped
court.8010 - What You Don't See...
tour_grounds_events.7000 - Worth More than Gold?
fp3_clan.1000 - Young Love
bp2_yearly.5007
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.