Scripted effect · The Royal Court files
set_bow_artifact_type_effect
set_bow_artifact_type_effect = { BASE_SCOPE = … NO_TYPE = … }game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 13498 (68 lines). Parameters: $BASE_SCOPE$, $NO_TYPE$.
set_bow_artifact_type_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 13498 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.0091), create_artifact_bow_effect (scripted effect) and Bow 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
EP2 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 (68 lines of game script)
set_bow_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_bow_type }
}
random_list = { #What weapon do they want to forge?
25 = {
trigger = {
culture = { has_cultural_tradition = tradition_longbow_competitions }
}
set_variable = {
name = artifact_bow_type
value = flag:artifact_bow_type_longbow
}
}
10 = {
trigger = {
culture = { has_innovation = innovation_advanced_bowmaking }
}
set_variable = {
name = artifact_bow_type
value = flag:artifact_bow_type_crossbow
}
}
5 = {
set_variable = {
name = artifact_bow_type
value = flag:artifact_bow_type_bow
}
}
25 = {
trigger = {
culture = { is_composite_bow_culture_trigger = yes }
}
set_variable = {
name = artifact_bow_type
value = flag:artifact_bow_type_composite
}
}
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_bow_artifact_type_effect.
Events (1)
- Inspiration Funded
fund_inspiration.0091
Scripted effects (1)
Inspirations (1)
- Bow 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.