semperfi: Merge much of the differences between the tech branches back together to make them easier
manage dynamically and also create more of them in the future. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10860 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
4f5775a15f
commit
3490654502
|
@ -85,26 +85,26 @@
|
|||
private int me; // player for this instance.
|
||||
public int tileExpand; // rate of exploration
|
||||
|
||||
public int numScouts[TECHS],maxScouts[TECHS]; // aim for...
|
||||
public int numScouts,maxScouts; // aim for...
|
||||
public int numDefenders[TECHS],maxDefenders[TECHS];
|
||||
public int numAttackers[TECHS],maxAttackers[TECHS];
|
||||
public int numCyborgs[TECHS],maxCyborgs[TECHS];
|
||||
public int numCyborgs,maxCyborgs;
|
||||
|
||||
public BODY bugBody, viperBody, cobraBody, scorpionBody, leopardBody, pythonBody, retributionBody, tigerBody, vengeanceBody, wyvernBody, dragonBody;
|
||||
public PROPULSION vtolPropulsion, trackPropulsion, wheelPropulsion, hoverPropulsion, halftrackPropulsion;
|
||||
public WEAPON atWeapon[5], asWeapon[5], mdWeapon[5];
|
||||
public int numAtWeapons, numAsWeapons, numMdWeapons;
|
||||
|
||||
public int branchDefault,branchVTOL,techCount[TECHS],maxVtolFacs[TECHS],maxIdleRes[TECHS],
|
||||
maxVTOLs[TECHS],numVtolTargets,vtolTargetWeight[10],numRebuildStat[TECHS];
|
||||
public int branchDefault,branchVTOL,techCount[TECHS],maxVtolFacs[TECHS],maxIdleRes,
|
||||
maxVTOLs[TECHS],numVtolTargets,vtolTargetWeight[10],numRebuildStat;
|
||||
public RESEARCHSTAT tech[TECHS][30]; //technology for different research branches
|
||||
public STRUCTURESTAT vtolTarget[10],rebuildStat[TECHS][2];
|
||||
public STRUCTURESTAT vtolTarget[10],rebuildStat[4];
|
||||
|
||||
// structures
|
||||
private int baseX,baseY,minx,miny,maxx,maxy;
|
||||
public int numStructs,numIncendrys,numDefStructs,numExtraStructs[TECHS],numWallWeaps,numBaseStruct,numLightCyborgs,numFundamental;
|
||||
public int numStructs,numIncendrys,numDefStructs,numWallWeaps,numBaseStruct,numLightCyborgs,numFundamental;
|
||||
private STRUCTURESTAT structChoice[5];
|
||||
public STRUCTURESTAT incendrys[8],structs[13],defStructs[26],extraStructs[TECHS][6],wallWeaps[11];
|
||||
public STRUCTURESTAT incendrys[8],structs[13],defStructs[26],wallWeaps[11];
|
||||
public STRUCTURESTAT sensorTower,wall,cornerWall,resLab,powGen,playerHQ,lassat,factory,derrick,cybFactory,
|
||||
vtolDefStruct[5],vtolPad,vtolFactory,uplink,baseStruct[8];
|
||||
public STRUCTURESTAT powModule,facModule,resModule,vtolModule;
|
||||
|
@ -1658,7 +1658,7 @@ event droidBuiltAssign(droidBuiltTr)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(scoutGroup.members < numScouts[curTech])
|
||||
if(scoutGroup.members < numScouts)
|
||||
{
|
||||
groupAddDroid(scoutGroup, droid);
|
||||
}
|
||||
|
@ -1672,7 +1672,7 @@ event droidBuiltAssign(droidBuiltTr)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(scoutGroup.members < maxScouts[curTech])
|
||||
if(scoutGroup.members < maxScouts)
|
||||
{
|
||||
groupAddDroid(scoutGroup, droid);
|
||||
}
|
||||
|
@ -2032,7 +2032,7 @@ function bool needTank()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if((scoutGroup.members < maxScouts[curTech]) or (maxScouts[curTech] == UNLIMITED))
|
||||
if((scoutGroup.members < maxScouts) or (maxScouts == UNLIMITED))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -2090,7 +2090,7 @@ function void factoryBuildDroid(STRUCTURE _factory)
|
|||
event cyborgFactoryEvent(cyborgFactoryEventTr)
|
||||
{
|
||||
|
||||
if(not ((defendGroup.members < maxCyborgs[curTech]) or (maxCyborgs[curTech] == UNLIMITED)))
|
||||
if(not ((defendGroup.members < maxCyborgs) or (maxCyborgs == UNLIMITED)))
|
||||
{
|
||||
exit; //we need no cyborgs
|
||||
}
|
||||
|
@ -2117,7 +2117,7 @@ function void cybFactorBuildCyborg(STRUCTURE _factory)
|
|||
|
||||
if( structureIdle(_factory) )
|
||||
{
|
||||
if( (defendGroup.members < maxCyborgs[curTech]) and (getDroidCount(me) < MAX_DROIDS) )
|
||||
if( (defendGroup.members < maxCyborgs) and (getDroidCount(me) < MAX_DROIDS) )
|
||||
{
|
||||
if(random(5) == 1)
|
||||
{
|
||||
|
@ -2553,7 +2553,7 @@ event doResearch(doResearchTr)
|
|||
// do common research
|
||||
if(not boolResult) //didn't start branch research
|
||||
{
|
||||
if((maxIdleRes[curTech] == UNLIMITED) or (_numResearching < maxIdleRes[curTech]))
|
||||
if((maxIdleRes == UNLIMITED) or (_numResearching < maxIdleRes))
|
||||
{
|
||||
skDoResearch(structure,me,0);
|
||||
_numResearching++;
|
||||
|
@ -4278,9 +4278,9 @@ event structureDestroyed(structureDestroyedTr)
|
|||
|
||||
// add certain structures to the rebuild list
|
||||
_count = 0;
|
||||
while(_count < numRebuildStat[curTech])
|
||||
while(_count < numRebuildStat)
|
||||
{
|
||||
if(structure.stat == rebuildStat[curTech][_count])
|
||||
if(structure.stat == rebuildStat[_count])
|
||||
{
|
||||
if(countRebuildStruct < MAX_REBUILD_STRUCT)
|
||||
{
|
||||
|
|
|
@ -5,34 +5,31 @@
|
|||
script "ai.slo"
|
||||
run
|
||||
{
|
||||
// general constants
|
||||
numScouts int 3 // min number of droids in group to aim for
|
||||
maxScouts int 3 // max number of droids in group to aim for
|
||||
numCyborgs int 8 // build cyborgs until scouts contains at least x droids
|
||||
maxCyborgs int 20 // build cyborgs until scouts contains max x droids
|
||||
|
||||
// research branches
|
||||
branchDefault int 0
|
||||
branchVTOL int 1
|
||||
branchVTOL int 1
|
||||
|
||||
//default branch
|
||||
numScouts[0] int 3 // min number of droids in group to aim for.
|
||||
numDefenders[0] int 4
|
||||
numAttackers[0] int 8
|
||||
numCyborgs[0] int 15 // build cyborgs until scouts contains x droids
|
||||
|
||||
//vtol branch
|
||||
numScouts[1] int 3 // min number of droids in group to aim for.
|
||||
numDefenders[1] int 12
|
||||
numAttackers[1] int 0
|
||||
numCyborgs[1] int 10 // build cyborgs until scouts contains x droids
|
||||
|
||||
|
||||
//default branch
|
||||
maxScouts[0] int 3 // min number of droids in group to aim for.
|
||||
maxDefenders[0] int 5
|
||||
maxAttackers[0] int -1
|
||||
maxCyborgs[0] int 35 // build cyborgs until scouts contains x droids
|
||||
|
||||
//vtol branch
|
||||
maxScouts[1] int 3 // min number of droids in group to aim for.
|
||||
maxDefenders[1] int 20
|
||||
maxAttackers[1] int 0
|
||||
maxCyborgs[1] int 20 // build cyborgs until scouts contains x droids
|
||||
|
||||
tileExpand int 12 // approx minutes to expand over the map.
|
||||
|
||||
|
@ -55,12 +52,12 @@ run
|
|||
nexusDefence RESEARCHSTAT "R-Sys-Resistance-Circuits"
|
||||
uplink STRUCTURESTAT "A0Sat-linkCentre"
|
||||
|
||||
//how many res facilities to use when finished researching all specified research topics
|
||||
maxIdleRes int -1
|
||||
|
||||
//number of research topics for each research branch
|
||||
techCount[0] int 18
|
||||
|
||||
//how many res facilities to use when finished researching all specified research topics
|
||||
maxIdleRes[0] int -1
|
||||
|
||||
tech[0][0] RESEARCHSTAT "R-Defense-Tower01" //mg guard tower
|
||||
tech[0][1] RESEARCHSTAT "R-Wpn-MG3Mk1" //HMG
|
||||
tech[0][2] RESEARCHSTAT "R-Struc-PowerModuleMk1" //power module
|
||||
|
@ -83,9 +80,6 @@ run
|
|||
//other tech: R-Vehicle-Prop-VTOL, R-Struc-VTOLPad, R-Struc-VTOLFactory
|
||||
techCount[1] int 17
|
||||
|
||||
//how many res facilities to use when finished researching all specified research topics
|
||||
maxIdleRes[1] int 3
|
||||
|
||||
tech[1][0] RESEARCHSTAT "R-Defense-Tower01" //mg tower for early fun
|
||||
tech[1][1] RESEARCHSTAT "R-Struc-Research-Module" //reslab module
|
||||
tech[1][2] RESEARCHSTAT "R-Struc-PowerModuleMk1" //power module
|
||||
|
@ -205,21 +199,6 @@ run
|
|||
wallWeaps[8] STRUCTURESTAT "WallTower-Atmiss"
|
||||
wallWeaps[9] STRUCTURESTAT "WallTower-HPVcannon"
|
||||
|
||||
|
||||
// extra structs
|
||||
numExtraStructs[0] int 4
|
||||
extraStructs[0][1] STRUCTURESTAT "A0ResearchFacility"
|
||||
extraStructs[0][2] STRUCTURESTAT "A0LightFactory"
|
||||
extraStructs[0][3] STRUCTURESTAT "A0LightFactory"
|
||||
extraStructs[0][4] STRUCTURESTAT "A0CyborgFactory"
|
||||
|
||||
numExtraStructs[1] int 5
|
||||
extraStructs[1][0] STRUCTURESTAT "A0VTolFactory1"
|
||||
extraStructs[1][1] STRUCTURESTAT "A0VTolFactory1"
|
||||
extraStructs[1][2] STRUCTURESTAT "A0CyborgFactory"
|
||||
extraStructs[1][3] STRUCTURESTAT "A0VtolPad"
|
||||
extraStructs[1][4] STRUCTURESTAT "A0LightFactory"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// SKIRMISH TEMPLATES
|
||||
|
@ -250,11 +229,6 @@ run
|
|||
tmpl[0][17] TEMPLATE "SK-Cobra-Track-HVC" //HVC Tr
|
||||
tmpl[0][18] TEMPLATE "CobraHvyCnTrks" //HC Tr
|
||||
|
||||
//tmpl[0][19] TEMPLATE "SK-Python-Hover-Mcannon"
|
||||
//tmpl[0][20] TEMPLATE "PythonMedCnTrks"
|
||||
//tmpl[0][21] TEMPLATE "SK-Python-Hover-Lancer"
|
||||
//tmpl[0][22] TEMPLATE "SK-Python-Hover-Hcannon"
|
||||
|
||||
//Campaign 2
|
||||
tmpl[0][19] TEMPLATE "PythonHoverHVC" //HVC Hover
|
||||
tmpl[0][20] TEMPLATE "SK-Cobra-Track-TK"
|
||||
|
@ -380,17 +354,10 @@ run
|
|||
vtolTargetWeight[9] int 10
|
||||
|
||||
|
||||
// Structure types AI will rebuild when they get destroyed (per tech branch basis)
|
||||
|
||||
// branchDefault
|
||||
numRebuildStat[0] int 2
|
||||
rebuildStat[0][0] STRUCTURESTAT "A0HardcreteMk1Wall"
|
||||
rebuildStat[0][1] STRUCTURESTAT "A0HardcreteMk1CWall"
|
||||
|
||||
// branchVTOL
|
||||
numRebuildStat[1] int 2
|
||||
rebuildStat[1][0] STRUCTURESTAT "A0HardcreteMk1Wall"
|
||||
rebuildStat[1][1] STRUCTURESTAT "A0HardcreteMk1CWall"
|
||||
// Structure types AI will rebuild when they get destroyed
|
||||
numRebuildStat int 2
|
||||
rebuildStat[0] STRUCTURESTAT "A0HardcreteMk1Wall"
|
||||
rebuildStat[1] STRUCTURESTAT "A0HardcreteMk1CWall"
|
||||
|
||||
// propulsions
|
||||
vtolPropulsion PROPULSION "V-Tol"
|
||||
|
|
Loading…
Reference in New Issue