What changed?
"Fixes for Ck2" tells me nothing
See my previous post.
What changed?
"Fixes for Ck2" tells me nothing
Please post the error that Validator is giving you and ideally also a repro. The valdiator doesn't have the concept of a flank scope, though by the wiki flank/siege scopes are similar and validator does have siege scope and that already allows flank_has_tactic. So need to see exactly what error you are getting here to figure things out.flank_has_tactic is a valid condition inside flank scope (for example you can use it in normal events to check what the flank is doing, and you can use in the tactics definition files to make for example a tactic that only works after another one... I tested both, and both work.)
--- Error 1 of 1 ---
At <mod>\common\buildings\03_cotc_DM_military_z_buildings.txt [castle\ca_capital_factory_q_1\custom_modifier_text] (Line 761, column 3):
Invalid node "custom_modifier_text" in scope NormalBuildingDef (value is: unlocks_battleship_retinue_tt)
--- Error 1 of 1 ---
At <mod>\common\combat_tactics\melee_autogen_special.txt [boarding_encircled\trigger\OR\flank_has_tactic] (Line 1246, column 13):
Invalid node "flank_has_tactic" in scope BattleTrigger (value is: piercethrough_balanced)
Can you provide references about additive_exported_value_modifier, e.g. the wiki or changelogs or a paradox dev's post?Great update, checking if the "has_tactic" is correct made me find actual errors now
Now for the problems:
--- Error 1 of 1 ---
At <mod>\common\scripted_score_values\crisis_candidate_score.txt [personality_reasons\additive_exported_value_modifier] (Line 1174, column 5):
Invalid node "additive_exported_value_modifier" (value is: <a complex type>)
* called from <mod>\common\succession_voting\crisis_elections.txt [generic_election_rules\candidate_vote_score\personality_reasons] (Line 138, column 9)
--- Error 1 of 1 ---
At <mod>\common\council_positions\07_diplohawk.txt [diplohawk\selection\ai_diplomatic_ambition_score] (Line 16, column 3):
Invalid node "ai_diplomatic_ambition_score" in scope <anon> (value is: yes)
--- Error 1 of 1 ---
At <mod>\common\technology.txt [TECH_GROUP_ECONOMY\TECH_TERRAFORMING\8\custom_modifier_text] (Line 280, column 13):
Invalid node "custom_modifier_text" in scope TechLevelDef (value is: terraforming_4_tt)
--- Error 1 of 1 ---
At <mod>\common\scripted_score_values\crisis_scripted_score_values.txt [highest_prestige_piety_and_wealth\additive_exported_value_modifier] (Line 51, column 2):
Invalid node "additive_exported_value_modifier" (value is: <a complex type>)
* called from <mod>\common\landed_titles\landed_titles.txt [e_terran_confederation\gain_effect\if\if\e_terran_confederation\any_claimant\score_value\highest_prestige_piety_and_wealth] (Line 72, column 26)
As far as I know all those work fine.
it seems validator doesn't support additive_exported_value_modifier at all.
additive_exported_value_modifier
.common/scripted_score_values/01_scripted_score_values_papal_ai_behavior.txt
. However, they're all basically the same code with only extremely minor variations between the 24. Here is a pair of them in ask_for_excommunication_chance
:#Influence over Cardinals.
additive_exported_value_modifier = {
localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
factor = 2
max = 45
value = num_vassals_with_minor_title
who = ROOT
key = title_cardinal
}
additive_exported_value_modifier = {
localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
factor = 2
max = 45
value = num_vassals_with_minor_title
who = ROOT
key = title_fraticelli_cardinal
}
- Added additive_exported_value_modifier, which lets you use an exportable value as a modifier. Example:
additive_exported_value_modifier = {
trigger = { some triggers } # Uses current scope, *not* "who"
localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
factor = 5 # What to multiply by
max = 45 # The max value, optional
min = 0 # The min value, optional
value = num_vassals_with_minor_title # The export to use
who = ROOT # Who to base it on
key = title_cardinal # Optional key, as when using the export effect
}
value
can indeed be any quantity that you can export to a variablekey
seems to only really work with num_vassals_with_minor_title
trigger
blockadditive_exported_value_modifier
will only work as part of an entry in scripted_score_values
. It will not work if you just put it directly inside a weight, factor, ai_will_do, etc. block, you have to put it in a scripted score value, even if it ends up being the only entry in a given scripted score value.additive_exported_value_modifier
stuff is at the very end, where the negative score that a candidate gets for being too old increases linearly depending on their age, starting from 50 for most electors and 40 for younger ones.emf_succession_voting_candidate_age_score = {
additive_modifier = {
value = -30
localisation_key = tooltip_feudal_elector_vote_baby
NOT = { character = FROM }
FROM = { NOT = { age = 6 } }
}
additive_modifier = {
value = -15
localisation_key = tooltip_feudal_elector_vote_child
NOT = { character = FROM }
FROM = {
age = 6
NOT = { age = 12 }
}
}
additive_modifier = {
value = -10
localisation_key = tooltip_feudal_elector_vote_child
NOT = { character = FROM }
FROM = {
age = 12
NOT = { age = 16 }
}
}
additive_modifier = { #Still too young for older rulers
value = -10
localisation_key = tooltip_feudal_elector_vote_youngster
NOT = { character = FROM }
age = 30
FROM = {
age = 16
NOT = { age = 25 }
}
}
additive_modifier = {
value = -10
localisation_key = tooltip_feudal_elector_vote_youngster
NOT = { character = FROM }
age = 40
FROM = {
age = 25
NOT = { age = 35 }
}
}
additive_exported_value_modifier = { #Or too old for younger rulers.
NOT = { character = FROM }
NOT = { age = 40 }
FROM = {
age = 40
NOT = { age = 50 }
}
localisation_key = tooltip_feudal_elector_vote_oldtimer
factor = -0.25
value = age
who = FROM
}
additive_exported_value_modifier = { #Or simply too old overall.
NOT = { character = FROM }
FROM = { age = 50 }
localisation_key = tooltip_feudal_elector_vote_decrepit
factor = -0.3
min = -30
value = age
who = FROM
}
}
emf_succession_voting_candidate_prestige_score = {
additive_exported_value_modifier = {
NOT = { character = FROM }
FROM = { prestige <= -20 }
localisation_key = tooltip_feudal_elector_vote_prestige
factor = 0.05
value = prestige
who = FROM
}
additive_exported_value_modifier = {
NOT = { character = FROM }
FROM = { prestige = 100 }
localisation_key = tooltip_feudal_elector_vote_prestige
factor = 0.01
value = prestige
who = FROM
}
additive_exported_value_modifier = {
NOT = { character = FROM }
FROM = { dynastic_prestige = 20 }
localisation_key = tooltip_feudal_elector_vote_dynastic_prestige
factor = 0.05
max = 20
value = dynastic_prestige
who = FROM
}
additive_modifier = {
value = -100
localisation_key = tooltip_feudal_elector_vote_too_little_dynastic_prestige
NOR = {
character = FROM
dynasty = FROM
emf_is_parent_dynasty_of_ROOT_FROM = yes
emf_is_cadet_dynasty_of_ROOT_FROM = yes
}
FROM = {
trigger_if = {
limit = { ROOT_FROMFROM = { tier = EMPEROR } }
dynastic_prestige < 40
}
trigger_else_if = {
limit = { ROOT_FROMFROM = { tier = KING } }
dynastic_prestige < 20
}
trigger_else = {
dynastic_prestige < 10
}
}
}
}
# additive_exported_value_modifier stuff needs to be present as a scripted score value for game to not bug out
emf_half_of_fertility_score_value = {
additive_exported_value_modifier = {
factor = 50
value = fertility
who = THIS
}
}
# additive_exported_value_modifier stuff needs to be present as a scripted score value for game to not bug out
emf_FROM_fertility_score_value = {
additive_exported_value_modifier = {
factor = 100
value = fertility
who = FROM
}
}
custom_tooltip = {
text = emf_ctt_can_cause_pregnancy_FROM
if = {
limit = {
fertility > 0
is_pregnant = no
FROM = {
fertility > 0
is_pregnant = no
}
}
random = {
chance = 0
emf_half_of_fertility_score_value = yes
random = {
chance = 0
emf_FROM_fertility_score_value = yes
impregnate_effect = yes
}
}
}
}
Right, I just wonder why not put it inside the modifier block? If there's no difference why not put it inside instead of adjacent? (validator does accept inside the modifier block; it should at least)Custom modifier text can go anywhere that accepts modifiers as far as I know.
As for documentation for additive_exported_value_modifier... there isn't any execept a very brief mention on changelog.
The person that most know how it works aside from Paradox Employees seemly is @Delnar_Ersike
No, but I have run it before in an emulator like WINE.Is there a mac version/equivalent
k tyNo, but I have run it before in an emulator like WINE.
Use validatorSettings.txt, and turn on `AddFlag = NoCheckKey` which you can find in the file.Is there any way to get the validator to ignore stuff regarding localization keys? i.e. the "... is not a valid LocalizationKey" and "... is not a valid Key or NamingInfo"?