Widget:YieldCalc: Difference between revisions

From Ara: History Untold Wiki
No edit summary
No edit summary
Line 44: Line 44:
   let H = C + G; // Add G to the actual amount of farms in the region
   let H = C + G; // Add G to the actual amount of farms in the region
   let Z = Number(Math.floor(A*B+B*5*H+5+(A+5*H)*(E/100)+(H-1)*5+A)); // Resulting production of a single farm
   let Z = Number(Math.floor(A*B+B*5*H+5+(A+5*H)*(E/100)+(H-1)*5+A)); // Resulting production of a single farm
   let Y = Z / 25; // Resulting food yield of that production of a single farm
   let Y = Math.floor(Z/25); // Resulting food yield of that production of a single farm
   let O = Z * C / 25; // Resulting food yield of that production of the entire region
   let O = Math.floor(Z*C/25); // Resulting food yield of that production of the entire region


   document.getElementById('outputvalue').innerText= Y;
   document.getElementById('outputvalue').innerText= Y;

Revision as of 02:27, 25 October 2024

This widget is used to display and calculate the yield with the values submitted by the user.

Usage: ‎{{#Widget:YieldCalc}}