The way that the game parses exponents is incorrect. They incorrectly include the previous term of the equation even through parentheses.

Equations like: 0+(0.5*x^2) are processed as if they were: 0+(0.5*x)^2

Same with addition: 0+(0.5+x^2) is processed as if it was: 0+(0.5+x)^2

Parentheses: 0+(0.5+(x^2)) is processed as if it was: 0+(0.5+x)^2

Take this example policy:

#,Test_1,default,0,0,0,0,FOREIGNPOLICY,20,200,0+(1.0*x),0,0,500,0+(1.0*x),#Effects,â€śPatriot,0.5+(0*x)","Capitalist,0+(0.5*x^2)â€ť,â€śStateEmployees,0+(0.5*(x^2))â€ť,â€śSocialist,0+(0.5*x^4)","Environment,0+(0.5*(x^4))â€ť,â€śConservatives,0+(0.1+(x^4))â€ť,â€śFarmers,0.1+(0+(x^4))â€ť,â€śUnemployment,(x^4)+0.1â€ť,â€śForeignRelations,(0.1)+x^4â€ť,â€śBusinessConfidence,(0.1)+(x^4)â€ť,â€śEnvironmentalist,0+(0.840896415254*(x^4))â€ť,â€śCorruption,0+(-0.1591+(x^4))â€ť

The first 5 terms should all be equal to 0.5 when x = 1 as shown in this graph:

But this is not the case in the game: (look at Patriot though The Environment)

The next 5 show that the same is true for addition as well. They should all be equal to 1.1 when x=1:

But that is still not the case: (look at Conservatives though Business Confidence)

This issue also causes innocent lines like:

-0.1+(-0.5*x^0.5)

to crash the game as it incorrectly causes a root of a negative number.

(As seen in my previous post:[Bug 1.126] - Game crash when multiplying an exponent with a negative number )

Also incidentally adding both before AND after the exponent also causes a crash:

(0+(x^4))+0.1

Iâ€™m guessing this is an unrelated separate issue.

All is not lost however! For the time being mod makers can use this workaround:

Instead of writing: 0+(0.5*x^4)
Just calculate and use the appropriate root of the constant that you want: 0+(0.840896415254*(x^4))

This will create an identical curve to the one you originally wanted:

And the final 2 entries show that this works in game: (Enviornmentalist and Corruption)

But please donâ€™t let this temporary workaround stop you from fixing the bug cliffski