Hello,
trying to add a new intent for activites and associated events.
My goal is to create an intent, which fires events offering opportunities to send courtiers to another court.
The intent seems to be working. I can pick any unlanded courtier in my court, who is also attending the event.
I created the following test event-
However, there are apparently issues with it- Because i doesn´t fire.
It´s supposed to choose a random attending ruler and save him as hiree_scope and my intent target as debute_scope. It then should fire a diplomacy challenge for my debute_scope and if it´s succesful debute_scope should move to the court of hiree_scope, fulfilling the intent.
Can somebody help me to troubleshoot whatever might be wrong?
trying to add a new intent for activites and associated events.
My goal is to create an intent, which fires events offering opportunities to send courtiers to another court.
The intent seems to be working. I can pick any unlanded courtier in my court, who is also attending the event.
Code:
debute_intent = {
icon = intent_matchmaking
on_invalidated = {
trigger_event = activity_system.0090
}
ai_targets = {
ai_recipients = dynasty
max = 10
}
# Handle target character invalidation
is_target_valid = {
scope:target = {
is_ai = yes
is_courtier_of = root
is_landed = no
}
}
on_target_invalidated = {
trigger_event = activity_system.0091
}
ai_will_do = {
value = 50
}
ai_target_score = {
value = 1
}
scripted_animation = {
animation = wedding_happy_cry
}
}
I created the following test event-
However, there are apparently issues with it- Because i doesn´t fire.
It´s supposed to choose a random attending ruler and save him as hiree_scope and my intent target as debute_scope. It then should fire a diplomacy challenge for my debute_scope and if it´s succesful debute_scope should move to the court of hiree_scope, fulfilling the intent.
Code:
namespace = debute
debute.0001 = {
type = activity_event
title = debute.0001.t
desc = {
desc = debute_event.0001.desc.intro
}
theme = wedding_ceremony_activity
left_portrait = {
character = root
animation = scheme
}
right_portrait = {
character = scope:debute_scope
animation = personality_rational
}
lower_center_portrait = scope:hiree_scope
cooldown = { years = 5 }
widget = {
gui = "event_window_widget_activity_intent"
container = "custom_widgets_container"
}
trigger = {
has_activity_intent = debute_intent #you're trying to matchmake someone
intent_target = { is_alive = yes } #they're not dead yet
}
weight_multiplier = {
base = 100
}
immediate = {
intent_target = { save_scope_as = debute_scope }
scope:activity = {
random_attending_character = {
limit = { is_ruler = yes
}
save_scope_as = hiree_scope
}
}
}
#introduce
option = {
name = debute.0001.a
duel = {
skill = diplomacy
target = scope:debute_scope
50 = { # success
compare_modifier = {
value = scope:duel_value
multiplier = 3.5
min = -49
}
modifier = {
add = 20
has_trait = gregarious
}
modifier = {
add = 10
attraction >= medium_positive_attraction
}
desc = debute.0001.a.success
send_interface_toast = {
title = debute_event.0001.a.success
left_icon = scope:debute_scope
right_icon = scope:hiree_scope
# Effect
root = { custom_tooltip = ep2_wedding.wedding_intent.success.tt }
scope:hiree_scope = { add_courtier = scope:debute_scope }
}
}
}
complete_activity_intent = yes
}
50 = { # fail
compare_modifier = {
value = scope:duel_value
multiplier = -3.5
min = -49
}
modifier = {
add = -20
has_trait = shy
}
desc = debute.0001.a.failure
send_interface_toast = {
title = debute_event.0001.a.failure
left_icon = scope:debute_scope
add_prestige = minor_prestige_loss
scope:hiree_scope = {
add_opinion = {
target = root
modifier = annoyed_opinion
opinion = -20
}
}
}
}
}
stress_impact = {
craven = medium_stress_impact_gain
patient = medium_stress_impact_gain
}
ai_chance = {
base = 100
modifier = {
factor = 0
OR = {
has_trait = craven
has_trait = patient
}
}
}
}
#Nahhh
option = {
name = debute.0001.b
ai_chance = {
base = 100
modifier = {
factor = 1.25
OR = {
has_trait = callous
has_trait = sadistic
}
}
}
}
}
Can somebody help me to troubleshoot whatever might be wrong?