Space Engineers

Space Engineers

DEPRICATED (see description): Sector 15
Wartank  [developer] 21 Feb, 2015 @ 7:39am
The AI (3)
Station AI
This AI behaves as the captain of a station. A station AI is brought to live when the Commander ai has finished producing a station. The construction slot will create a station AI that is brought to live and will get a turn once every 60 seconds (just like the commander AI, note tough that those turns do not have to run synchronized, it is possible that the station AI gets a turn at every third second of the minute, where the commander gets his turn at every 45th second). When a station commander gets a turn it will check a few things. I pseudo code:
if (!hasDeployed) { Find_Free_Spot(MinRangeFromFirewall, MaxRangeFromFirewall); DeployStation(X,Y,Z); EndTurn; } else { if (LostAllControlSeats) { SelfDestruct(); EndTurn; } if (IsProducing) { ProductionTime - 1; if (ProductionTime == 0) { Deployship(StationLocation + 10); } } EndTurn; }

part 4: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/366011702/617328415064656762/
Last edited by Wartank; 21 Feb, 2015 @ 7:41am