Critical issue with variables

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

Iyur

icddppl
25 Badges
Apr 2, 2014
731
47
  • Crusader Kings II
  • Imperator: Rome
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines
  • Stellaris: Synthetic Dawn
  • Cities: Skylines Deluxe Edition
Greetings.
A lot of modders are really upset of variable's issue that has came from recent patch. The problem is that some previous variable's possibilities don't work properly after 2.0. What I mean - earlier we were allowed to use such expressions:
Code:
set_variable = { which = var1 value = 100 }
set_variable = { which = var2 value = var1 }
set_variable = { which = var3 value = 10 }
change_variable = { which = var3 value = var1 }
Now the 2nd row doesn't work at all and 4th is incorrect. This has a huge impact on our mods as now this is much harder to make complex estimations and operations. Of course, maybe we're able to find some hint or trick to solve this issues, but it really slows down the performance of the mods. For example, how it looks now to copy the value from one var to another:
Code:
# replacing set_variable = { which = var2 value = var1 }
while = {
    count = var1
    change_variable = { which = var2 value = 1 }
}
It's ugly, eh? And in this case it's very hard to write some code to deal with decimals.

So, we are really want to know, will pdx devs fix this issues in the next patches? And when. I've recently posted a bug report for this problem but it seems like it's not processed yet. I'm not complaining about that, because I understand that dev team have a lot of other crucial issues, especially around general gameplay stuff. But I want to emphasize again, that this is really important for modding community. This issues make the modding process really terrible for any complex and interesting idea and potentially decreasing the amount of good stuff for the game. @Wiz , @Jamor , @candyalien , maybe you can help us or tell something that will return our hope and moral.

P.S., this is not only my thoughts, other modders are really interested in solving this.
@ExNihil , @Waesche , @Caligula Caesar , @ViolentBeetle , @Shaggo and others.

To everyone: feel free to support this thread.
 
Last edited:
Variables are indeed very important for a lot of mods, having them not working properly is really problematic.
I hope it'll be fixed soon !
 
Thanks for posting this! I am only now starting to really use variables, but they are very useful and flexible - you can write very cool and complex things with them. So I hope this is easy to fix!
 
Wouldn't the following work?:
Code:
set_variable = { which = var1 value = 100 }
set_variable = { which = var2 which = var1 }
set_variable = { which = var3 value = 10 }
change_variable = { which = var3 which = var1 }
Or is that only available when modding in Europa Universalis?
 
Wouldn't the following work?:
Code:
set_variable = { which = var1 value = 100 }
set_variable = { which = var2 which = var1 }
set_variable = { which = var3 value = 10 }
change_variable = { which = var3 which = var1 }
Or is that only available when modding in Europa Universalis?
This were working earlier, before 2.0 patch.
 
Last edited:
This issue is really annoying.
I hope it will be fixed soon.
 
Thanks for bringing this up. We're currently looking into it, and should be fixed in a future patch.

edit: my thunder got stolen!
 
Sweet, I'm assuming this is holding @ExNihil back from 2.0 mod!

:), I'm waiting for this to be resolved before publishing some stuff, yes. But I'm continously working on it - assuming it will be fixed soon.