• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

SevenzZ1

Private
Jan 17, 2020
15
1
Devs still around here HELP!! This is ONE decision (of the many I made and they all have problems) that simply won't show up. Playable Characters (so pc or ai) should be able to change a child's lifestyle focus (struggle, humility, etc.) after it has been set. Player shouldn't be at war, child can be landed or not, but must be vassal or below of player. The player should have wealth of at least 25, is the dynasty head, and should have job traits that correspond to lifestyle focus (e.g. grey eminence characters can get kids with struggle focus to change to humility). It won't show up, please help. Everything is within targetted_decisions = {}

change_childs_focus_to_struggle = {
only_playable = yes
filter = realm
ai_target_filter = realm
ai_check_interval = 4

from_potential = {
is_playable = yes
has_dlc = "Zeus"
prisoner = no
is_incapable = no
is_adult = yes
dynasty_head = { character = FROM }
OR = {
trait = tough_soldier
trait = skilled_tactician
trait = brilliant_strategist
}
wealth = 25
}

potential = {
is_adult = no
age >= 7
age <= 10
NOR = {
character = FROM
has_character_flag = dynasty_head_imparted_guidance_child
has_character_flag = guardian_asked_to_change_focus
}
OR = {
has_focus = focus_ch_pride
has_focus = focus_ch_humility
has_focus = focus_ch_duty
has_focus = focus_ch_etiquette
has_focus = focus_ch_thrift
has_focus = focus_ch_faith
}
culture = FROM
religion = FROM
is_within_diplo_range = FROM
same_realm = FROM
is_vassal_or_below_of = FROM
dynasty = FROM
}

allow = {
is_within_diplo_range = FROM
same_realm = FROM
war = no
FROM = { wealth = 25 }
}

effect = {
set_character_flag = dynasty_head_imparted_guidance_child
if = {
limit = { liege = { lower_tier_than = COUNT } }
hidden_tooltip = {
clear_focus = yes
}
FROM = { wealth = -5 }
set_focus = focus_ch_struggle
break = yes
}
if = {
limit = { liege = { tier = COUNT } }
hidden_tooltip = {
clear_focus = yes
}
FROM = { wealth = -10 }
set_focus = focus_ch_struggle
break = yes
}
if = {
limit = { liege = { tier = DUKE } }
hidden_tooltip = {
clear_focus = yes
}
FROM = { wealth = -15 }
set_focus = focus_ch_struggle
break = yes
}
if = {
limit = { liege = { tier = KING } }
hidden_tooltip = {
clear_focus = yes
}
FROM = { wealth = -20 }
set_focus = focus_ch_struggle
break = yes
}
if = {
limit = { liege = { tier = EMPEROR } }
hidden_tooltip = {
clear_focus = yes
}
FROM = { wealth = -25 }
set_focus = focus_ch_struggle
break = yes
}
}
ai_will_do = {
factor = 1
modifier = {
factor = 0.5
FROM = { trait = tough_soldier }
}
modifier = {
factor = 0.1
NOT = { is_close_relative = FROM }
}
modifier = {
factor = 0.25
OR = {
father_even_if_dead = { any_sibling = { character = FROM } }
mother_even_if_dead = { any_sibling = { character = FROM } }
}
}
modifier = {
factor = 0.25
OR = {
any_sibling = { is_father = FROM }
any_sibling = { is_mother = FROM }
}
}
modifier = {
factor = 1.5
OR = {
is_grandchild_of = FROM
is_child_of = FROM
}
}
modifier = {
factor = 2
is_close_relative = FROM
is_heir = yes
}
modifier = {
factor = 0.5
is_heir = no
}
modifier = {
factor = 0.05
is_female = yes
}
modifier = {
factor = 0.25
FROM = { NOT = { wealth = 30 } }
}
modifier = {
factor = 0.5
FROM = { NOT = { wealth = 60 } }
}
modifier = {
factor = 0.1
FROM = { trait = greedy }
}
modifier = {
factor = 2
FROM = { trait = charitable }
}
modifier = {
factor = 0.5
FROM = { trait = content }
}
modifier = {
factor = 0.25
FROM = { trait = slothful }
}
modifier = {
factor = 0.25
trait = bastard
}
modifier = {
factor = 0
OR = {
trait = slow
trait = imbecile
trait = inbred
trait = dwarf
trait = tiny
trait = slothful
}
}
modifier = {
factor = 2
OR = {
trait = genius
trait = quick
trait = bright
}
}
modifier = {
factor = 0.25
OR = {
trait = weak
trait = delicate
trait = clubfooted
trait = hunchback
}
}
modifier = {
factor = 2
OR = {
trait = strong
trait = burly
trait = tall
trait = agile
trait = ambidextrous
trait = powerful_voice
trait = imposing
}
}
modifier = {
factor = 0
NOT = { martial = 3 }
}
modifier = {
factor = 1.5
martial = 5
}
modifier = {
factor = 2
martial = 7
}
modifier = {
factor = 0.5
OR = {
diplomacy = 7
stewardship = 7
intrigue = 7
learning = 7
}
}
modifier = {
factor = 0.5
martial < 5
OR = {
diplomacy = 5
stewardship = 5
intrigue = 5
learning = 5
}
}
modifier = {
factor = 0.25
martial < 4
OR = {
diplomacy = 5
stewardship = 5
intrigue = 5
learning = 5
}
}
modifier = {
factor = 0.25
martial < 6
OR = {
diplomacy = 7
stewardship = 7
intrigue = 7
learning = 7
}
}
modifier = {
factor = 2
martial = 8
}
modifier = {
factor = 0
OR = {
trait = idolizer
trait = timid
trait = craven
trait = frail
trait = indolent
}
}
modifier = {
factor = 2
FROM = {
OR = {
government = tribal_government
government = nomadic_government
}
}
}
}
}
 
1. When you post code on the forum, put it inside [code]...[/code] tags and indent it so it's readable. (Similarly, you can use [icode] tags for inline code, which is what I've used in this post.)

2. You have an awful lot of conditions in the potential and from_potential blocks. If any of these conditions evaluates to false, then the decision won't show up, and that's exactly the problem you describe. So, try moving all of the conditions to the allow block (and put always = yes in the potential blocks if they would otherwise be empty). This should force the decision to be always visible on every character, and you will be able to see which conditions are unexpectedly evaluating to false.

2a. In my opinion, it would be better if some of your potential and from_potential conditions were located in the allow block, so that players can see why they are unable to take the decision. (Instead of having to dive into the mod code or read the workshop page extremely carefully.)

3. Use the Validator to check that you haven't made any other mistakes in your mod. You didn't include the entire file, so maybe you're missing a } or something. Also, check the game's error.log file to see if your mod is throwing any errors that the Validator isn't catching.
 
Last edited: