Modding new Voter Types

I’m really doing it this time. see…

Updates to come…

Ok it’s in and working, in a limited way. I want some modders feedback on the way I’ve done it, and any suggestions as to how to improve it. I also need some guinea pigs to give the mod-supporting version a try :smiley:

The new system supports just 3 extra voter types, it expands the block of strips in the middle to squeeze them in. Is that ok? or a bit too limiting?
Anyway, the new voter types are loaded as seperate text file from a new subdirectory under the mods dir. They use the same format as the votertypes.csv but in plain text.
BUT
I added a new field to votertpes.csv which is ‘opposite’. It’s no longer hard coded that socialists are the opposite of capitalists etc, but it’s in data, allowing for you add new groups that are opposites. Unfortunately you can change the opposites for existing groups without editing votertypes.csv.

So… the big problem was how to allow for new votertypes, without really hacking up all the simulation csv files to add new effects everywhere, making it a bit of a beast to release as a text-file only mod.
The solution is a new scriptable function:

CreateEffect("IncomeTax","Atheists",0-(0.2*x),4);

(it’s a silly example). So this creates an effect FROM income tax TO the new atheists group, with the given effect and inertia of 4.
So far so good, but WHERE can these run from?

tada!
The new mods/data/autorun scripts directory! bung any text file in here with any script and it will run at the start of a game (or when loading a game in).
So in THEORY, this means you can add up to 3 new votergroups to the game, AND effects from them and to them from everything else in the game, all within the mods dir (and thus easily installed).
Any questions? volunteers?

Cheers!

It’s a while since I did any modding of Democracy but it sound great. I especially like the new autorun directory. I’d be happy to test it for you and give you some feedback.

P.S. Some minor feedback before I even get to test it - would it be best to add the new line to the top rather than the bottom, as that would allow the “everyone” group to stay at the bottom right. It looks a bit funny at the moment to be almost at the bottom right but then to have an extra group of voters below it?

aha good point. I’ll fix that, then email you a link to the new build.

Hi, would it be possible to add some kind of slider to the interface to allow an unlimited amount of new Voter Groups to be added ?

If it would be too hard for you to do at this time, maybe include at least the option to add 6 new voter groups ,not 3. I think it is a big difference in case of voter groups.Three can be still limiting while you can possibly describe all sensible new unique groups available within a 6-group limit.

Also, will the normal CSV modding of the new voter groups still possible ( not using the new script functions ) ?

I don’t think I’ll have time this week to enlarge beyond 3, bit maybe in the future. As for the csv editing, yes it will be up to you which method to use, obviously the less mods fiddle with the core shipping game data, the better to avoid introducing bugs etc.

I just thought that the new autorun scripting system might be a good way to mitigate the “too-low starting support” flaw mentioned by some (the fact that too often you get very low poll values like 18.49% voters at the start of the game, while they should reasonably be over 50 percent just after winning the initial election). You could simply add several CreateGrudge commands to the autoscript , influencing Everyone and several other major votergroups, with values like ,0.4,0.8 or something similar. This way we can have the cosmetic effect of having high support just after the election, without influencing the real chances of winning the game much ( the effect would wear out quickly). Will commands like the CreateGrudge work in the autoscript ?

will we be able ot add votergorups to current policys?like potheads to nacrotics

and im willing to test :slight_smile:

yes you can add groups to existing policies, just by using the add effect stuff. essentially its the same as adding an effect or an influence to a policy, you just do it somewhere else.

Ok, this is now released in version 1.17, check the patch thread in the main Democracy 2 forum for details. I added in the USA mission too. It all works as listed here but is limited to THREE new voter groups at any one time, so you need to limit your mods to just three.
Any questions or feedback just let me know! Enjoy!

Or you could move “Everyone” to the upper left where most people start scanning any array of info.

Edit: Oops, I had several threads open and wrote without noticing that this isn’t one of the D3 ones. Still an idea though.

BTW, unlimited voter groups could be implemented (visually) with a scroll bar.