Jan 8th 2015, 15:55:15
So I just looked at the code. And just to give an idea of how off they are:
The Indy bots buy only res bus agri tech each below 140% which then change to 160% each (which I haven't fully examined the if/then condition he has there.: (currently doesn't buy Indy tech)
if($c->money > max($c->bpt,30)*$c->build_cost*10){ //buy_tech
//out("Try to buy tech?");
$spend = $c->money - $c->bpt*$c->build_cost*10;
if($c->pt_agri < 140)
buy_tech($c,'t_indy',$spend*1/2);
if($c->pt_bus < 140)
buy_tech($c,'t_bus',$spend*1/4);
if($c->pt_res < 140)
buy_tech($c,'t_res',$spend*1/4);
$spend = $c->money - $c->bpt*$c->build_cost*10;
if($c->pt_agri < 150)
buy_tech($c,'t_agri',$spend*1/2);
if($c->pt_bus < 160)
buy_tech($c,'t_bus',$spend*1/4);
if($c->pt_res < 160)
buy_tech($c,'t_res',$spend*1/4);
}
The rainbow bots buy any type of tech. So if the server made any rainbow bots this set, your medical tech could sell for 9999. It's all based on this randomizer code:
$mil = rand(0,25);
$med = rand(0,5);
$bus = rand(10,100);
$res = rand(10,100);
$agri = rand(10,100);
$war = rand(0,10);
$ms = rand(0,20);
$weap = rand(0,20);
$indy = rand(5,40);
$spy = rand(0,10);
$sdi = rand(2,15);
The casher bot buys res / bus and the farmer bot buys bus / res / agri. All their values are well below what they should be, but you get the picture.
In truth, all of this wouldn't have been discovered unless it was implemented on a live server. So for those of you who say don't add it until it's s finished product don't understand programming. It's all about trial and error and fixing those errors.
Perhaps an alternate solution would be to allow creation of a dual player / bot server, but again that's alot of work. So to get the most errors fixed, express seems like the most logical choice. The only other option may be to make the AI server identical to the express server and allow players to play there. Currently on the AI server it's a turn every 2 minutes., which is hard to xfer the same strategy to a different type of server.
Edited By: Celphi on Jan 8th 2015, 16:11:33
Resistance is futile. You will be assimilated.