Scripted effect · The Royal Court files
set_weapon_artifact_type_effect
set_weapon_artifact_type_effect = { BASE_SCOPE = … NO_TYPE = … }game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 9511 (73 lines). Parameters: $BASE_SCOPE$, $NO_TYPE$.
set_weapon_artifact_type_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 9511 of its file. A call passes 2 parameters: BASE_SCOPE and NO_TYPE. The game's script calls it in 3 places, among them Inspiration Funded (event fund_inspiration.0011), create_artifact_weapon_effect (scripted effect) and Weapon Inspiration (inspirations). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.
The comment above it in the file
If the type of weapon hasn't been decided yet we set it here
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (73 lines of game script)
set_weapon_artifact_type_effect = {
save_temporary_scope_value_as = {
name = allow_no_type_option
value = $NO_TYPE$
}
# Historically many of these types of weapon were used in some combination, but to give a clearer portrayal to the player we have to simplify it a bit
hidden_effect = {
$BASE_SCOPE$ = {
#The type has been decided in events, when the character got inspired, or now. Let's save it! (might still leave it up to the sponsor if allow_no_type_option = yes!)
if = {
limit = {
NOT = { exists = var:artifact_weapon_type }
}
random_list = { #What weapon do they want to forge?
10 = {
set_variable = {
name = artifact_weapon_type
value = flag:artifact_weapon_type_axe
}
}
10 = {
set_variable = {
name = artifact_weapon_type
value = flag:artifact_weapon_type_dagger
}
}
10 = {
set_variable = {
name = artifact_weapon_type
value = flag:artifact_weapon_type_hammer
}
}
10 = {
set_variable = {
name = artifact_weapon_type
value = flag:artifact_weapon_type_mace
}
}
10 = {
set_variable = {
name = artifact_weapon_type
value = flag:artifact_weapon_type_spear
}
}
10 = {
set_variable = {
name = artifact_weapon_type
value = flag:artifact_weapon_type_sword
}
}
50 = { #They don't care and you can decide!
trigger = {
scope:allow_no_type_option = yes
}
modifier = {
add = 30
has_personality_submissive_trigger = yes
}
modifier = {
add = 9890 # ~1% chance of being predetermined if comissioning from a local artisan.
has_character_flag = local_artisan
}
ai_value_modifier = {
ai_boldness = -0.25
ai_energy = -0.25
}
# Don't set on creation so that the player has more input on what gets forged in inspiration start events, like fund_inspiration.0015
}
}
}
}
}
}As written in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls set_weapon_artifact_type_effect.
Events (1)
- Inspiration Funded
fund_inspiration.0011
Scripted effects (1)
Inspirations (1)
- Weapon Inspiration
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.