In this save, I just received event 100070. I selected option B, the tooltip for which stated it would add the Zealous trait and remove the Cruel trait. As can be seen in the screenshot below, the Zealous trait was added, but the Cruel trait was not removed.
This is the code for the event in question:
The event can be found in friends_rivals_events.txt.
Here is the autosave from before the event triggered.
I believe this occurred because the part of the event that is supposed to remove the Cruel trait checks the number of traits the character has, and does not remove the trait if the character has five or more traits. As the addition of the Zealous trait brought my character up to five traits, it could not remove the Cruel trait as it was supposed to. This unneeded check is also present on the other removal effects in this event, and likely in other events as well. Why check to make sure that the character does not have too many traits when removing one?
This is the code for the event in question:
Code:
### I can't stand someone! ###
character_event = {
id = 100070
desc = EVTDESC100070
picture = GFX_evt_child_bully
prisoner = no
min_age = 11
max_age = 16
trigger = {
NOT = {
num_of_friends = 2
}
NOT = {
num_of_rivals = 2
}
OR = {
trait = cruel
trait = wroth
trait = envious
}
host = {
any_courtier = {
prisoner = no
OR = {
AND = {
ROOT = {
is_female = yes
}
is_female = yes
}
AND = {
ROOT = {
is_female = no
}
is_female = no
}
}
age = 11
NOT = {
age = 16
}
at_location = ROOT
NOT = {
sibling = ROOT
}
NOT = {
num_of_friends = 2
}
NOT = {
num_of_rivals = 2
}
NOT = {
is_friend = ROOT
}
NOT = {
is_rival = ROOT
}
}
}
}
mean_time_to_happen = {
months = 80
modifier = {
factor = 2
trait = honest
}
modifier = {
factor = 0.5
trait = deceitful
}
modifier = {
factor = 0.5
intrigue = 5
}
modifier = {
factor = 2
NOT = { intrigue = 5 }
}
}
option = {
name = EVTOPTA100070
host = {
random_courtier = {
limit = {
prisoner = no
OR = {
AND = {
ROOT = {
is_female = yes
}
is_female = yes
}
AND = {
ROOT = {
is_female = no
}
is_female = no
}
}
age = 11
NOT = {
age = 16
}
at_location = ROOT
NOT = {
sibling = ROOT
}
NOT = {
num_of_friends = 2
}
NOT = {
num_of_rivals = 2
}
NOT = {
reverse_opinion = { who = ROOT value = -10 }
}
NOT = {
is_friend = ROOT
}
NOT = {
is_rival = ROOT
}
}
add_rival = ROOT
character_event = {
id = 100071
days = 1
random = 3
tooltip = EVTTOOLTIP100071
}
}
}
}
option = {
name = EVTOPTB100070
if = {
limit = {
NOT = {
num_of_traits = 5
}
NOT = {
trait = zealous
}
}
add_trait = zealous
}
if = {
limit = {
NOT = {
num_of_traits = 5
}
trait = wroth
NOT = {
trait = envious
}
}
remove_trait = wroth
}
if = {
limit = {
NOT = {
num_of_traits = 5
}
trait = cruel
NOT = {
trait = wroth
}
}
remove_trait = cruel
}
if = {
limit = {
NOT = {
num_of_traits = 5
}
trait = envious
NOT = {
trait = cruel
}
}
remove_trait = envious
}
}
option = {
name = EVTOPTC100070
host = {
random_courtier = {
limit = {
prisoner = no
OR = {
AND = {
ROOT = {
is_female = yes
}
is_female = yes
}
AND = {
ROOT = {
is_female = no
}
is_female = no
}
}
age = 11
NOT = {
age = 16
}
at_location = ROOT
NOT = {
sibling = ROOT
}
NOT = {
num_of_friends = 2
}
NOT = {
num_of_rivals = 2
}
NOT = {
is_friend = ROOT
}
NOT = {
is_rival = ROOT
}
}
character_event = {
id = 100072
days = 1
random = 3
tooltip = EVTTOOLTIP100072
}
}
}
}
}
The event can be found in friends_rivals_events.txt.
Here is the autosave from before the event triggered.
I believe this occurred because the part of the event that is supposed to remove the Cruel trait checks the number of traits the character has, and does not remove the trait if the character has five or more traits. As the addition of the Zealous trait brought my character up to five traits, it could not remove the Cruel trait as it was supposed to. This unneeded check is also present on the other removal effects in this event, and likely in other events as well. Why check to make sure that the character does not have too many traits when removing one?
Upvote
0