Scripted effect
set_signature_weapon_effect
set_signature_weapon_effect = yesgame/common/scripted_effects/00_personal_details_effects.txt, line 350 (155 lines). No parameters.
set_signature_weapon_effect is a scripted effect in Crusader Kings III, written at line 350 of its file. It takes no parameters: set_signature_weapon_effect = yes. The game's script calls it in 34 places, among them Offer of Peace (interaction), Offer of Peace (interaction) and … Practice: The Fury of Beasts (event martial_chivalry_special.1204). Patch 1.20.1.2, from game/common/scripted_effects/00_personal_details_effects.txt.
The comment above it in the file
Sets a character's signature weapon effect, if they do not already have one.
What it does
If
- Does not have “temporary signature weapon” (a variable the game's script sets)
- Any equipped character artifact:
artifact_slot_type = primary_armamentOne of these
artifact_type = axeor
artifact_type = hammeror
artifact_type = spearor
artifact_type = maceor
artifact_type = daggeror
artifact_type = sword
Then
- One random equipped character artifact:
- Where:
artifact_slot_type = primary_armamentOne of these
artifact_type = axeor
artifact_type = hammeror
artifact_type = spearor
artifact_type = maceor
artifact_type = daggeror
artifact_type = sword
clear_saved_scope = equipped_signature_weapon
- Where:
• 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)
set_signature_weapon_effect = {
save_temporary_scope_as = this_character
# If we're wielding an artifact weapon, override our signature weapon type with what we have equipped.
if = {
limit = {
NOT = { has_variable = temporary_signature_weapon }
any_equipped_character_artifact = {
artifact_slot_type = primary_armament
OR = {
artifact_type = axe
artifact_type = hammer
artifact_type = spear
artifact_type = mace
artifact_type = dagger
artifact_type = sword
}
}
}
random_equipped_character_artifact = {
limit = {
artifact_slot_type = primary_armament
OR = {
artifact_type = axe
artifact_type = hammer
artifact_type = spear
artifact_type = mace
artifact_type = dagger
artifact_type = sword
}
}
save_scope_as = equipped_signature_weapon
scope:this_character = {
set_variable = {
name = signature_weapon_scope
value = scope:equipped_signature_weapon
}
if = {
limit = { scope:equipped_signature_weapon = { artifact_type = axe } }
set_variable = {
name = signature_weapon
value = flag:axe
}
}
if = {
limit = { scope:equipped_signature_weapon = { artifact_type = hammer } }
set_variable = {
name = signature_weapon
value = flag:hammer
}
}
if = {
limit = { scope:equipped_signature_weapon = { artifact_type = spear } }
set_variable = {
name = signature_weapon
value = flag:spear
}
}
if = {
limit = { scope:equipped_signature_weapon = { artifact_type = mace } }
set_variable = {
name = signature_weapon
value = flag:mace
}
}
if = {
limit = { scope:equipped_signature_weapon = { artifact_type = dagger } }
set_variable = {
name = signature_weapon
value = flag:dagger
}
}
if = {
limit = { scope:equipped_signature_weapon = { artifact_type = sword } }
set_variable = {
name = signature_weapon
value = flag:sword
}
}
}
clear_saved_scope = equipped_signature_weapon # Clear the saved scope so we don't clone artifacts when this effect is run multiple times in sucession.
}
}
# Otherwise, if we do not have an equipped artifact AND we do not yet have a signature weapon type, pick one at random.
else_if = {
limit = {
has_none_of_variables = {
name = signature_weapon
name = temporary_signature_weapon
}
}
hidden_effect = {
random_list = {
30 = {
set_variable = {
name = signature_weapon
value = flag:sword
}
modifier = {
add = 150
culture = { has_cultural_pillar = heritage_japonic }
}
}
10 = {
set_variable = {
name = signature_weapon
value = flag:mace
}
}
10 = {
set_variable = {
name = signature_weapon
value = flag:axe
}
# Weight up the axe-bearing foreigners chance of bearing axes.
modifier = {
add = 150
has_trait = varangian
}
modifier = {As written in game/common/scripted_effects/00_personal_details_effects.txt.
The first 120 of its 155 lines; the rest is in game/common/scripted_effects/00_personal_details_effects.txt from line 350.
Where it is used
Every place in common/, events/ and history/ that calls set_signature_weapon_effect.
Character interactions (2)
Events (30)
- … Practice: The Fury of Beasts
martial_chivalry_special.1204 - A Challenger
tribal.1003 - Armory Break-in
child_personality.7100 - Bowyer: Ballistic Gifts
ep2_locale_events.4010 - Contract: Instructor of …
ep3_contract_event.0091 - Contract: Instructor of …
tgp_interaction_event.0042
24 more
- Happy Birthday!
bp1_yearly.3005 - Hearty Competition
fp1_yearly.2100 - Holmgang
tribal.1102 - Holmgang
tribal.1103 - Holmgang
tribal.1104 - Holmgang
tribal.1105 - Humiliating Defeat
rivalry.1024 - Keeping the Peace
tournament_events.1260 - Narrow Defeat
rivalry.1023 - Narrow Victory
rivalry.1022 - Rites of Passage: Duel
bp2_yearly.7021 - Romance: Declaration Of Love
court_ongoing.0502 - Royal Service
hold_court.8050 - Settlement: An End
stewardship_duty_special.2026 - Stress Coping: Heavier is More
stress_trait_coping_decisions.7502 - The Challenge
martial_chivalry.2010 - The Last Day
yearly.7001 - The Last Day
yearly.7005 - The Way of the …
martial_chivalry.0010 - Toppling the Colossus
combat_event.0004 - Triumphant Victory
rivalry.1021 - Undefeatable
combat_event.0003 - Underequipped
court.8010 - Weaponsmith: Offensive Gifts
ep2_locale_events.4510
Scripted effects inside an event file (1)
- death_in_battle_scope_effect
Scripted effects (1)
Source: game/common/scripted_effects/00_personal_details_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.