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

Pancakelord

Lord of Pancakes
44 Badges
Apr 7, 2018
3.375
12.292
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Ancient Relics
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Imperator: Rome
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Imperator: Rome Deluxe Edition
  • Magicka: Wizard Wars Founder Wizard
  • Stellaris: Nemesis
  • Europa Universalis IV
  • Stellaris: Necroids
  • Sword of the Stars
  • Crusader Kings III
  • War of the Roses
  • Cities: Skylines
  • Stellaris: Federations
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Lithoids
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Sword of the Stars II
  • March of the Eagles
  • Darkest Hour
I remember trying to use @ Variables (declared elsewhere in this file) a while back, but the scripting engine wouldnt support it.
1629124919703.png

Have been having a look over the 3.0 - 3.03 change logs, but cant be certain, does anyone know if the above will now work? (and if not, if anyone's seen plans for it to work in LEM?)
Not a deal breaker, but using this would make it easier/neater to test things I'm working on.
 
Nope.

Do:
Code:
random_list = {
    1 = { set_variable = (...)1 }
    1 = { set_variable = (...)2  }
    ...
    1 = { set_variable =  (...)100 }
}
Courtesy of @corsairmarks .

Then do:
Code:
if = {
                limit = {
                    check_variable = {
                        which = variablename
                        value = 1
                    }
                }
                <effects>
                }
}
else_if = {
                limit = {
                    check_variable = {
                        which = variablename
                        value = 2
                    }
                }
                <effects>
                }
}
(...)
else_if = {
                limit = {
                    check_variable = {
                        which = variablename
                        value = 100
                    }
                }
                <effects>
                }
}

Stick it in the scripted_effect.

There are likely more ways around it.
 
  • 1
Reactions:
Nope.

Do:
Code:
random_list = {
    1 = { set_variable = (...)1 }
    1 = { set_variable = (...)2  }
    ...
    1 = { set_variable =  (...)100 }
}
Courtesy of @corsairmarks .

Then do:
Code:
if = {
                limit = {
                    check_variable = {
                        which = variablename
                        value = 1
                    }
                }
                <effects>
                }
}
else_if = {
                limit = {
                    check_variable = {
                        which = variablename
                        value = 2
                    }
                }
                <effects>
                }
}
(...)
else_if = {
                limit = {
                    check_variable = {
                        which = variablename
                        value = 100
                    }
                }
                <effects>
                }
}

Stick it in the scripted_effect.

There are likely more ways around it.
Ah figured as much, tried that not long after posting this, was hoping for something less clunky lol.
For now I've brute-force tested what I needed to (sticking Stellaris on an NVME was the best decision I've made in a while) but I hope they consider re-writing that trigger to support @ numbers.
 
  • 1Like
Reactions: