• 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.

Liggi

Lt. General
81 Badges
Mar 28, 2017
1.290
8.928
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Green Cities
  • Stellaris: Distant Stars
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings III
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Victoria 3 Sign Up
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Dharma
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
There seems to be various ways to check an empire's opinion against a flat number, or compare their relative opinion to another empire.

But what I'm trying to do is something like:

For <x empire>, save <y empire>'s opinion into a variable, say @opinion_of_x_empire

And then check to see if there's any other empire that <y empire> has a higher opinion of.

So if <y empire> has an opinion value of <x empire> of 20, but they like any other empire in the galaxy 50, it would return true.

Is there a way to achieve this?
 
You need the following effect:

Code:
export_trigger_value_to_variable - Exports the value of a trigger to a specified variable (so for num_pops, it'll export the number of pops).
export_trigger_value_to_variable = {
    trigger = pop_produces_resource
    parameters = { resource = energy } (optional: specify extra parameters for triggers with { }
    variable = <string> (this example will print the amount of energy the pop produces to a variable)
    rounded = yes (default: no)
}
Supported Scopes: megastructure planet country ship pop fleet galactic_object leader army ambient_object species pop_faction war federation starbase deposit sector archaeological_site first_contact spy_network espionage_operation espionage_asset agreement situation

And following trigger:

Code:
check_variable - Checks a variable for the country/leader/planet/system/fleet
check_variable = { which = <variable> value >=< <float>/<variable>/<scope.variable>/trigger:<trigger> }
Supported Scopes: megastructure planet country ship pop fleet galactic_object leader army ambient_object species pop_faction war federation starbase deposit sector archaeological_site first_contact spy_network espionage_operation espionage_asset agreement situation

or even

Code:
check_variable_arithmetic - Checks a variable for the scope if a certain amount of arithmetic is done to it (note: the variable's value is not changed by this trigger)
check_variable_arithmetic = {
    which = <variable>
    add/subtract/multiply/divide/modulo = <float>/<variable>/<scope.variable>/trigger:<trigger> (note: this line can be repeated as many times as desired)
    value <=> <float>/<variable>/<scope.variable>/trigger:<trigger> (the value to compare against)
}
Supported Scopes: megastructure planet country ship pop fleet galactic_object leader army ambient_object species pop_faction war federation starbase deposit sector archaeological_site first_contact spy_network espionage_operation espionage_asset agreement situation
if you want to do more complex things.

Export following trigger:
Code:
their_opinion - Checks target country's opinion value of the current country
their_opinion = { who = <target> value > 25/variable }
Supported Scopes: country

or other opinion triggers, depending on your choice. See https://github.com/OldEnt/stellaris-triggers-modifiers-effects-list
 
  • 1
Reactions: