CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

set_signature_weapon_effect

set_signature_weapon_effect = yes

game/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_armament
      • One of these

        • artifact_type = axe
        • or

          artifact_type = hammer
        • or

          artifact_type = spear
        • or

          artifact_type = mace
        • or

          artifact_type = dagger
        • or

          artifact_type = sword

    Then

    • One random equipped character artifact:
      • Where:
        • artifact_slot_type = primary_armament
        • One of these

          • artifact_type = axe
          • or

            artifact_type = hammer
          • or

            artifact_type = spear
          • or

            artifact_type = mace
          • or

            artifact_type = dagger
          • or

            artifact_type = sword
      • clear_saved_scope = equipped_signature_weapon

• 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)

24 more

Scripted effects inside an event file (1)

  • death_in_battle_scope_effect

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.

Spotted a mistake on this page?