Questions Regarding Overrides & Their Modding

  1. I spotted several dozens of overrides at Democracy 4/data/overrides folder. It was full of *.ini files (and 2 *.txt files seemingly out of place). Most of them were adding perception modifiers but some of them (e.g. robot research grants ones) were actually modifying other simulation values. Why these modifiers are not included in the simulations or policies csv-format files? As examples of overrides modding? They just felt like unnecessary obfuscation.

  2. Is there any way I can include names with spacing like Uncompetitive Economy, Organised Crime, or Rail Strike from situations on equations? I’m not talking about displayed names in-game but identifiers (see below). Adding one of their names in an equation just doesn’t work. Equations such as "-0.3*(x+Uncompetitive Economy)" can’t actually call a value of Uncompetitive Economy.

#,Pollution,ECONOMY,,sit_icons_pollution,0,0.7,0.55,125,0+(1.0*x),0,0+(1.0*x),"_default_,0.5","Environment,0-(1.0*x)",#,"Environmentalist,-0.1-(0.3*x)","Health,0-(0.48*x)^1.5","Environmentalist_freq,0.1*(x^1.5)+0.1","AsthmaEpidemic,0.02+(0.02*x),2",,,,,,,,,,,,,
#,Uncompetitive Economy,ECONOMY,,sit_icons_uncompetitiveeconomy,0,0.6,0.4,0,0+(1.0*x),0,0+(1.0*x),"_default_,0.8","CorporationTax,0+(0.3*x)","WorkerProductivity,0-(0.7*x)","ImportTarrifs,-0.1-(0.3*x),2","Wages,-0.05+(x^2)/7",#,"GDP,0-(0.34*x)^1.52","Capitalist,-0.04-(0.06*x)",,,,,,,,,,,,
  1. I’ve found that policies like PrisonRegime or RoboticsResearch have two separated effects on a single simulation. And it seems robotics grants to unemployment links were deleted via overrides. Then, is it possible to add multiple effects from a single policy to a single simulation via overrides? As far as I know, modders should modify existing policies only with overrides. So if I want to do something similar with these examples, overrides are the only way.
4 Likes
  1. They are in that folder instead of where you would expect them purely because originally a lot of these files were in Democracy 3, and part of the electioneering expansion. Whether they are in the overrides folder or in the expected csv files has no impact on how they work, so I did not change their location, but there is no guarantee that I don’t finally get equally annoyed with this and move them :smiley:

  2. TBH that sounds like a horrible bug. I probably never realised that this could be a problem, because allowing arbitrary variable names in an equation was a relatively recent thing. I will look into it!

  3. This is a good point… i will investigate, but I suspect that the override code is juts searching for a host/target pair and then overwriting the first one it finds, so it may not be currently possible to add multiple effect from A->B with an override…

3 Likes

I see, regarding #2, I’ve already decided to introduce separate simulations in my modding project to implement some complicated behaviors. So if you are not planning to call these situation values with names in the basic game, it’s not an urgent matter.

2 Likes