Scripted effect · The Royal Court files
create_artifact_armor_effect
create_artifact_armor_effect = { CREATOR = … OWNER = … SET_ARMOR_TYPE = … }game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 10309 (446 lines). Parameters: $CREATOR$, $OWNER$, $SET_ARMOR_TYPE$.
create_artifact_armor_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 10309 of its file. A call passes 3 parameters: CREATOR, OWNER and SET_ARMOR_TYPE. The game's script calls it in 20 places, among them …: the Armorer (event ep3_laamp_decision_event.1063), A Laden Caravan (event travel_events_oltner_2.1030) and A Small Grave (event bp3_roaming.0250). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.
The comment above it in the file
Create the armor
-OWNER is always needed
-CREATOR needs a scope, if you want no smith specified you can use "random_dummy_gender_effect = yes" before the armor creation effect and then scope:dummy_gender for CREATOR
-SET_ARMOR_TYPE has to be a flag, and has to be one of the armor types used in set_armor_artifact_type_effect and ArtifactArmorFullName custom loc key. Use "flag:no" for a random type.
If scope:adventurer exists this will result in the history entry reading that the weapon was discovered instead of made.
Example:
create_artifact_armor_effect = {
OWNER = root
CREATOR = scope:dummy_gender
SET_ARMOR_TYPE = flag:armor_type_lamellar
This will give you lamellar armor with no known smith.What it does
If
scope:smith = scope:dummy_gender
Then
clear_saved_scope = smithclear_saved_scope = dummy_gender
save_adventurer_location_effect = yeshidden_effect_new_object = { … }
• 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)
create_artifact_armor_effect = {
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
$CREATOR$ = { save_scope_as = smith }
save_temporary_scope_value_as = {
name = armor_type_is_set
value = $SET_ARMOR_TYPE$
}
if = {
limit = {
exists = scope:dummy_gender
scope:smith = scope:dummy_gender
}
clear_saved_scope = smith
clear_saved_scope = dummy_gender
}
save_adventurer_location_effect = yes
hidden_effect_new_object = {
if = {
limit = {
scope:armor_type_is_set = flag:no
}
if = {
limit = {
exists = scope:smith
}
set_armor_artifact_type_effect = {
BASE_SCOPE = scope:smith
NO_TYPE = no
}
scope:smith = {
var:artifact_armor_type = { save_scope_as = armor_type }
remove_variable = artifact_armor_type
}
}
else = {
set_armor_artifact_type_effect = {
BASE_SCOPE = scope:owner
NO_TYPE = no
}
scope:owner = {
var:artifact_armor_type = { save_scope_as = armor_type }
remove_variable = artifact_armor_type
}
}
}
else = {
scope:armor_type_is_set = { save_scope_as = armor_type }
}
# Get artifact quality and wealth
get_artifact_quality_effect = yes
get_artifact_wealth_effect = yes
if = {
limit = { scope:armor_type = flag:armor_type_plate }
if = {
limit = {
exists = scope:adventurer
}
create_artifact = {
name = placeholder
description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
type = armor_plate
visuals = armor
modifier = artifact_prowess_1_modifier
wealth = scope:wealth
quality = scope:quality
save_scope_as = newly_created_artifact
history = {
location = scope:location
actor = scope:adventurer
recipient = root
type = discovered
}
}
}
else_if = {
limit = { exists = scope:smith }
create_artifact = {
name = placeholder
creator = scope:smith
description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
type = armor_plate
visuals = armor
wealth = scope:wealth
quality = scope:quality
modifier = artifact_prowess_1_modifier
save_scope_as = newly_created_artifact
}
}
else_if = {
limit = {
exists = scope:host
exists = scope:activity
}
tournament_contest_armor_prize_effect = { TYPE = plate }
}
else = {
create_artifact = {
name = placeholder
description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
type = armor_plate
visuals = armor
wealth = scope:wealth
quality = scope:quality
modifier = artifact_prowess_1_modifier
save_scope_as = newly_created_artifact
history = { type = created_before_history }
}
}
}
else_if = {
limit = { scope:armor_type = flag:armor_type_scale }
if = {
limit = { exists = scope:adventurer }
create_artifact = {
name = placeholder
description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
type = armor_scaleAs written in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.
The first 120 of its 446 lines; the rest is in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt from line 10309.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_armor_effect.
Character interactions (1)
- Bestow Artifact
Events (12)
- …: the Armorer
ep3_laamp_decision_event.1063 - A Laden Caravan
travel_events_oltner_2.1030 - A Small Grave
bp3_roaming.0250 - A Wandering Merchant
ep3_camp_party.1040 - Armorer: Defensive Gifts
ep2_locale_events.2011 - Eparch: For Services Rendered
ep3_eparch_event.0020
6 more
- Inspiration Realized
fund_inspiration.1021 - Passing Like Fire
migration_events.1050 - The Smith's Clangor
travel_events_oltner_2.1110 - DEBUG TEST TITLE
debug_story_test_event.0001 - debug.310
- debug.311
Scripted effects inside an event file (5)
- create_coronation_artifact_effect
- create_cultural_artifact_effect
- ep1_flavor_2040_artifact_effect
- tgp_movement_events_0140_create_artifact_effect
- tribute_mission_1000_set_artifact_reward_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.