effect · add_opinion_modifier
Definition
- Supported scope:
COUNTRY - Supported target:
any
Description
Add opinion modifier(s) to target(s)
add_opinion_modifierCOUNTRYanyAdd opinion modifier(s) to target(s)
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
add_opinion_modifier is commonly used in diplomatic events, national focus completion, or decision triggers to add approval/disapproval modifiers toward specific nations. For example, it can boost mutual approval when treaties are signed, or impose negative sentiment on the victim nation after a declaration of war. The modifier must be predefined in the opinion_modifiers file; the script simply references the modifier name directly.
# After a nation completes a national focus, add a positive diplomatic impression to the target nation
complete_national_focus = GER_sign_treaty
immediate = {
GER = {
add_opinion_modifier = {
target = ITA
modifier = treaty_signed_positive
}
}
}
[add_relation_modifier](/wiki/effect/add_relation_modifier): Both serve bilateral relationship shaping; add_opinion_modifier affects opinion values, while add_relation_modifier applies rule-based diplomatic restrictions or bonuses. They are commonly used together in the same diplomatic event.[has_country_flag](/wiki/trigger/has_country_flag): Used to check whether a specific event or national focus has already been triggered, preventing duplicate stacking of the same modifier on the same target and avoiding numerical anomalies.[country_event](/wiki/effect/country_event): Diplomatic interactions often require notifying the other party. After adding an opinion modifier, immediately trigger a diplomatic event for the other nation, forming a complete interaction chain.[diplomatic_relation](/wiki/effect/diplomatic_relation): When adjusting diplomatic relationship types (such as non-aggression pacts or guarantees of independence), opinion modifiers are commonly written together with relationship adjustments in the same effect block, ensuring diplomatic status and approval values update synchronously.opinion_modifiers first: The game won't error, but the modifier silently fails to apply. Beginners often mistakenly assume the script runs correctly when in fact the approval changes nothing. Always ensure the modifier name matches the definition file exactly.add_opinion_modifier only applies the modifier to the target side—it only changes the current scope nation's opinion of the target. If mutual approval is needed, the effect must be called once under each nation's scope separately. Omitting one side results in one-sided diplomatic effects.