Hey,
this script calculates the total production of your mines. It takes your bonus villages (wood, clay, iron & 30%), your set flags and a custom modifier into account.
Config:
// bonusProd needs to be changed to the factor desired. 20% Premium + 30% war efforts = 0.5
var bonusProd = 0.2,
//...