Just spent (wasted) a whole night trying to figure out why my UI code is not adding things up correctly. Basic maths stuff, but using decimal values (i.e. 0.04). Turns out after some reading that LUA has an issue with rounding numbers properly, thus some randomness sneaks in that results in values shifting a few digits. What may be displayed as a total value, does not equal its individual parts when displayed in a UI screen. As the image below shows for Population Eligible For Conscription, the 3 individual values (27479820, 41223988 and 412223) do not add up to the total (69116032) which is a variable in the code which sums those three values. All I know is that the third entry (classes 1924-1927) uses a decimal value (0.04) to get its result via the math.ceil function.