AlcoholConsumption

I was trying to modify the alcohol tax in policies.csv (the main game file, not a mod) so that the negative effects to the different groups is proportional to the alcohol consumption.
This is the way the tobacco tax already works i.e. if there are no smokers, nobody is affected. I wanted to try and get the alcohol tax working the same.
However, the game keeps crashing if I use the AlcoholConsumption variable anywhere in the policies.csv file.
Has anybody tried this, or something like this, and been successful? Any tips on where I’m going wrong?

Here is my solution, for future reference:

It turns out that AlcoholConsumption is not the only variable that will crash the program if it is used in policies.csv :frowning:

Fortunately, with a lot of random testing, I discovered that if the AlcoholConsumption variable is put in the third spot, and only the third spot, the game won’t crash.

#Effects,“Poor,-0.2*(xAlcoholConsumption)","PovertyRate,0.2(xAlcoholConsumption)","Equality,-0.1(xAlcoholConsumption)","AlcoholConsumption,0-(0.4x),2”,

This makes the effects proportional to the consumption (like the tobacco tax does and the alcohol tax income is).

“Poor,AlcoholConsumption*(-0.2x)" crashes the game
"Poor,-0.2
(AlcoholConsumptionx)" crashes the game
"Poor,0-(0.2
x)AlcoholConsumption" crashes the game
"Poor,-0.2
(xAlcoholConsumption)" works as expected
and yet
"PovertyRate,0.23
(TobaccoUse*x)” works as expected, as do some of the other variables

This all seems a bit arbitrary, but, hi ho.