Scripted effect · Roads to Power files
destroy_laamp_effect
destroy_laamp_effect = { ADVENTURER = … }game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 720 (92 lines). Parameters: $ADVENTURER$.
destroy_laamp_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 720 of its file. A call passes 1 parameter: ADVENTURER. The game's script calls it in 6 places, among them Peasant Uprising (casus belli), The Old Man of the Mountain (event hasan_sabbah.1050) and on_title_gain (on action). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (92 lines of game script)
destroy_laamp_effect = {
$ADVENTURER$ = {
save_scope_as = the_adventurer
# If we weren't an adventurer before, make us one.
if = {
limit = {
NOT = { has_trait = adventurer }
}
add_trait = adventurer
}
hidden_effect = {
every_courtier = {
set_variable = {
name = former_camp_leader
value = scope:the_adventurer
}
add_trait = adventurer_follower
}
}
custom_tooltip = {
text = destroy_laamp_effect.tt.domicile_liquidated
laamp_clear_domicile_buildings_effect = yes
}
# Contacts have opinions™ about you.
## Be they good.
every_contact = {
limit = {
opinion = {
target = scope:the_adventurer
value >= 1
}
}
custom = custom.every_contact_with_positive_opinion
add_opinion = {
target = scope:the_adventurer
modifier = pleased_former_contact_opinion
opinion = 30
}
hidden_effect = {
if = {
limit = {
can_set_relation_potential_friend_trigger = { CHARACTER = scope:the_adventurer }
}
set_relation_potential_friend = scope:the_adventurer
}
}
}
## Or bad.
every_contact = {
limit = {
opinion = {
target = scope:the_adventurer
value < 1
}
}
# And neutral but _eh_.
custom = custom.every_contact_with_negative_opinion
add_opinion = {
target = scope:the_adventurer
modifier = frustrated_former_contact_opinion
opinion = -30
}
hidden_effect = {
if = {
limit = {
can_set_relation_potential_rival_trigger = { CHARACTER = scope:the_adventurer }
}
set_relation_potential_rival = scope:the_adventurer
}
}
}
# Destroy your main title.
every_held_title = {
limit = { has_variable = adventurer_creation_reason }
save_scope_as = landless_adventurer_title
scope:the_adventurer = { destroy_title = scope:landless_adventurer_title }
}
# Ironically, we only want to use this effect if you're _not_ admin — it'll reset you nicely to the best government for you, but if you're admin, you should stay admin.
if = {
limit = {
OR = {
government_has_flag = government_is_clan
government_has_flag = government_is_tribal_excluding_wanua
government_has_flag = government_is_feudal
}
}
admin_government_reset_effect = yes #this only contains Clan, Tribal, Nomadic and Feudal
}
# Clean up story no-movement flags.
remove_character_flag = laamp_stay_same_kingdom
}
}As written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls destroy_laamp_effect.
Casus belli (1)
Events (1)
- The Old Man of the Mountain
hasan_sabbah.1050
On actions (the game's own hooks) (1)
- on_title_gain
Source: game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.