Feb 20th 2019, 23:21:11
How did you do this? Was it a particular government *and* some kind of tech?
Feb 20th 2019, 23:40:18
Feb 21st 2019, 0:38:29
Feb 21st 2019, 0:45:55
Feb 21st 2019, 1:32:16
Feb 21st 2019, 2:12:57
Feb 21st 2019, 2:23:49
Feb 21st 2019, 2:35:00
Feb 21st 2019, 2:49:16
Feb 21st 2019, 3:02:17
Feb 21st 2019, 3:25:05
Feb 21st 2019, 3:50:02
Feb 21st 2019, 3:51:01
Feb 21st 2019, 4:19:40
Feb 21st 2019, 7:16:05
Feb 21st 2019, 14:14:42
Feb 21st 2019, 14:37:22
<script type="text/javascript">
function checknum(number,techtype)
{
var tmp = number.value;
if(isNaN(tmp))
{
tmp = tmp.substring(0,(tmp.length-1));
number.value = tmp;
}
if(number.value<0)
{
number.value = 0 - tmp;
}
if(techtype != null)
{
if(number.value>basetech(techtype) && (techtype == 'mil' || techtype == 'med'))
{
number.value = basetech(techtype);
}
if(number.value>maxtechwithgov(techtype)&& (techtype != 'mil' && techtype != 'med'))
{
number.value = maxtechwithgov(techtype);
}
}
}
function updateall(val)
{
var techtypes=['mil','med','bus','res','agri','war','strat','weap','indy','spy','sdi'];
var i = 0;
while(i<=10)
{
calcpercent(techtypes[i]);
updatehtmlmaxtech(techtypes[i]);
i++;
}
}
function updatehtmlmaxtech(val)
{
var techid = 'max'+val;
document.getElementById(techid).innerHTML = Math.round(maxtechwithgov(val)*100)/100;
}
function maxtechwithgov(val)
{
var govbonus = document.tech.government.value.split(",");
return basetech(val) + (maxtech(val) - basetech(val))*govbonus[0];
}
function maxtech(val)
{
var maxtech = new Array();
maxtech['mil'] = 500/6;
maxtech['med'] = 200/3;
maxtech['bus'] = 180;
maxtech['res'] = 180;
maxtech['agri'] = 230;
maxtech['war'] = 5;
maxtech['strat'] = 140;
maxtech['weap'] = 150;
maxtech['indy'] = 160;
maxtech['spy'] = 150;
maxtech['sdi'] = 90;
return maxtech[val];
}
function c1(val)
{
if(val=='mil')
{
return 780;
}
if(val=='med')
{
return 1650;
}
else
{
return 192;
}
}
function c2(val)
{
if(val=='mil')
{
return 5.75;
}
if(val=='med')
{
return 4.62;
}
else
{
return 6.795;
}
}
function basetech(val)
{
if(val=='war')
{
return 0.2;
}
else if(val=='sdi')
{
return 1;
}
else
{
return 100;
}
}
function calcpercent(val)
{
var govbonus = document.tech.government.value.split(",");
var points = val+'points';
var percent = val+'percent';
var t = document.tech;
var decimals = basetech(val) + (maxtech(val)-basetech(val)) * govbonus[0]*(1-Math.exp(-govbonus[1]*t[points].value/(c1(val)+(c2(val)*t.land.value))));
t[percent].value = Math.round(decimals*100)/100;
}
function calcpoints(val)
{
var govbonus = document.tech.government.value.split(",");
var points = val+'points';
var percent = val+'percent';
var t = document.tech;
var percentage = parseFloat(t[percent].value);
if((val == 'mil' || val == 'med') && percentage == maxtechwithgov(val))
{
percentage = percentage + 0.001;
}
if((val != 'mil' && val != 'med') && percentage == maxtechwithgov(val))
{
percentage = percentage - 0.001;
}
var decimals = -Math.log( 1 - (percentage-basetech(val))/((maxtech(val)-basetech(val))*govbonus[0]) ) * (c1(val) + c2(val)*t.land.value) / govbonus[1];
if(decimals<0){decimals = 0;}
t[points].value = Math.round(decimals);
}
</script>
Feb 21st 2019, 18:17:00
Feb 21st 2019, 20:09:10