Scripted effect · The Royal Court files
get_artifact_quality_effect
get_artifact_quality_effect = yesgame/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 8 (523 lines). No parameters.
get_artifact_quality_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 8 of its file. It takes no parameters: get_artifact_quality_effect = yes. The game's script calls it in 85 places, among them A Treasured Friend (event mpo_events_tova.0045), An Appeal to the Gods (event coronation_events.1039) and Armorer: Defensive Gifts (event ep2_locale_events.2011). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.
What it does
If
a check the game hides
Then
If a check the game hides passes: the same again (5 lines)
- 1 of 5 things will happen:
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
Else if a check the game hides passes: the same again (5 lines)
- 1 of 5 things will happen:
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 1 of 5 things will happen:
• 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)
get_artifact_quality_effect = {
if = {
limit = {
NOT = { exists = scope:quality }
}
# Some random variance is added so artifact quality isn't completely deterministic
if = {
limit = {
NOR = {
exists = scope:inspiration_owner
exists = scope:random_quality_bonus
}
}
random_list = {
20 = {
save_scope_value_as = {
name = random_quality_bonus
value = 4
}
}
20 = {
save_scope_value_as = {
name = random_quality_bonus
value = 8
}
}
20 = {
save_scope_value_as = {
name = random_quality_bonus
value = 12
}
}
20 = {
save_scope_value_as = {
name = random_quality_bonus
value = 16
}
}
20 = {
save_scope_value_as = {
name = random_quality_bonus
value = 20
}
}
}
}
else_if = {
limit = {
NOT = { exists = scope:random_inspired_skill_quality_bonus }
}
random_list = {
20 = {
save_scope_value_as = {
name = random_inspired_skill_quality_bonus
value = 0.5
}
}
20 = {
save_scope_value_as = {
name = random_inspired_skill_quality_bonus
value = 1
}
}
20 = {
save_scope_value_as = {
name = random_inspired_skill_quality_bonus
value = 2
}
}
20 = {
save_scope_value_as = {
name = random_inspired_skill_quality_bonus
value = 2.5
}
}
20 = {
save_scope_value_as = {
name = random_inspired_skill_quality_bonus
value = 3
}
}
}
save_scope_value_as = {
name = random_quality_bonus
value = 0
}
}
# Calculate the final quality of the artifact
save_scope_value_as = {
name = quality
value = {
value = scope:random_quality_bonus
# Cultural tradition for piety level boosting artifacts
if = {
limit = {
court_owner.culture ?= {
has_cultural_parameter = piety_level_affect_artifact_quality
}
}
add = {
value = court_owner.piety_level
multiply = 5
}
}
# Bonus Quality from the Court Owner's Amenities
if = {
limit = {
court_owner ?= {
has_royal_court = yes
has_dlc_feature = royal_court
amenity_level = { target = court_lodging_standards value > low_amenity_level }
}
}
if = {
limit = { court_owner = { amenity_level = { target = court_lodging_standards value >= max_amenity_level } } }
add = 10
}As written in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.
The first 120 of its 523 lines; the rest is in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt from line 8.
Where it is used
Every place in common/, events/ and history/ that calls get_artifact_quality_effect.
Events (12)
- A Treasured Friend
mpo_events_tova.0045 - An Appeal to the Gods
coronation_events.1039 - Armorer: Defensive Gifts
ep2_locale_events.2011 - Bowyer: Ballistic Gifts
ep2_locale_events.4011 - Flowers of …
tgp_east_asia_decision_events.0300 - Recording a Memory
bp1_yearly.7055
6 more
- Religious Study: A Gift of Ink
study_scripture_outcome.1010 - Study: Elder's Guidance
study_confucian_classics_outcome.1010 - Tailor: Threaded Gifts
ep2_locale_events.2511 - tribute_mission.0001
- Weaponsmith: Famous Blade
ep2_locale_events.4505 - Weaponsmith: Offensive Gifts
ep2_locale_events.4511
Scripted effects inside an event file (1)
- tribute_mission_1000_set_artifact_reward_effect
Scripted effects (72)
- create_appropriate_relic_artifact_from_character_effect
- create_artifact_armor_effect
- create_artifact_book_effect
- create_artifact_bow_effect
- create_artifact_bowl_effect
- create_artifact_box_medium_effect
66 more
- create_artifact_box_small_effect
- create_artifact_brooch_effect
- create_artifact_brooch_pedestal_effect
- create_artifact_cabinet_effect
- create_artifact_chest_effect
- create_artifact_court_icon_large_effect
- create_artifact_court_icon_small_effect
- create_artifact_crown_effect
- create_artifact_dynastic_imperial_seal_effect
- create_artifact_elixir_effect
- create_artifact_fp2_andalusian_aquamanile_effect
- create_artifact_fp2_armillary_sphere_effect
- create_artifact_fp3_incense_burner_sculpture_effect
- create_artifact_goblet_effect
- create_artifact_icon_effect
- create_artifact_imperial_seal_effect
- create_artifact_necklace_effect
- create_artifact_necklace_pedestal_effect
- create_artifact_panacea_effect
- create_artifact_pas_darmes_spurs_effect
- create_artifact_pas_darmes_token_effect
- create_artifact_pedestal_bible_effect
- create_artifact_pedestal_buddhism_relic_effect_hist
- create_artifact_pedestal_christian_relic_effect_hist
- create_artifact_pedestal_cross_effect
- create_artifact_pedestal_crozier_effect
- create_artifact_pedestal_crucifix_effect
- create_artifact_pedestal_diamond_effect
- create_artifact_pedestal_gold_effect
- create_artifact_pedestal_human_skull_effect
- create_artifact_pedestal_human_skull_specific_effect
- create_artifact_pedestal_islamic_relic_effect_hist
- create_artifact_pedestal_pouch_effect
- create_artifact_pedestal_religious_head_letter_effect
- create_artifact_pedestal_reliquary_buddhism_effect
- create_artifact_pedestal_reliquary_christian_effect
- create_artifact_pedestal_reliquary_islam_effect
- create_artifact_pedestal_reliquary_judaism_effect
- create_artifact_pedestal_rock_effect
- create_artifact_pedestal_scroll_effect
- create_artifact_pedestal_situla_effect
- create_artifact_pedestal_thurible_effect
- create_artifact_persian_drinking_vessel_effect
- create_artifact_phallus_effect
- create_artifact_philosophers_stone_effect
- create_artifact_plate_effect
- create_artifact_poetry_effect
- create_artifact_pressed_flower_effect
- create_artifact_regalia_effect
- create_artifact_ring_effect
- create_artifact_sculpture_effect
- create_artifact_sculpture_religious_christian_effect
- create_artifact_sculpture_religious_effect
- create_artifact_tapestry_effect
- create_artifact_throne_effect
- create_artifact_tournament_favor_effect
- create_artifact_trinket_icon_ancient_effect
- create_artifact_trinket_icon_effect
- create_artifact_urn_effect
- create_artifact_wall_banner_effect
- create_artifact_wall_narwhal_horn_effect
- create_artifact_wall_shield_effect
- create_artifact_weapon_effect
- create_love_artifact_poetry_effect
- generate_health_trinket_effect
- pam_create_holy_myron_artifact_effect
Source: game/common/scripted_effects/00_ep1_artifact_creation_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.