unfucking the mod

This commit is contained in:
trashmasteruni 2026-01-06 14:25:21 +01:00
parent cbe3fbcda2
commit d887392b56
1167 changed files with 26982 additions and 13 deletions

View file

@ -0,0 +1,719 @@
namespace = ep1_character_interaction
##################################################
#
# Character Interaction Events
#
# 0001 - 0010 Indebt Guest
##################################################
##################################################
# CHARACTER INTERACTION EVENTS
##################################################
# A Sensible Recompense
# by Ewan Cowhig Croft
# 0001 - 0010
##################################################
scripted_trigger ep1_character_interaction_0001_valid_hostile_relation_trigger = {
# Must be at a court of some kind *other* than your own.
exists = host
scope:actor != host
# And not in scope:actor's prison.
NOR = {
imprisoner ?= scope:actor
}
# Double check that this'd be an appropriate court to send a plant.
save_temporary_scope_as = current_target
scope:actor = {
OR = {
# Either you've got a scheme on the go...
any_scheme = {
hostile_scheme_trigger = yes
scheme_target_character = scope:current_target
}
# ... or you could start one.
can_start_hostile_scheme_against_trigger = { TARGET = scope:current_target}
}
}
}
scripted_trigger ep1_character_interaction_0001_valid_rival_trigger = {
ep1_character_interaction_0001_valid_hostile_relation_trigger = yes
OR = {
NOT = { exists = scope:actor_nemesis }
this != scope:actor_nemesis
}
}
scripted_effect ep1_character_interaction_0001_move_character_and_family_effect = {
scope:recipient = {
# Whatever else happens, just move them.
scope:actor = { remove_courtier_or_guest = scope:recipient }
$DESTINATION$ = { add_courtier = scope:recipient }
# If they have any family, quietly send them along too.
hidden_effect = {
if = {
limit = {
any_traveling_family_member = { }
}
every_traveling_family_member = {
save_temporary_scope_as = family_to_shunt
scope:actor = { remove_courtier_or_guest = scope:family_to_shunt }
$DESTINATION$ = { add_courtier = scope:family_to_shunt }
}
}
}
}
}
# Trick a guest into a debt & turn them into an agent.
ep1_character_interaction.0001 = {
type = character_event
title = ep1_character_interaction.0001.t
desc = {
desc = ep1_character_interaction.0001.desc.intro
first_valid = {
triggered_desc = {
trigger = { scope:false_flag_type = flag:lustful }
desc = ep1_character_interaction.0001.desc.lustful
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:chaste }
desc = ep1_character_interaction.0001.desc.chaste
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:gluttonous }
desc = ep1_character_interaction.0001.desc.gluttonous
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:temperate }
desc = ep1_character_interaction.0001.desc.temperate
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:greedy }
desc = ep1_character_interaction.0001.desc.greedy
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:generous }
desc = ep1_character_interaction.0001.desc.generous
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:lazy }
desc = ep1_character_interaction.0001.desc.lazy
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:diligent }
desc = ep1_character_interaction.0001.desc.diligent
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:wrathful }
desc = ep1_character_interaction.0001.desc.wrathful
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:calm }
desc = ep1_character_interaction.0001.desc.calm
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:patient }
desc = ep1_character_interaction.0001.desc.patient
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:impatient }
desc = ep1_character_interaction.0001.desc.impatient
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:arrogant }
desc = ep1_character_interaction.0001.desc.arrogant
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:humble }
desc = ep1_character_interaction.0001.desc.humble
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:deceitful }
desc = ep1_character_interaction.0001.desc.deceitful
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:honest }
desc = ep1_character_interaction.0001.desc.honest
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:craven }
desc = ep1_character_interaction.0001.desc.craven
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:brave }
desc = ep1_character_interaction.0001.desc.brave
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:shy }
desc = ep1_character_interaction.0001.desc.shy
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:gregarious }
desc = ep1_character_interaction.0001.desc.gregarious
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:ambitious }
desc = ep1_character_interaction.0001.desc.ambitious
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:content }
desc = ep1_character_interaction.0001.desc.content
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:arbitrary }
desc = ep1_character_interaction.0001.desc.arbitrary
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:just }
desc = ep1_character_interaction.0001.desc.just
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:cynical }
desc = ep1_character_interaction.0001.desc.cynical
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:zealous }
desc = ep1_character_interaction.0001.desc.zealous
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:paranoid }
desc = ep1_character_interaction.0001.desc.paranoid
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:trusting }
desc = ep1_character_interaction.0001.desc.trusting
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:compassionate }
desc = ep1_character_interaction.0001.desc.compassionate
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:callous }
desc = ep1_character_interaction.0001.desc.callous
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:sadistic }
desc = ep1_character_interaction.0001.desc.sadistic
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:stubborn }
desc = ep1_character_interaction.0001.desc.stubborn
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:fickle }
desc = ep1_character_interaction.0001.desc.fickle
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:vengeful }
desc = ep1_character_interaction.0001.desc.vengeful
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:forgiving }
desc = ep1_character_interaction.0001.desc.forgiving
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:fallback_1 }
desc = ep1_character_interaction.0001.desc.fallback_1
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:fallback_2 }
desc = ep1_character_interaction.0001.desc.fallback_2
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:fallback_3 }
desc = ep1_character_interaction.0001.desc.fallback_3
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:fallback_4 }
desc = ep1_character_interaction.0001.desc.fallback_4
}
triggered_desc = {
trigger = { scope:false_flag_type = flag:fallback_5 }
desc = ep1_character_interaction.0001.desc.fallback_5
}
}
desc = ep1_character_interaction.0001.desc.outro
}
theme = intrigue_skulduggery_focus
left_portrait = {
character = scope:actor
animation = schadenfreude
}
right_portrait = {
character = scope:recipient
animation = fear
}
lower_center_portrait = scope:actor_nemesis
lower_right_portrait = scope:actor_rival
override_background = { reference = throne_room }
immediate = {
# Apply the interaction's effects.
indebt_guest_interaction_accepted_effect = yes
# Roll the offending crime.
## Percentages even throughout: we're not fussed about which result you roll.
scope:recipient = {
random_list = {
# lustful
100 = {
trigger = { has_trait = lustful }
save_scope_value_as = {
name = false_flag_type
value = flag:lustful
}
}
# chaste
100 = {
trigger = { has_trait = chaste }
save_scope_value_as = {
name = false_flag_type
value = flag:chaste
}
}
# gluttonous
100 = {
trigger = { has_trait = gluttonous }
save_scope_value_as = {
name = false_flag_type
value = flag:gluttonous
}
}
# temperate
100 = {
trigger = { has_trait = temperate }
save_scope_value_as = {
name = false_flag_type
value = flag:temperate
}
}
# greedy
100 = {
trigger = { has_trait = greedy }
save_scope_value_as = {
name = false_flag_type
value = flag:greedy
}
}
# generous
100 = {
trigger = { has_trait = generous }
save_scope_value_as = {
name = false_flag_type
value = flag:generous
}
}
# lazy
100 = {
trigger = { has_trait = lazy }
save_scope_value_as = {
name = false_flag_type
value = flag:lazy
}
}
# diligent
100 = {
trigger = { has_trait = diligent }
save_scope_value_as = {
name = false_flag_type
value = flag:diligent
}
}
# wrathful
100 = {
trigger = { has_trait = wrathful }
save_scope_value_as = {
name = false_flag_type
value = flag:wrathful
}
}
# calm
100 = {
trigger = { has_trait = calm }
save_scope_value_as = {
name = false_flag_type
value = flag:calm
}
}
# patient
100 = {
trigger = { has_trait = patient }
save_scope_value_as = {
name = false_flag_type
value = flag:patient
}
}
# impatient
100 = {
trigger = { has_trait = impatient }
save_scope_value_as = {
name = false_flag_type
value = flag:impatient
}
}
# arrogant
100 = {
trigger = { has_trait = arrogant }
save_scope_value_as = {
name = false_flag_type
value = flag:arrogant
}
}
# humble
100 = {
trigger = { has_trait = humble }
save_scope_value_as = {
name = false_flag_type
value = flag:humble
}
}
# deceitful
100 = {
trigger = { has_trait = deceitful }
save_scope_value_as = {
name = false_flag_type
value = flag:deceitful
}
}
# honest
100 = {
trigger = { has_trait = honest }
save_scope_value_as = {
name = false_flag_type
value = flag:honest
}
}
# craven
100 = {
trigger = { has_trait = craven }
save_scope_value_as = {
name = false_flag_type
value = flag:craven
}
}
# brave
100 = {
trigger = { has_trait = brave }
save_scope_value_as = {
name = false_flag_type
value = flag:brave
}
}
# shy
100 = {
trigger = { has_trait = shy }
save_scope_value_as = {
name = false_flag_type
value = flag:shy
}
}
# gregarious
100 = {
trigger = { has_trait = gregarious }
save_scope_value_as = {
name = false_flag_type
value = flag:gregarious
}
}
# ambitious
100 = {
trigger = { has_trait = ambitious }
save_scope_value_as = {
name = false_flag_type
value = flag:ambitious
}
}
# content
100 = {
trigger = { has_trait = content }
save_scope_value_as = {
name = false_flag_type
value = flag:content
}
}
# arbitrary
100 = {
trigger = { has_trait = arbitrary }
save_scope_value_as = {
name = false_flag_type
value = flag:arbitrary
}
}
# just
100 = {
trigger = { has_trait = just }
save_scope_value_as = {
name = false_flag_type
value = flag:just
}
}
# cynical
100 = {
trigger = { has_trait = cynical }
save_scope_value_as = {
name = false_flag_type
value = flag:cynical
}
}
# zealous
100 = {
trigger = { has_trait = zealous }
save_scope_value_as = {
name = false_flag_type
value = flag:zealous
}
}
# paranoid
100 = {
trigger = { has_trait = paranoid }
save_scope_value_as = {
name = false_flag_type
value = flag:paranoid
}
}
# trusting
100 = {
trigger = { has_trait = trusting }
save_scope_value_as = {
name = false_flag_type
value = flag:trusting
}
}
# compassionate
100 = {
trigger = { has_trait = compassionate }
save_scope_value_as = {
name = false_flag_type
value = flag:compassionate
}
}
# callous
100 = {
trigger = { has_trait = callous }
save_scope_value_as = {
name = false_flag_type
value = flag:callous
}
}
# sadistic
100 = {
trigger = { has_trait = sadistic }
save_scope_value_as = {
name = false_flag_type
value = flag:sadistic
}
}
# stubborn
100 = {
trigger = { has_trait = stubborn }
save_scope_value_as = {
name = false_flag_type
value = flag:stubborn
}
}
# fickle
100 = {
trigger = { has_trait = fickle }
save_scope_value_as = {
name = false_flag_type
value = flag:fickle
}
}
# vengeful
100 = {
trigger = { has_trait = vengeful }
save_scope_value_as = {
name = false_flag_type
value = flag:vengeful
}
}
# forgiving
100 = {
trigger = { has_trait = forgiving }
save_scope_value_as = {
name = false_flag_type
value = flag:forgiving
}
}
# fallback_1
100 = {
save_scope_value_as = {
name = false_flag_type
value = flag:fallback_1
}
}
# fallback_2
100 = {
save_scope_value_as = {
name = false_flag_type
value = flag:fallback_2
}
}
# fallback_3
100 = {
save_scope_value_as = {
name = false_flag_type
value = flag:fallback_3
}
}
# fallback_4
100 = {
save_scope_value_as = {
name = false_flag_type
value = flag:fallback_4
}
}
# fallback_5
100 = {
save_scope_value_as = {
name = false_flag_type
value = flag:fallback_5
}
}
}
}
# Sort scopes for event options.
scope:actor = {
# If scope:actor has a nemesis, save them for loc.
if = {
limit = {
any_relation = {
type = nemesis
count >= 1
ep1_character_interaction_0001_valid_hostile_relation_trigger = yes
}
}
random_relation = {
type = nemesis
limit = { ep1_character_interaction_0001_valid_hostile_relation_trigger = yes }
save_scope_as = actor_nemesis
}
}
# If scope:actor has any valid rivals, pick a random one for option B.
if = {
limit = {
any_relation = {
type = rival
count >= 1
ep1_character_interaction_0001_valid_rival_trigger = yes
}
}
random_relation = {
type = rival
# Prefer rivals that are targets of hostile schemes.
limit = {
any_targeting_scheme = {
scheme_owner = scope:actor
is_hostile = yes
}
ep1_character_interaction_0001_valid_rival_trigger = yes
}
# Failing that, rivals who are targets of any schemes.
alternative_limit = {
any_targeting_scheme = {
scheme_owner = scope:actor
is_hostile = no
}
ep1_character_interaction_0001_valid_rival_trigger = yes
}
# Otherwise just any rando rival who could be schemed against.
alternative_limit = { ep1_character_interaction_0001_valid_rival_trigger = yes }
save_scope_as = actor_rival
}
}
}
}
# *Cackling* Oh yes, [actor_nemesis.GetFirstName] will never see this coming!
option = {
name = ep1_character_interaction.0001.a
trigger = { exists = scope:actor_nemesis }
# Quietly add scope:recipient as a courtier of scope:actor_nemesis.
ep1_character_interaction_0001_move_character_and_family_effect = { DESTINATION = scope:actor_nemesis }
stress_impact = {
patient = miniscule_stress_impact_loss
vengeful = minor_stress_impact_loss
impatient = medium_stress_impact_gain
trusting = major_stress_impact_gain
}
ai_chance = {
# If valid, this should always be the choice selected.
base = 100
}
}
# Excellent! Now, you will deliver yourself to [actor_rival.GetFirstNamePossessive] court...
option = {
name = ep1_character_interaction.0001.b
trigger = { exists = scope:actor_rival }
# Quietly add scope:recipient as a courtier of scope:actor_rival.
ep1_character_interaction_0001_move_character_and_family_effect = { DESTINATION = scope:actor_rival }
stress_impact = {
patient = miniscule_stress_impact_loss
vengeful = minor_stress_impact_loss
impatient = medium_stress_impact_gain
trusting = major_stress_impact_gain
}
ai_chance = {
# Never pick this option...
base = 0
# ... unless there's no nemesis, in which case it should be the default.
modifier = {
add = 100
NOT = { exists = scope:actor_rival }
}
}
}
# Now, begone till I have need of you.
option = {
name = ep1_character_interaction.0001.c
# Boot 'em out.
hidden_effect = {
scope:recipient = { select_and_move_to_pool_effect = yes }
}
show_as_tooltip = {
remove_courtier_or_guest = scope:recipient
}
stress_impact = {
shy = minor_stress_impact_loss
gregarious = minor_stress_impact_gain
}
ai_chance = {
# AI should never be taking this without a nemesis, but if they do, it doesn't matter where they send scope:recipient.
base = 0
}
}
# Naturally, you will stay where I can keep an eye on you.
option = {
name = ep1_character_interaction.0001.d
# Status quo: no extra changes here.
# No stress impact necessary for the fallback option.
ai_chance = {
# AI should never be taking this without a nemesis, but if they do, it doesn't matter where they send scope:recipient.
base = 0
}
}
}

View file

@ -0,0 +1,552 @@
namespace = court_position
################################
# FLAVOR EVENTS
# 1001 - 8999
################################
#############################
# MURDER SAVE EVENTS
# 9001 - 9199
# by Linnéa Thimrén
#############################
###############
# SAVED BY FOOD TASTER
# FOR MURDERER: Saved from poisoned food by food taster
# by Linnéa Thimrén
court_position.9001 = {
type = character_event
window = scheme_failed_event
title = court_position.9001.t
desc = {
desc = court_position.9001.desc
triggered_desc = {
trigger = { exists = local_var:food_taster_dies }
desc = court_position.9001.food_taster_dies
}
}
theme = murder_scheme
left_portrait = {
character = scope:owner
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = fear
}
animation = stress
}
center_portrait = {
character = scope:food_taster
animation = poison
}
right_portrait = {
character = scope:target
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = rage
}
animation = paranoia
}
override_background = { reference = feast }
widget = {
gui = "event_window_widget_scheme"
container = "custom_widgets_container"
}
trigger = {
scope:target = {
employs_court_position = food_taster_court_position
any_court_position_holder = {
type = food_taster_court_position
foodtaster_will_actually_do_job_trigger = yes
}
}
}
immediate = {
scope:target = {
random_court_position_holder = {
type = food_taster_court_position
limit = { is_physically_able = yes }
save_scope_as = food_taster
}
}
murder_failure_effect = yes
hidden_effect = {
random = {
chance = 75
set_local_variable = {
name = food_taster_dies
value = yes
}
}
}
}
option = {
name = murder_save.0001.a
scope:scheme = { end_scheme = yes }
}
option = {
name = murder_save.0001.b
restart_murder_scheme_effect = yes
}
after = {
# Fire the rest of the outcome.
scope:target = { trigger_event = court_position.9002 }
if = {
limit = { exists = local_var:food_taster_dies }
show_as_tooltip = {
murder_interception_handle_extra_deaths_effect = {
VICTIM = scope:food_taster
REASON = death_poison
}
}
}
}
}
# FOR TARGET: Food taster dies to poison
court_position.9002 = {
type = character_event
window = scheme_target_event
title = court_position.9001.t
desc = {
desc = court_position.9002.desc
triggered_desc = {
trigger = { exists = local_var:food_taster_dies }
desc = court_position.9002.food_taster_dies
}
triggered_desc = {
trigger = { exists = scope:scheme_discovered }
desc = court_position.9002.owner_discovered
}
}
theme = murder_scheme
left_portrait = {
character = scope:target
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = rage
}
animation = paranoia
}
center_portrait = {
character = scope:food_taster
animation = poison
}
right_portrait = {
character = scope:owner_to_reveal
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = fear
}
animation = stress
}
immediate = {
set_variable = {
name = block_death_event_from
value = scope:food_taster
days = 3
}
# Handle the death of the food taster, if necessary
if = {
limit = { exists = local_var:food_taster_dies }
murder_interception_handle_extra_deaths_effect = {
VICTIM = scope:food_taster
REASON = death_poison
}
}
}
# Who could do such a thing?
option = {
name = murder_save.1001.a
trigger = {
NOT = { exists = scope:scheme_discovered }
}
custom_tooltip = murder_save.failure_unknown_owner_tt
}
# Vengeance!
option = {
name = murder_save.1001.b
trigger = { exists = scope:scheme_discovered }
custom_tooltip = murder_save.failure_known_owner_tt
}
after = {
add_character_modifier = {
modifier = watchful_modifier
days = watchful_modifier_duration
}
}
}
###############
# SAVED BY CUP-BEARER
# FOR MURDERER: Saved from poisoned drink by cup-bearer
# by Linnéa Thimrén
court_position.9011 = {
type = character_event
window = scheme_failed_event
title = court_position.9011.t
desc = {
desc = court_position.9011.desc
triggered_desc = {
trigger = { exists = local_var:cupbearer_dies }
desc = court_position.9011.cupbearer_dies
}
}
theme = murder_scheme
left_portrait = {
character = scope:owner
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = fear
}
animation = stress
}
center_portrait = {
character = scope:food_taster
animation = poison
}
right_portrait = {
character = scope:target
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = rage
}
animation = paranoia
}
widget = {
gui = "event_window_widget_scheme"
container = "custom_widgets_container"
}
trigger = {
scope:target = {
employs_court_position = cupbearer_court_position
any_court_position_holder = {
type = cupbearer_court_position
cupbearer_will_actually_do_job_trigger = yes
}
}
}
immediate = {
scope:target = {
random_court_position_holder = {
type = cupbearer_court_position
limit = { is_physically_able = yes }
save_scope_as = cupbearer
}
}
murder_failure_effect = yes
hidden_effect = {
random = {
chance = 75
set_local_variable = {
name = cupbearer_dies
value = yes
}
}
}
}
option = {
name = murder_save.0001.a
scope:scheme = { end_scheme = yes }
}
option = {
name = murder_save.0001.b
restart_murder_scheme_effect = yes
}
after = {
# Fire the rest of the outcome.
scope:target = { trigger_event = court_position.9012 }
if = {
limit = { exists = local_var:cupbearer_dies }
show_as_tooltip = {
murder_interception_handle_extra_deaths_effect = {
VICTIM = scope:cupbearer
REASON = death_poison
}
}
}
}
}
# FOR TARGET: Cup-bearer dies to poison
court_position.9012 = {
type = character_event
window = scheme_target_event
title = court_position.9011.t
desc = {
desc = court_position.9012.desc
triggered_desc = {
trigger = { exists = local_var:cupbearer_dies }
desc = court_position.9012.cupbearer_dies
}
triggered_desc = {
trigger = { exists = scope:scheme_discovered }
desc = court_position.9002.owner_discovered
}
}
theme = murder_scheme
left_portrait = {
character = scope:target
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = rage
}
animation = paranoia
}
center_portrait = {
character = scope:food_taster
animation = poison
}
right_portrait = {
character = scope:owner_to_reveal
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = fear
}
animation = stress
}
immediate = {
set_variable = {
name = block_death_event_from
value = scope:cupbearer
days = 3
}
# Handle the death of the cupbearer, if necessary
if = {
limit = { exists = local_var:cupbearer_dies }
murder_interception_handle_extra_deaths_effect = {
VICTIM = scope:cupbearer
REASON = death_poison
}
}
}
# Who could do such a thing?
option = {
name = murder_save.1001.a
trigger = {
NOT = { exists = scope:scheme_discovered }
}
custom_tooltip = murder_save.failure_unknown_owner_tt
}
# Vengeance!
option = {
name = murder_save.1001.b
trigger = { exists = scope:scheme_discovered }
custom_tooltip = murder_save.failure_known_owner_tt
}
after = {
add_character_modifier = {
modifier = watchful_modifier
days = watchful_modifier_duration
}
}
}
###############
# SAVED BY BODYGUARD
# FOR MURDERER: Saved from assassin by bodyguard
# by Linnéa Thimrén
court_position.9021 = {
type = character_event
window = scheme_failed_event
title = court_position.9021.t
desc = {
desc = court_position.9021.desc
triggered_desc = {
trigger = { exists = local_var:bodyguard_dies }
desc = court_position.9021.bodyguard_dies
}
}
theme = murder_scheme
left_portrait = {
character = scope:owner
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = fear
}
animation = stress
}
center_portrait = {
character = scope:bodyguard
triggered_animation = {
trigger = { is_alive = no }
animation = map_fear
}
animation = random_weapon_aggressive
camera = camera_event_center_pointing_left
}
right_portrait = {
character = scope:target
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = rage
}
animation = paranoia
}
widget = {
gui = "event_window_widget_scheme"
container = "custom_widgets_container"
}
trigger = {
scope:target = {
employs_court_position = bodyguard_court_position
any_court_position_holder = {
type = bodyguard_court_position
bodyguard_will_actually_do_job_trigger = yes
}
}
}
immediate = {
scope:target = {
random_court_position_holder = {
type = bodyguard_court_position
limit = { is_physically_able = yes }
save_scope_as = bodyguard
}
}
murder_failure_effect = yes
hidden_effect = {
random = {
chance = 75
set_local_variable = {
name = bodyguard_dies
value = yes
}
}
}
}
option = {
name = murder_save.0001.a
scope:scheme = { end_scheme = yes }
}
option = {
name = murder_save.0001.b
restart_murder_scheme_effect = yes
}
after = {
# Fire the rest of the outcome.
scope:target = { trigger_event = court_position.9022 }
if = {
limit = { exists = local_var:bodyguard_dies }
show_as_tooltip = {
murder_interception_handle_extra_deaths_effect = {
VICTIM = scope:bodyguard
REASON = death_murder
}
}
}
}
}
# FOR TARGET: Bodyguard dies to assassin
court_position.9022 = {
type = character_event
window = scheme_target_event
title = court_position.9021.t
desc = {
desc = court_position.9022.desc
triggered_desc = {
trigger = { exists = local_var:bodyguard_dies }
desc = court_position.9022.bodyguard_dies
}
triggered_desc = {
trigger = { exists = scope:scheme_discovered }
desc = court_position.9002.owner_discovered
}
}
theme = murder_scheme
left_portrait = {
character = scope:target
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = rage
}
animation = paranoia
}
center_portrait = {
character = scope:bodyguard
triggered_animation = {
trigger = { is_alive = no }
animation = map_fear
}
animation = random_weapon_aggressive
}
right_portrait = {
character = scope:owner_to_reveal
triggered_animation = {
trigger = { exists = scope:scheme_discovered }
animation = fear
}
animation = stress
}
immediate = {
set_variable = {
name = block_death_event_from
value = scope:bodyguard
days = 3
}
# Handle the death of the bodyguard, if necessary
if = {
limit = { exists = local_var:bodyguard_dies }
murder_interception_handle_extra_deaths_effect = {
VICTIM = scope:bodyguard
REASON = death_murder
}
}
}
# Who could do such a thing?
option = {
name = murder_save.1001.a
trigger = {
NOT = { exists = scope:scheme_discovered }
}
custom_tooltip = murder_save.failure_unknown_owner_tt
}
# Vengeance!
option = {
name = murder_save.1001.b
trigger = { exists = scope:scheme_discovered }
custom_tooltip = murder_save.failure_known_owner_tt
}
after = {
add_character_modifier = {
modifier = watchful_modifier
days = watchful_modifier_duration
}
}
}

View file

@ -0,0 +1,575 @@
namespace = ep1_decision
##################################################
#
# Royal Court Court Grandeur Level & Amenity Decisions Events
#
# COURT GRANDEUR LEVELS
# 0001 - 0010 Host Fundraiser
# 0011 - 0020 Host Summit
#
# AMENITIES
# 0101 - 0110 Order Mass Eviction
# 0111 - 0120 Commission Exotic Bedchamber
##################################################
##################################################
# COURT GRANDEUR LEVELS
ep1_decision.0201 = {
type = character_event
title = ep1_decision.0201.t
desc = ep1_decision.0201.desc
theme = education
left_portrait = scope:good_linguist
lower_left_portrait = scope:cheap_linguist
right_portrait = scope:medium_linguist
lower_right_portrait = scope:scholarly_linguist
override_background = { reference = throne_room }
immediate = {
### Save cultures and languages
# Find 1st culture that speaks target language natively
random_culture_global = {
limit = {
exists = culture_head
scope:target_court_language = { has_court_language_of_culture = prev }
}
save_scope_as = ling_cul_1
}
# Save liege as example to fetch faiths if relevant
if = {
limit = {
exists = scope:language_scheme_type
liege = { has_court_language_of_culture = root.liege.culture }
}
liege = { save_scope_as = ling_cul_1_ruler }
}
# Otherwise find random cul_1 ruler
else = {
linguist_random_realm_effect = { CULTURE = ling_cul_1 }
}
# Find 2nd culture that speaks target language natively
if = {
limit = {
any_culture_global = {
exists = culture_head
scope:target_court_language = { has_court_language_of_culture = prev }
THIS != scope:ling_cul_1
}
}
random_culture_global = {
limit = {
exists = culture_head
scope:target_court_language = { has_court_language_of_culture = prev }
THIS != scope:ling_cul_1
}
save_scope_as = ling_cul_2
}
}
# If none, duplicate 1st
else = {
scope:ling_cul_1 = { save_scope_as = ling_cul_2 }
}
# Save random ruler of cul 2 to find faith
linguist_random_realm_effect = { CULTURE = ling_cul_2 }
# Save own culture
culture = { save_scope_as = ling_cul_3 }
# Bonus languages good linguists may know in addition to root and target
linguist_bonus_culture_effect = { CULTURE = ling_cul_1 }
linguist_bonus_culture_effect = { CULTURE = ling_cul_2 }
linguist_bonus_culture_effect = { CULTURE = ling_cul_3 }
#### Create Linguists
hidden_effect = {
# Poor Linguist
if = {
limit = { has_trait = greedy }
create_character = {
dynasty = none
template = court_linguist_cheap_template
location = root.capital_province
save_scope_as = cheap_linguist
}
}
# Average Linguist
create_character = {
dynasty = none
template = court_linguist_medium_template
location = root.capital_province
save_scope_as = medium_linguist
}
# Good Linguist
create_character = {
dynasty = none
template = court_linguist_good_template
culture = scope:ling_cul_2
faith = scope:ling_cul_2_ruler.faith
location = root.capital_province
save_scope_as = good_linguist
}
# Scholarly Linguist
if = {
limit = { has_trait = scholar }
create_character = {
dynasty = none
template = court_linguist_good_template
culture = scope:ling_cul_1
faith = scope:ling_cul_1_ruler.faith
location = root.capital_province
trait = scholar
save_scope_as = scholarly_linguist
}
if = {
limit = {
exists = scope:ling_cul_2_bonus
NOT = {
scope:scholarly_linguist = { knows_language_of_culture = scope:ling_cul_2_bonus }
}
}
scope:scholarly_linguist = { learn_language_of_culture = scope:ling_cul_2_bonus }
}
}
}
}
# Expensive linguist, great teacher
option = {
name = ep1_decision.0201.a
pay_short_term_gold = {
target = scope:good_linguist
gold = medium_gold_value
}
learn_language_linguist_effect = { LINGUIST = scope:good_linguist }
stress_impact = {
greedy = medium_stress_impact_gain
}
ai_chance = {
base = 100
modifier = {
short_term_gold < medium_gold_value
factor = 0
}
}
}
# Cheaper linguist; less learning, not a good teacher
option = {
name = ep1_decision.0201.b
pay_short_term_gold = {
target = scope:medium_linguist
gold = minor_gold_value
}
learn_language_linguist_effect = { LINGUIST = scope:medium_linguist }
stress_impact = {
greedy = medium_stress_impact_gain
}
ai_chance = {
base = 100
modifier = {
short_term_gold < minor_gold_value_check
factor = 0
}
}
}
# I know a good tutor through scholarly circles!
option = {
name = ep1_decision.0201.c
trait = scholar
trigger = { has_trait = scholar }
learn_language_linguist_effect = { LINGUIST = scope:scholarly_linguist }
ai_chance = {
base = 100
}
}
# I'm cheap, get me anyone who can vaguely speak my language
option = {
name = ep1_decision.0201.d
trait = greedy
trigger = { has_trait = greedy }
learn_language_linguist_effect = { LINGUIST = scope:cheap_linguist }
ai_chance = {
base = 1000
modifier = { # Don't do it if you can hire the cool guy
has_trait = scholar
factor = 0
}
}
}
# On seconds thoughts, I won't hire a linguist at all...
option = {
name = ep1_decision.0201.e
ai_chance = {
base = 0
modifier = {
short_term_gold < minor_gold_value_check
NOR = {
has_trait = scholar
has_trait = greedy
}
add = 10
}
}
}
after = {
every_in_list = {
list = court_linguist_list
limit = {
NOT = { is_courtier_of = root }
}
silent_disappearance_effect = yes
}
}
}
##################################################
# AMENITIES
##################################################
# Out with the Old
# by Ewan Cowhig Croft
# 0101 - 0110
##################################################
# Pay a little prestige to boot out all the guests from your palace.
ep1_decision.0101 = {
type = character_event
title = ep1_decision.0101.t
desc = ep1_decision.0101.desc
theme = court
left_portrait = {
character = root
animation = personality_rational
}
override_background = { reference = throne_room }
immediate = {
# Grab the capital for easy loc.
capital_barony = { save_scope_as = capital }
}
# Scope:capital is not an inn. Away, leeches!
option = {
name = ep1_decision.0101.a
# Evict your guests.
order_mass_eviction_decision_guests_only_effect = yes
stress_impact = {
shy = minor_stress_impact_loss
gregarious = medium_stress_impact_gain
}
ai_chance = {
# AI cannot access this event.
base = 100
}
}
# Everyone who doesn't have a job or a close blood tie, *out*!
option = {
name = ep1_decision.0101.b
trigger = {
# If you have no spare rooms at all, you can dismiss useless courtiers for a bit extra.
amenity_level = {
target = court_lodging_standards
value <= low_amenity_level
}
}
# Charge an extra premium.
add_prestige = {
value = order_mass_eviction_decision_cost_value
multiply = -1
}
# Evict your guests *&* courtiers.
order_mass_eviction_decision_courtiers_&_guests_effect = yes
stress_impact = {
shy = medium_stress_impact_loss
gregarious = major_stress_impact_gain
}
ai_chance = {
# AI cannot access this event.
base = 100
}
}
# On seconds thoughts, this is unbecoming...
option = {
name = ep1_decision.0101.c
# Return invested prestige.
hidden_effect = { add_prestige_no_experience = order_mass_eviction_decision_cost_value }
# & reset the cooldown.
remove_decision_cooldown = order_mass_eviction_decision
# No stress impact for cancelling out of the decision.
ai_chance = {
# AI cannot access this event.
base = 100
}
}
}
##################################################
# Grandiose Decor
# by Ewan Cowhig Croft
# 0111 - 0120
##################################################
# For technical reasons, this trigger can't be the same as exoticise_a_grand_hall_decision_list_builder_guts_trigger, but maintains (almost) technical parity with it.
scripted_trigger ep1_decision_0111_list_builder_guts_trigger = {
# Is the title presently active?
is_title_created = yes
# Filter out anyone already in the list.
NOT = { is_in_list = royal_courts_list }
# Check assorted holder things.
holder = {
# Filter out anyone who has the right rank but lacks a mechanical royal court.
has_royal_court = yes
this != root
# Can the two communicate?
in_diplomatic_range = root
}
}
scripted_effect ep1_decision_0111_apply_hall_effect = {
# Add mutual opinion for each non-AI involved with the interaction.
$CHOICE$ = {
if = {
limit = { is_ai = yes }
add_opinion = {
target = root
modifier = flattered_opinion
opinion = 30
}
}
}
if = {
limit = { is_ai = yes }
add_opinion = {
target = $CHOICE$
modifier = impressed_opinion
opinion = 30
}
}
# Gain a fraction of the CGV difference.
change_current_court_grandeur = $CHOICE$.ep1_decision_0111_proportional_cgv_gain_value
# Pay prestige proportional to how much CGV is gained.
add_prestige = $CHOICE$.ep1_decision_0111_proportional_prestige_cost_value
# Hand over a lil participation prestige for $CHOICE$ so that they know someone thinks their court is rad.
$CHOICE$ = {
send_interface_toast = {
title = ep1_decision.0111.toast.t
left_icon = root
# Give a little more for emperors doing this.
if = {
limit = { $CHOICE$.primary_title.tier >= tier_empire }
add_prestige = medium_prestige_gain
}
# Otherwise, just a few crumbs of prestige.
else = { add_prestige = minor_prestige_gain }
}
}
# Stress impact handled in the scripted effect, since it'll always be the same for each char.
stress_impact = {
architect = minor_stress_impact_loss
humble = medium_stress_impact_loss
arrogant = major_stress_impact_gain
}
}
# Arrange for a major room to be remodelled with decor inspired by a more grandiose culture.
ep1_decision.0111 = {
type = character_event
title = ep1_decision.0111.t
desc = ep1_decision.0111.desc
theme = court
left_portrait = {
character = root
animation = throne_room_conversation_4
}
lower_left_portrait = scope:option_1
lower_center_portrait = scope:option_2
lower_right_portrait = scope:option_3
immediate = {
# Build a list of suitable courts.
## We add the title rather than the characters to the list for a cleaner debug tooltip in-game.
every_empire = {
limit = { ep1_decision_0111_list_builder_guts_trigger = yes }
# Rack 'em up.
add_to_list = royal_courts_list
}
every_kingdom = {
limit = { ep1_decision_0111_list_builder_guts_trigger = yes }
# Rack 'em up.
add_to_list = royal_courts_list
}
# Then, filter through the list and grab appropriate options.
ordered_in_list = {
list = royal_courts_list
max = 4
check_range_bounds = no
order_by = {
# Use CGV as a base.
add = holder.court_grandeur_current
# Weight up for neighbouring realms.
if = {
limit = {
holder = {
OR = {
any_neighboring_and_across_water_realm_same_rank_owner = { this = root }
any_neighboring_and_across_water_top_liege_realm_owner = { this = root }
}
}
}
multiply = 5
}
}
if = {
limit = {
NOT = { exists = scope:option_1 }
}
holder = { save_scope_as = option_1 }
}
else_if = {
limit = {
NOT = {
holder = { this = scope:option_1 }
exists = scope:option_2
}
}
holder = { save_scope_as = option_2 }
}
else_if = {
limit = {
NOT = {
holder = { this = scope:option_1 }
holder = { this = scope:option_2 }
exists = scope:option_3
}
}
holder = { save_scope_as = option_3 }
}
}
}
# Scope:option_1 is a grand, grand place.
option = {
name = {
trigger = { scope:option_1.court_grandeur_current > root.court_grandeur_current }
text = ep1_decision.0111.a.greater_cgv
}
name = {
trigger = { always = yes }
text = ep1_decision.0111.a.lesser_cgv
}
trigger = { exists = scope:option_1 }
# Build a hall in the relevant scope's style.
ep1_decision_0111_apply_hall_effect = { CHOICE = scope:option_1 }
# Stress_impact block handled in the scripted effect.
ai_chance = {
# Generally equal likelihood for each option.
base = 100
# Otherwise, people want to model themselves after characters they like.
#opinion_modifier = { opinion_target = scope:option_1 }
}
}
# I find the architecture of scope:option_2 enthralling!
option = {
name = {
trigger = { scope:option_2.court_grandeur_current > root.court_grandeur_current }
text = ep1_decision.0111.b.greater_cgv
}
name = {
trigger = { always = yes }
text = ep1_decision.0111.b.lesser_cgv
}
trigger = { exists = scope:option_2 }
# Build a hall in the relevant scope's style.
ep1_decision_0111_apply_hall_effect = { CHOICE = scope:option_2 }
# Stress_impact block handled in the scripted effect.
ai_chance = {
# Generally equal likelihood for each option.
base = 100
# Otherwise, people want to model themselves after characters they like.
#opinion_modifier = { opinion_target = scope:option_2 }
}
}
# Perhaps a scope:option_3ikkan lounge?
option = {
name = {
trigger = { scope:option_3.court_grandeur_current > root.court_grandeur_current }
text = ep1_decision.0111.c.greater_cgv
}
name = {
trigger = { always = yes }
text = ep1_decision.0111.c.lesser_cgv
}
trigger = { exists = scope:option_3 }
# Build a hall in the relevant scope's style.
ep1_decision_0111_apply_hall_effect = { CHOICE = scope:option_3 }
# Stress_impact block handled in the scripted effect.
ai_chance = {
# Generally equal likelihood for each option.
base = 100
# Otherwise, people want to model themselves after characters they like.
#opinion_modifier = { opinion_target = scope:option_3 }
}
}
# These all seem quite foreign...
option = {
name = ep1_decision.0111.d
# Refund the gold paid; we mention this in a tooltip so that it's a bit less noticeable.
hidden_effect = { add_gold = var:exoticise_a_grand_hall_decision_refund_value }
custom_tooltip = ep1_decision.0111.d.tt
# Take the decision off cooldown.
remove_decision_cooldown = exoticise_a_grand_hall_decision
# No stress impact for cancelling out.
ai_chance = {
# If the AI has gotten this far, they should pick an option.
base = 0
}
}
after = {
# Whatever else happens, clear the refund value.
remove_variable = exoticise_a_grand_hall_decision_refund_value
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,483 @@
namespace = fund_inspiration
# Adventurer fights a bandit
# Adventurer travels through beast-infested terrain
# Adventurer fights a bandit
fund_inspiration.9000 = {
type = character_event
title = fund_inspiration.9000.t
desc = fund_inspiration.9000.desc
theme = war
left_portrait = {
character = scope:adventurer
animation = worry
}
right_portrait = {
character = scope:bandit
animation = throne_room_one_handed_passive_1
}
override_background = {
reference = wilderness_scope
}
cooldown = { years = 5 }
trigger = {
exists = scope:inspiration
scope:inspiration_owner = {
exists = var:adventure_destination
exists = var:adventure_type
NOR = {
has_character_flag = fund_adventure_inspiration_event_cooldown
}
exists = location
any_pool_character = {
province = scope:inspiration_owner.location
is_available_ai_adult = yes
}
}
}
immediate = {
scope:inspiration_owner = {
save_scope_as = adventurer
location.barony.title_province = { save_scope_as = background_wilderness_scope }
random_pool_character = {
province = location.barony.title_province
limit = {
is_available_ai_adult = yes
}
weight = {
base = 10
modifier = {
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = THIS }
add = 100
}
}
save_scope_as = bandit
}
}
}
option = {
name = fund_inspiration.9000.a
scope:adventurer = {
duel = {
skill = intrigue
target = scope:bandit
2 = {
desc = fund_inspiration.9000.a.critical_success
compare_modifier = {
value = scope:duel_value
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.a.critical_success
left_icon = scope:adventurer
scope:inspiration = { change_inspiration_progress = 2 }
scope:bandit = {
pay_short_term_gold = {
target = root
gold = medium_gold_value
}
}
hidden_effect = { # The adventurer also gains some gold!
scope:bandit = {
pay_short_term_gold = {
target = scope:adventurer
gold = medium_gold_value
}
}
}
}
}
}
8 = {
desc = fund_inspiration.9000.a.success
compare_modifier = {
value = scope:duel_value
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.a.success
left_icon = scope:adventurer
scope:inspiration = { change_inspiration_progress = 1 }
}
}
}
8 = {
desc = fund_inspiration.9000.a.failure
compare_modifier = {
value = scope:duel_value
multiplier = -1
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.a.failure
left_icon = scope:adventurer
scope:adventurer = {
increase_wounds_effect = { REASON = fight }
}
scope:inspiration = { change_inspiration_progress = -2 }
}
}
}
}
}
ai_chance = {
base = 4
modifier = {
add = scope:adventurer.intrigue
}
modifier = {
add = {
value = scope:bandit.intrigue
multiply = -1
}
}
}
}
option = {
name = fund_inspiration.9000.b
scope:adventurer = {
duel = {
skill = prowess
target = scope:bandit
1 = {
desc = fund_inspiration.9000.b.critical_success
compare_modifier = {
value = scope:duel_value
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.b.critical_success
left_icon = scope:adventurer
scope:adventurer = {
if = {
limit = {
NOR = {
has_trait = compassionate
ai_compassion >= high_positive_ai_value
}
}
hidden_effect = {
scope:bandit = {
death = {
death_reason = death_duel
killer = scope:adventurer
}
}
}
custom_tooltip = fund_inspiration.9000.b.boil_skull
scope:inspiration_owner = {
change_artifact_quality_effect = { AMOUNT = 4 }
}
root = {
hidden_effect_new_object = {
create_artifact_pedestal_human_skull_effect = {
OWNER = root
CREATOR = scope:adventurer
DESKULLED = scope:bandit
}
scope:newly_created_artifact = {
set_artifact_description = artifact_bandit_skull
}
}
}
}
else = {
scope:bandit = {
death = {
death_reason = death_duel
killer = scope:adventurer
}
scope:inspiration_owner = {
change_artifact_quality_effect = { AMOUNT = 4 }
}
scope:inspiration = { change_inspiration_progress = 1 }
}
}
}
}
}
}
11 = {
desc = fund_inspiration.9000.b.success
compare_modifier = {
value = scope:duel_value
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.b.success
left_icon = scope:adventurer
scope:adventurer = {
scope:bandit = {
increase_wounds_effect = { REASON = fight }
}
scope:inspiration_owner = {
change_artifact_quality_effect = { AMOUNT = 2 }
}
}
}
}
}
8 = {
desc = fund_inspiration.9000.b.failure
compare_modifier = {
value = scope:duel_value
multiplier = -1
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.b.failure
left_icon = scope:adventurer
scope:adventurer = {
increase_wounds_effect = { REASON = fight }
}
}
}
}
1 = {
desc = fund_inspiration.9000.b.critical_failure
compare_modifier = {
value = scope:duel_value
multiplier = -1
}
root = {
send_interface_toast = {
title = fund_inspiration.9000.b.critical_failure
left_icon = scope:adventurer
scope:adventurer = {
death = {
death_reason = death_duel
killer = scope:bandit
}
}
}
}
}
}
}
ai_chance = {
base = 4
modifier = {
add = scope:adventurer.prowess
}
modifier = {
add = {
value = scope:bandit.prowess
multiply = -1
}
}
}
}
option = {
name = fund_inspiration.9000.c
pay_short_term_gold = {
target = scope:bandit
gold = minor_gold_value
}
ai_chance = {
base = 8
modifier = {
factor = 2
ai_compassion >= medium_positive_ai_value
}
modifier = {
factor = 0.1
OR = {
has_trait = stubborn
has_trait = wrathful
has_trait = greedy
}
}
modifier = {
factor = 0
gold < 0
}
}
}
}
# Adventurer travels through beast-infested terrain
fund_inspiration.9100 = {
type = character_event
title = fund_inspiration.9100.t
desc = fund_inspiration.9100.desc
theme = war
left_portrait = {
character = scope:adventurer
scripted_animation = duel_wield_weapon
}
override_background = {
reference = wilderness_scope
}
cooldown = { years = 5 }
trigger = {
exists = scope:inspiration
scope:inspiration_owner = {
exists = var:adventure_destination
exists = var:adventure_type
NOR = {
has_character_flag = fund_adventure_inspiration_event_cooldown
has_trait = humble
has_trait = content
}
exists = location
}
}
immediate = {
scope:inspiration_owner = {
save_scope_as = adventurer
location.barony.title_province = { save_scope_as = background_wilderness_scope }
scope:adventurer = {
select_local_animal_effect = { TYPE = dangerous } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling
}
}
}
option = {
name = fund_inspiration.9100.a
scope:adventurer = {
duel = {
skill = learning
value = 8
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = 3.5
min = -49
}
desc = fund_inspiration.9100.a.success
root = {
send_interface_toast = {
title = fund_inspiration.9100.a.success
left_icon = scope:adventurer
scope:inspiration = { change_inspiration_progress = 2 }
}
}
}
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = -3.5
min = -49
}
desc = fund_inspiration.9100.a.failure
send_interface_toast = {
title = fund_inspiration.9100.a.failure
left_icon = scope:adventurer
root = {
scope:adventurer = {
increase_wounds_effect = { REASON = fight }
}
}
}
}
}
}
ai_chance = {
base = 4
modifier = {
add = scope:adventurer.learning
}
}
}
option = {
name = fund_inspiration.9100.b
scope:adventurer = {
duel = {
skill = prowess
value = 8
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = 3.5
min = -49
}
desc = fund_inspiration.9100.b.success
root = {
send_interface_toast = {
title = fund_inspiration.9100.b.success
left_icon = scope:adventurer
scope:inspiration_owner = {
change_artifact_quality_effect = { AMOUNT = 3 }
}
scope:inspiration = { change_inspiration_progress = 1 }
}
}
}
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = -3.5
min = -49
}
desc = fund_inspiration.9100.b.failure
root = {
send_interface_toast = {
title = fund_inspiration.9100.b.failure
left_icon = scope:adventurer
scope:adventurer = {
increase_wounds_effect = { REASON = fight }
random = {
chance = 25
custom_tooltip = fund_inspiration.9100.b.maimed
hidden_effect = {
maimed_in_battle_effect = yes
}
}
}
}
}
}
}
}
ai_chance = {
base = 4
modifier = {
add = scope:adventurer.prowess
}
}
}
option = {
name = fund_inspiration.9100.c
scope:inspiration = { change_inspiration_progress = -1 }
ai_chance = {
base = 4
modifier = {
factor = 2
ai_compassion >= medium_positive_ai_value
}
}
}
}

View file

@ -0,0 +1,146 @@
namespace = inspiration_system
##################################################
# Inspiration Generation
# Checks how many inspirations currently exist and, if there are not enough, generates new ones for pool characters.
# by Sean Hughes
# 0005
##################################################
inspiration_system.0005 = {
scope = none
hidden = yes
trigger = {
has_ep1_dlc_trigger = yes
num_world_inspired_characters_value < ideal_total_world_inspirations
}
immediate = {
set_local_variable = {
name = try_create_inspiration_attempts
value = max_new_inspirations_per_year_value
}
while = {
limit = {
AND = {
local_var:try_create_inspiration_attempts > 0
num_world_inspired_characters_value < ideal_total_world_inspirations
}
}
grant_new_inspiration_in_world_effect = yes
change_local_variable = {
name = try_create_inspiration_attempts
subtract = 1
}
}
}
}
##################################################
# Inspired Character Maintenance
# Every Royal Court owner occasionally checks guests who have an Inspiration and, if unsponsored, moves them to a different Royal Court
# by Sean Hughes
# 1001-1101
##################################################
inspiration_system.1001 = {
hidden = yes
trigger = {
has_ep1_dlc_trigger = yes
}
immediate = {
every_pool_guest = {
limit = {
exists = inspiration
NOR = {
# Inspiration is not currently being sponsored
inspiration = { exists = inspiration_sponsor }
# Has not arrived at our court in the last X months (defined in 00_ep1_script_values.txt )
has_character_flag = inspired_character_recent_arrival
}
}
if = {
limit = {
inspiration = {
days_since_creation > 3650
}
}
# Destroy our inspiration, since nobody seems interested in sponsoring it.
trigger_event = inspiration_system.1101
}
else = {
# Look for a new royal court to visit.
inspired_character_seek_out_new_royal_court_effect = yes
}
}
}
}
# After going an extended period of time without being recruited or having their Inspiration sponsored, characters lose it in order to make room for new Inspired characters in the pool.
inspiration_system.1101 = {
hidden = yes
immediate = {
destroy_inspiration = inspiration
move_to_pool = yes
# Unrealized potential is tough on people.
random_list = {
25 = {
add_trait = depressed_1
add_stress = minor_stress_gain
}
25 = {
trigger = { can_be_drunkard = yes }
add_trait = drunkard
add_stress = minor_stress_gain
}
25 = {
trigger = { can_be_hashishiyah = yes }
add_trait = hashishiyah
add_stress = minor_stress_gain
}
50 = {
add_stress = major_stress_gain
}
}
}
}
inspiration_system.1200 = { # Courtier becomes Adventurer
type = character_event
hidden = yes
trigger = {
scope:antiquarian_from_task ?= {
has_court_position = antiquarian_court_position
}
scope:adventure_target ?= {
is_physically_able_adult = yes
NOR = {
exists = inspiration
has_court_position = antiquarian_court_position
}
adventure_inspiration_average_skill_value >= medium_inspiration_skill
host ?= root
}
}
immediate = {
send_interface_toast = {
type = msg_court_inspiration
left_icon = scope:adventure_target
right_icon = scope:antiquarian_from_task
title = antiquarian_inspired_adventurer_message
desc = antiquarian_inspired_adventurer_effect
scope:adventure_target = {
create_inspiration = adventure_inspiration
}
}
}
}