Is there anything bugged or hidden about Unemployment?


From my gameplay experiences and modding attempts, I have been getting a vague feeling that unemployment is a bit too sticky. This time, I was trying to make a mod dealing with unemployment (Modding Idea - Employment Law). Then I realized that unemployment isn’t showing any visible difference however I adjust the policy slider. I even tried doubling (and tripling) its unemployment effect just to see how the simulation reacts but I wasn’t able to discern whether the changes in unemployment had been caused by these tests or by external factors. Anyway, it’s not showing normal behaviors. Even a -80% modifier made a little difference of -5 ~ -10% in the test runs.

Therefore, I wrote down all the modifiers affecting the unemployment and tried adding them up by my self. All the values have been collected in-game and were current value (not final value).

Default value of Unemployment = 100% (min 0, max 1, based on simulation.csv)
Positive modifiers to Unemployment = +72.64% (72.64+36.35+10.23+9+5.84+4.7+3.9+1.25+1.17+0.1+0.1)
Negative modifiers to Unemployment = -227.91% (-0.12-0.45-0.58-0.58-0.84-0.99-1.17-1.18-1.52-1.76-2.03-2.26-2.26-2.38-2.44-2.94-3.05-3.51-4.51-4.55-5.06-5.84-5.86-6.65-6.99-7.3-7.64-10.54-13.55-14.46-19.91-21.03-23.42-40.54)

And these figures don’t even include the unemployment effect of my mod policy. If there isn’t any hidden value influencing it, it should already be stuck deep in negative (-55.27%) instead of roaming around 20%.

Here are what I thought:

  1. At first, I thought that circular reference might have diffused some effects. Since lower unemployment means higher wages & lower productivity, it will eventually lead to lower GDP and then higher unemployment. So unemployment reduction may turn out to be weaker than expected in the end. However, GDP was at 100% all the time.
  2. Then I started suspecting my mod policy might not be working at all. Its effect formula is quite complicated and might have caused a bug which makes it seemingly working at the UI but not actually affecting stats. However, significantly inflating its effect (to the extent of reaching -80%) did made some difference, which was too small (5~10%p) for it though.

So I’m now thinking unemployment might not have been working properly. I did some manual calculation on it (as shown above) to check this. And it suggests that there is either a hidden modifier or a bug. Could you Cliff check if that’s the case?

fyi) contents below are my modding simulation & policy

,name,slider,flags,opposites,introduce,cancel,raise,lower,department,prereqs,mincost,maxcost,costfunction,cost multiplier,implementation,minincome,maxincome,incomefunction,incomemultiplier,nationalisation GDP percentage,,,,,,,,,,,,

bit of explanation

  • IndLabourEmployment collects some specific employment effects
  • IndLabourPastEmployment stores past records of employment value (IndLabourEmployment) by getting its value with 32 turns of inertia
  • IndLabourEmploymentFluct calculates the difference between the current & past employment values
  • IndLabourEmploymentLaw has a policy effect to unemployment and it is proportional with employment diff (IndLabourEmploymentFluct), negating unemployment changes by specific factors

Hi, Do you have all the mod files (including translations) and ideally a save game that shows stuff being wrong? You can email them to me at cliff AT positech dot co dot uk.
I can tell you now that there s nothing special about unemployment within the game code. It is modeled like any other blue circle value.

1 Like

Just sent an email with the title “Democracy 4 - Unemployment Issue” to @cliffski at As decribed in the mail, it was kinda okay at turn 0 but went wrong by quite a margin (more than 30%p discrepancy) when checked at turn 20.

Default value of Unemployment = 100% (min 0, max 1, based on simulation.csv)
Positive modifiers to Unemployment = +44.15% (20.45+8.25+7.33+3.3+3.24+1.18+0.2+0.2)
Negative modifiers to Unemployment = -140.33% (-0.25-0.3-0.44-0.47-0.73-0.93-0.97-1.33-2.01-2.42-2.81-2.88-3.74-4.01-4.68-4.91-5-5.21-5.65-6.46-11.69-14.73-16.85-18.5-23.36)
Expected value of Unemployment = 3.82%
Actual value of Unemployment = 36%

My modded policy had a very minimal effect of -0.44% at turn 20.

Hi @cliffski . I’m curious if there had been some breakthrough. I’m currently trying to create another mod (An Old Mod Idea - Bilateral Alliances with US) and again it seems calculation isn’t working as intended. When I adjust a positive input by +0.1(=+10%p) on a situation, its value rise only by 0.03(=3%p) or even less. Increasing step size still works but only to a limited extent. This time I actually tried breaking up a circular link but didn’t work.

+attached related situation code below


,,,prereqs,,positive,start trigger,stop trigger,cost,costfunction,income,incomefunction,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,