Is there anything bugged or hidden about Unemployment?

@cliffski

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

,,zone,def,min,max,emotion,icon,,,,,,,,,,,,,,,,,,,
#,IndLabourEmployment,NOICON,0.3,0,1,HIGHBAD,icons_unemployment,#,"GDP,-0.45+(0.5*x)^0.75","IndustrialAutomation,0.0-(0.4*x),10","PrivateEnergy,0+(0.09*x)","PrivateHealthcare,0+(0.07*x)","PrivateRail,0+(0.09*x)","PrivateSchools,0+(0.13*x)","PrivateTelecoms,0+(0.09*x)","PrivateWater,0+(0.09*x)","Technology,-0.12*(x^4),4","WorkerProductivity,0.08-(0.16*x),2","DriverlessCars,-0.03-(0.06*x)","AgricultureSubsidies,0.00+(0.17*x)","ChildcareProvision,0.01+(0.11*x)","ImportTarrifs,0.00+(0.10*x)","MinimumWage,-0.04*(x^2),8","TechnologyGrants,0.00+(0.05*x),6","VerticalFarmSubsidies,0.00+(0.09*x),3",#
#,IndLabourPastEmployment,NOICON,0.5,0,1,HIGHBAD,sit_icons_polarization,#,"IndLabourEmployment,0+(x-0.5),32",#,,,,,,,,,,,,,,,,
#,IndLabourEmploymentFluct,NOICON,0.5,0,1,HIGHBAD,sit_icons_polarization,#,"IndLabourEmployment,0+(1*x)","IndLabourPastEmployment,0-(1*x)",#,,,,,,,,,,,,,,,
,name,slider,flags,opposites,introduce,cancel,raise,lower,department,prereqs,mincost,maxcost,costfunction,cost multiplier,implementation,minincome,maxincome,incomefunction,incomemultiplier,nationalisation GDP percentage,,,,,,,,,,,,
#,IndLabourEmploymentLaw,employmentlaw,UNCANCELLABLE,,45,45,32,16,ECONOMY,,40,65,0+(1.0*x),,2,0,0,0+(1.0*x),,,#Effects,"Unemployment,x*(IndLabourEmploymentFluct-0.55)","WorkingWeek,0.03-(x+_inv_LabourLaws)^2.4*0.1","WorkerProductivity,0.05-(0.10*x)","Corruption,0.1*(1-x)^15,2","GigEconomy,0-(0.4*x),4","CorporateExodus,0.40*(x+0),8","_global_socialism,-0.06+(0.12*x),8","TradeUnionist_freq,-0.025*(0.5*_inv_LabourLaws)+x^3.5,8","Socialist,-0.05+(0.1*x)","Capitalist,0.03-(0.06*x)","SelfEmployed,0.05-(0.1*x)"

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 positech.co.uk. 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.