Scripted effect · The Royal Court files
inspiration_adventure_create_artifact_effect
inspiration_adventure_create_artifact_effect = { CREATOR = … OWNER = … }game/common/scripted_effects/00_ep1_inspiration_effects.txt, line 942 (2567 lines). Parameters: $CREATOR$, $OWNER$.
inspiration_adventure_create_artifact_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 942 of its file. A call passes 2 parameters: CREATOR and OWNER. The game's script calls it in 3 places, among them Contract: Treasure Hunt (event ep3_contract_event.0006), Contract: Treasure Hunt (event ep3_contract_event.0007) and Inspiration Realized (event fund_inspiration.1051). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_inspiration_effects.txt.
What it does
If
a check the game hides
Then
set_adventure_location_effect = { BASE_SCOPE = scope:adventurer NO_DESTINATION = no }get_adventure_inspiration_start_location = { ADVENTURER = scope:adventurer }
• 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)
inspiration_adventure_create_artifact_effect = {
$OWNER$ = { save_scope_as = owner } #Will always exist!
$CREATOR$ = { save_scope_as = adventurer } #Will always exist in an adventure inspiration!
#If you've somehow managed to not set a destination by now we generate one here
if = {
limit = {
NOT = { exists = scope:adventurer.var:adventure_destination }
}
set_adventure_location_effect = {
BASE_SCOPE = scope:adventurer
NO_DESTINATION = no
}
get_adventure_inspiration_start_location = { ADVENTURER = scope:adventurer }
}
else = {
#To save the location and make sure materials can access it
scope:adventurer.location = { save_scope_as = location } # To save the location scope based on the destination
}
#Creating the artifact based on the previous choice and outcome
scope:adventurer = {
hidden_effect = {
if = {
limit = { exists = scope:location }
scope:location = { add_to_list = artifact_material_sources } #Used for artifact creation
}
create_character = {
location = root.location
template = local_artisan_template
culture = scope:location.culture
faith = scope:location.faith
rite = scope:location.rite
gender = scope:adventurer
dynasty = none
save_scope_as = artifact_origin #Fictional maker of artifact
}
random_list = {
25 = {
trigger = { #Epic Artifact
trigger_if = {
limit = { exists = var:adventure_type }
OR = {
var:adventure_type = flag:epic_quest
var:adventure_type = flag:free_reign
}
}
}
modifier = {
scope:adventurer.adventure_inspiration_average_skill_value <= low_inspiration_skill
add = -10
}
modifier = {
scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill
add = 25
}
root = {
random_list = {
10 = { #Chance of Relic
modifier = {
scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill
add = -5 #More likely to find something better.
}
modifier = {
scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill
add = -4 #High inspiration skill adventurers will only find relics if there is nothing else to find.
}
random_list = { #This is a list inside an item in the other list because we need _one_ chance for relic and the relic types must be able to have overlapping triggers.
100 = { #Christian
trigger = {
scope:location ?= {
OR = {
faith.religion = religion:christianity_religion
geographical_region = world_europe
geographical_region = world_middle_east_jerusalem
}
}
}
modifier = {
NOT = { scope:location.religion = religion:christianity_religion }
add = -75
}
random_list = {
75 = {
create_artifact_pedestal_christian_relic_effect_hist = {
OWNER = root
}
}
10 = {
create_artifact_pedestal_crucifix_effect = { OWNER = root CREATOR = root }
}
10 = {
create_artifact_pedestal_cross_effect = { OWNER = root CREATOR = root }
}
}
}
100 = { #Islamic
trigger = {
scope:location ?= {
OR = {
religion = religion:islam_religion
geographical_region = world_africa_north
geographical_region = world_middle_east
}
}
}
modifier = {
NOT = { scope:location.religion = religion:islam_religion }
add = -75
}
create_artifact_pedestal_islamic_relic_effect_hist = { OWNER = root }
}
100 = { #Buddhist
trigger = {
scope:location ?= {
OR = {
religion = religion:buddhism_religion
geographical_region = world_india
geographical_region = world_tibetAs written in game/common/scripted_effects/00_ep1_inspiration_effects.txt.
The first 120 of its 2567 lines; the rest is in game/common/scripted_effects/00_ep1_inspiration_effects.txt from line 942.
Where it is used
Every place in common/, events/ and history/ that calls inspiration_adventure_create_artifact_effect.
Events (3)
- Contract: Treasure Hunt
ep3_contract_event.0006 - Contract: Treasure Hunt
ep3_contract_event.0007 - Inspiration Realized
fund_inspiration.1051
Source: game/common/scripted_effects/00_ep1_inspiration_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.