Opinion modifiers are present in the folder common/opinion_modifiers which modify the opinion of AI empires to all other empires. They can apply based on empire policies, actions, or by being activated by triggers. The page responsible for non-modding explanations of the mechanic, its impact, and vanilla modifiers can be found at Diplomacy.
An opinion modifier's structure starts with its name, which is used when applying it via `add_opinion_modifier` and for localization. Each name must be a unique alphanumeric (including underscore) string without spaces. Inside the first block may come one of a few blocks or values which are:
Name |
Data Type |
Description
|
trigger |
Conditions block |
For applying an opinion modifier without assigning it explicitly
|
opinion |
Opinion block |
Describes the base value of the opinion modifier that can depend on circumstance
|
accumulative |
Boolean (yes/no) |
Determines whether the opinion modifier can add up upon subsequent assignments
|
unique |
Boolean (yes/no) |
Prevents reapplying of the opinion modifier
|
monthly |
Boolean (yes/no) |
Describes whether decay runs monthly or not
|
months |
Integer (+/-) |
??
|
min |
Integer (+/-) |
Determines the lowest value the opinion modifier can resolve itself to on its own
|
max |
Integer (+/-) |
Determines the highest value the opinion modifier can resolve itself to on its own
|
decay |
Decay block |
Describes how the opinion modifier's value can change over a period of time, if it reduces the modifier's value back to 0 it automatically removes the opinion modifier, decay disregards surpassing the base value and will still cancel the modifier
|
Opinion block[编辑 | 编辑源代码]
A block that is used for describing the base value of the opinion modifier, it accepts two types of values. First being base which is a unique base integer value for the opinion modifier when it is applied generally. Otherwise it may accept modifier blocks which can contain a positive or negative add, which adds its value to the base, or factor, which multiplies the base integer value, alongside a list of conditions describing when to augment the modifier. The scope of the block is the empire's opinion being modified, FROM is the one the opinion is targeted at.
Decay block[编辑 | 编辑源代码]
A block that is used for describing the changing value of the opinion modifier, it accepts two types of values. First being base which is a unique base integer value for modifying the modifier's existing value when applied generally. Otherwise it may accept modifier blocks which can contain a positive or negative add that adds to the decay base value alongside a list of conditions describing when to augment the changing value. The scope of the block is the empire's opinion being modified, FROM is the one the opinion is targeted at.
opinion_insult = {
opinion = {
base = -200
}
unique = yes
monthly = yes
decay = {
base = 2
}
}
opinion_demanded_subjectization = {
opinion = {
base = -20
modifier = {
factor = 10
is_country_type = awakened_fallen_empire
}
}
decay = {
base = 1
}
accumulative = yes
}
opinion_abandoned_apology = {
opinion = {
base = -35
}
decay = {
base = 3
modifier = {
add = 1
has_ethic = "ethic_xenophile"
}
modifier = {
add = 2
has_ethic = "ethic_fanatic_xenophile"
}
modifier = {
add = -1
has_ethic = "ethic_xenophobe"
}
modifier = {
add = -2
has_ethic = "ethic_fanatic_xenophobe"
}
}
}
Examples found at Stellaris/common/opinion_modifiers/00_opinion_modifiers.txt
References[编辑 | 编辑源代码]