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.5x^2) are processed as if they were: 0+(0.5x)^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:
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:
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:
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.5x^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