Random variable

Is there a way to add randomness into equations?

There is a random variable in event triggers, but I didn’t find anything similar for input/output effects.


Well, I have never used any
(special) random functions
for my Mod building, yet.

But, you could experiment with following 2 functions
from my tests:

#,RandomizerTest5,Randomizer Simu Test5,"Random Simu Function",TAX,0,0,1,UNKNOWN,icons_environment.dds,#,"_random_,0.5+(1000*x)"

#,RandomizerTest6,Randomizer Simu Test6,"Random Simu Function",TAX,0,0,1,UNKNOWN,icons_environment.dds,#,"_random_,0.5+(0.001*x)"

2 pictures here:

If you replace ,TAX, with ,HIDDEN, then this item is hidden.
It will not show on Main Screen, not on Changes Screen
and not as a named input in the inputs list of a target item.

But, you can still use it as (secret/hidden) outputs/inputs
to other items. ( Example here: “Environmentalist,-0.4+(0.8*x)” )

I have not tested everything
nor tried these:


Maybe these work even better.

As an alternative, for long time curve effects, you could also use
these slow alternating / oscillating functions:

And, as you mentioned, event random triggers
and single voter effects are RANDOM, too.

Cheers and good luck :slight_smile:

Please read the Democracy 3 official modding guide (from cliffski),
especially sections basics and simulations!

Always make backups of original data files, first!

These 2 functions above are Simu-items and need to be added into a simulation.csv-file.