Exponential Sliders?

 Junior Line Supervisor
 Posts: 13
 Joined: Tue May 13, 2014 9:38 pm
Exponential Sliders?
Seeing as policies are done with CSV, I assumed making something affected exponentially would work just fine (since online, it says CSV files can use the ^ function). I am having trouble with it, though, and would like to know: can I make a policy that affects group A at say, x^.75 rate? Or .4^x? Which one would work, if either? Is it just a formatting issue? Because it seems to me that this could unlock a whole bunch of cool policy paths  such as policies that raise a faction's support for some implementation, but if you take it too far, you lose that support.
Re: Exponential Sliders?
Hello everyone,
Please read first:
Democracy 3 official modding guide (by cliffski)
Section  Modding New Policies
http://www.positech.co.uk/democracy3/mo ... icies.html
Ok, how do I start?!
Talking about Policies. They are defined in policies.csv. Each line, starting with '#,' is one policy. (breakline turned off!)
Policies have a white icon on the main screen in the game.
Sliders are for Policies to adjust them freely by the player.
The Slider setting is 'x'.
Usually x can be set to any position between 0 = 0% = minimum = all the way to the left ,
and 1.0 = 100% = maximum = all the way to the right.
Policies have income(taxes) or cost(others) AND have outputs/effects.
The output/effects have/use functions/formulas.
The outputs use functions. Each effect has a name and a formula.
functions (examples):
1 to 0 to 1 :: static value
5*x or .2*x :: linear [math.]
x^2 or x^6 :: power [math.]
x^(1/2) or x^(1/6) :: root [math.] , radical [math.]
Usually all combined:
...,#Effects,"CrimeRate,0.16*(x^0.4),4","ViolentCrimeRate,0.10(0.20*x),3","Conservatives,0.10+(0.14*x)",,,,,,
(example sequence from policies.csv)
Usually, each formula gives an effect/output between 100% to 0%
OR +0% to +100% towards the named simulation graph. Simulation graphs / values are defined in simulation.csv
and have a blue icon on the main screen in the game.
The simulation graphs themselves have values between 0 = 0% to 1.0 = 100%, usually.
Working with and adjusting these formulas REQUIRE a scientific caculator, e.g. Windows Calc, scientific view.
Or better a math graph programm, where you put in a formula and it will draw the curve for you, for x=0 to 1.
This shows you how the curve bends (up/down) and for which xvalue the resulting y will be 50%, 10%, 90%.

b.t.w. everything needed is already possible.
There is no need for an exponential 'x'  in my eyes ;)
Cheers
Please read first:
Democracy 3 official modding guide (by cliffski)
Section  Modding New Policies
http://www.positech.co.uk/democracy3/mo ... icies.html
Ok, how do I start?!
Talking about Policies. They are defined in policies.csv. Each line, starting with '#,' is one policy. (breakline turned off!)
Policies have a white icon on the main screen in the game.
Sliders are for Policies to adjust them freely by the player.
The Slider setting is 'x'.
Usually x can be set to any position between 0 = 0% = minimum = all the way to the left ,
and 1.0 = 100% = maximum = all the way to the right.
Policies have income(taxes) or cost(others) AND have outputs/effects.
The output/effects have/use functions/formulas.
The outputs use functions. Each effect has a name and a formula.
functions (examples):
1 to 0 to 1 :: static value
5*x or .2*x :: linear [math.]
x^2 or x^6 :: power [math.]
x^(1/2) or x^(1/6) :: root [math.] , radical [math.]
Usually all combined:
...,#Effects,"CrimeRate,0.16*(x^0.4),4","ViolentCrimeRate,0.10(0.20*x),3","Conservatives,0.10+(0.14*x)",,,,,,
(example sequence from policies.csv)
Usually, each formula gives an effect/output between 100% to 0%
OR +0% to +100% towards the named simulation graph. Simulation graphs / values are defined in simulation.csv
and have a blue icon on the main screen in the game.
The simulation graphs themselves have values between 0 = 0% to 1.0 = 100%, usually.
Working with and adjusting these formulas REQUIRE a scientific caculator, e.g. Windows Calc, scientific view.
Or better a math graph programm, where you put in a formula and it will draw the curve for you, for x=0 to 1.
This shows you how the curve bends (up/down) and for which xvalue the resulting y will be 50%, 10%, 90%.

b.t.w. everything needed is already possible.
There is no need for an exponential 'x'  in my eyes ;)
Cheers
Re: Exponential Sliders?
Kumqwatwhat, Sat Jul 26, 2014 1:45 am, wrote:...  such as policies that raise a faction's support for some implementation, but if you take it too far, you lose that support.
use formula
+0.51*(x^6)
,"simuname,0.5(x^6),1",
it adds 0.5 / +50% support.
but if you go to x=89% * slider, the support is gone / +0%
if you go even higher, it becomes negative.
at x=100% slider, the support is 0.5 / 50% !
Cheers
____________________________________
* precisely calculated by inverse function:
(x^6) = 0.5 > 0.5^(1/6)=x
Who is online
Users browsing this forum: No registered users and 2 guests