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

GarciaTor

Recruit
22 Badges
Jun 19, 2014
2
0
  • Stellaris: Leviathans Story Pack
  • Imperator: Rome - Magna Graecia
  • Prison Architect
  • Imperator: Rome
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Age of Wonders III
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines - After Dark
  • Magicka 2
  • Cities: Skylines
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Magicka
Hi, I'm not sure how to use variables, maybe someone could help me, please??? :) The original code is:

Code:
gov_pol.2 = {
    type = state_event
    title = "gov_pol.2.t"
    hidden = yes

    trigger = {
        exists = governor_or_ruler
    }

    weight_multiplier = {
        modifier = {
            add = {
                value = governor_or_ruler.finesse
                divide = 2
            }
        }
        ...
    }
    ...
}

And I wanna know if it is possible to use a variable instead like this:

Code:
gov_pol.2 = {
    ...
    set_variable = {
        name = new_var
        value = governor_or_ruler.finesse
    }

    weight_multiplier = {
        modifier = {
            add = {
                value = var:new_var
                divide = 2
            }
        }
        ...
    }
    ...
}
 
Last edited: