Okay, I am trying to simulate my AI to research. They start when the lab is build. TimtTriggers control when something is researched. It show no sign of them getting the techs. Here is the related code (NOTE: I am using survtech):
//Research orders and times for labs (times in ticks)
int BasicLabOrder[] = {2701, 2702, 2703, 2704, 2705, 2707, 2708};
int BasicLabTime[] = {1200, 1200, 1200, 1200, 1200, 1200, 1900};
int StandardLabOrder[] = {3304, 3305, 3401, 5051, 3408, 3405, 3302, 5310, 3851, 7206, 5202, 3901, 7102, 5317, 5116, 8319, 7103, 8203, 8320, 3201, 3202, 8306, 3878};
int StandardLabTime[] ={700, 1500, 1600, 1700, 1800, 2400, 1700, 1400, 1800, 2200, 2200, 2000, 1600, 1300, 1800, 1700, 2100, 1700, 2100, 2000, 1800, 2100, 1900};
int AdvancedLabOrder[] = {3402, 5601, 5110, 5111, 5405, 5201, 5508, 12201, 7104, 10204, 7212, 7405, 5701, 8201, 10303, 8407, 5599, 8309, 8321, 10306, 11999};
int AdvancedLabTime[] = {1500, 3300, 2200, 2100, 3900, 2400, 1800, 4900, 2100, 3100, 3800, 1800, 1400, 2900, 2900, 2100, 3300, 1500, 1700, 3100, 6500};
//Currents tech for each lab
scriptGlobal.CBasicLab = 0;
scriptGlobal.CStanLab = 0;
scriptGlobal.CAdvLab = 0;
//Bulid Basic Lab at start
scriptGlobal.Build1.RecordBuilding(LOCATION(17-1, 37-1), mapBasicLab, mapNone);
//Builds Standard Lab after "Earth Scientific Database"
scriptGlobal.StanLab = CreateResearchTrigger(1 , 1, 2708, 1, "BuildStandardLab");
SCRIPT_API void BuildStandardLab()
{
scriptGlobal.Build1.RecordBuilding(LOCATION(12-1, 39-1), mapStandardLab, mapNone);
scriptGlobal.StanLab.Destroy();
}
//Builds University and Advanced Lab after "Research Training Programs"
scriptGlobal.UniAdv = CreateResearchTrigger(1 , 1, 3305, 1, "BuildUniAdv");
SCRIPT_API void BuildUniAdv()
{
scriptGlobal.Build1.RecordBuilding(LOCATION(22-1, 42-1), mapUniversity, mapNone);
scriptGlobal.Build1.RecordBuilding(LOCATION(32-1, 16-1), mapAdvancedLab, mapNone);
for (scriptGlobal.j=19; scriptGlobal.j<21; scriptGlobal.j++)
scriptGlobal.Tuber1.RecordTube(LOCATION(scriptGlobal.j-1, 42-1));
for (scriptGlobal.j=13; scriptGlobal.j<31; scriptGlobal.j++)
scriptGlobal.Tuber1.RecordTube(LOCATION(scriptGlobal.j-1, 16-1));
scriptGlobal.UniAdv.Destroy();
}
//Checks for operational labs
scriptGlobal.HaveBasicLab = CreateOperationalTrigger(1, 1, 1, mapBasicLab, 1, cmpGreaterEqual, "BasicLab");
scriptGlobal.HaveStanLab = CreateOperationalTrigger(1, 1, 1, mapStandardLab, 1, cmpGreaterEqual, "StanLab");
scriptGlobal.HaveAdvLab = CreateOperationalTrigger(1, 1, 1, mapAdvancedLab, 1, cmpGreaterEqual, "AdvLab");
//creates the TimeTriggers for the techs
SCRIPT_API void BasicLab()
{
scriptGlobal.RBasicLab = CreateTimeTrigger(1, 0, BasicLabTime[scriptGlobal.CBasicLab], "BasicLabResearch");
}
SCRIPT_API void AdvLab()
{
scriptGlobal.RAdvLab = CreateTimeTrigger(1, 0, AdvancedLabTime[scriptGlobal.CAdvLab], "AdvLabResearch");
}
SCRIPT_API void StanLab()
{
scriptGlobal.RStanLab = CreateTimeTrigger(1, 0, StandardLabTime[scriptGlobal.CStanLab], "StanLabResearch");
}
//Marks the research complete after a certain time
SCRIPT_API void BasicLabResearch()
{
Player[1].MarkResearchComplete(BasicLabOrder[scriptGlobal.CBasicLab]);
scriptGlobal.CBasicLab +=1;
if (scriptGlobal.CBasicLab = 7)
scriptGlobal.RBasicLab.Destroy();
}
SCRIPT_API void StanLabResearch()
{
Player[1].MarkResearchComplete(StandardLabOrder[scriptGlobal.CStanLab]);
scriptGlobal.CStanLab +=1;
if (scriptGlobal.CStanLab = 23)
scriptGlobal.RStanLab.Destroy();
}
SCRIPT_API void AdvLabResearch()
{
Player[1].MarkResearchComplete(AdvancedLabOrder[scriptGlobal.CStanLab]);
scriptGlobal.CAdvLab +=1;
if (scriptGlobal.CAdvLab = 21)
scriptGlobal.RAdvLab.Destroy();
}