Throttle AI construction of VTOL factories based on amount of power. Add thermite bombers to VTOL fleet.
Reorder VTOL target priorities to go after construction first. Restrict help build event to avoid trucks wandering across the entire map to help build something that is finished a long time ago when they arrive there. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9390 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
ce8491b4ad
commit
a46a6eb68b
|
@ -1245,7 +1245,9 @@ event finishStructs(finishStructsTr)
|
|||
droid = iterateGroup(buildGroup);
|
||||
while(droid != NULLOBJECT)
|
||||
{
|
||||
if ((droid.order != DORDER_BUILD) and (droid.order != DORDER_LINEBUILD) and droidCanReach(droid, structure.x, structure.y))
|
||||
if (droid.order != DORDER_BUILD and droid.order != DORDER_LINEBUILD
|
||||
and droidCanReach(droid, structure.x, structure.y)
|
||||
and distBetweenTwoPoints(droid.x, droid.y, structure.x, structure.y) < 20 * TILE)
|
||||
{
|
||||
orderDroidObj(droid,DORDER_HELPBUILD,structure);
|
||||
}
|
||||
|
@ -2435,7 +2437,8 @@ event vtolStructs(inactive)
|
|||
local int _numVtolFacs,_numRearmPads;
|
||||
|
||||
// got any idle trucks?
|
||||
if(idleGroup(buildGroup) < 1){
|
||||
if (idleGroup(buildGroup) < 1)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -2450,6 +2453,11 @@ event vtolStructs(inactive)
|
|||
buildRearmPads();
|
||||
}
|
||||
|
||||
if (_numVtolFacs > 0 and playerPower(me) < LOW_POWER)
|
||||
{
|
||||
exit; // Throttle expansion to avoid waste
|
||||
}
|
||||
|
||||
// calculate how many trucks we want to use for construction
|
||||
_minBuildTrucks = 1;
|
||||
_maxBuildTrucks = 3;
|
||||
|
@ -2925,11 +2933,6 @@ event vtolDefend(vtolDefendTr)
|
|||
{
|
||||
if(isVtol(objToDroid(baseobj)))
|
||||
{
|
||||
// activate other vtol functions..
|
||||
setEventTrigger(vtolStructs,vtolStructsTr);
|
||||
setEventTrigger(buildVtols, buildVtolsTr);
|
||||
setEventTrigger(vtolAttack, vtolAttackTr);
|
||||
|
||||
_numBuilders = 0;
|
||||
_maxBuilders = 2;
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ run
|
|||
/////////////////////////////////////////////////////////////////////
|
||||
// VTOL TEMPLATES
|
||||
|
||||
numVtolTemplates int 7
|
||||
numVtolTemplates int 8
|
||||
|
||||
vtols[0] TEMPLATE "P6-L-LTAT-V" //Viper Lancer
|
||||
vtols[1] TEMPLATE "P6-L-Bomb1-V" //Viper Cluster Bombs Bay
|
||||
|
@ -374,7 +374,8 @@ run
|
|||
vtols[4] TEMPLATE "H-Scorp-VTOL-Lancer"
|
||||
vtols[5] TEMPLATE "H-Scorp-VTOL-BB"
|
||||
vtols[6] TEMPLATE "H-Scorp-VTOL-Lancer"
|
||||
|
||||
vtols[7] TEMPLATE "SK-Retre-VTOL-Thermite"
|
||||
|
||||
/*
|
||||
vtols[7] TEMPLATE "SK-Mantis-VTOL-BB"
|
||||
vtols[8] TEMPLATE "SK-Leopard-VTOL-BB"
|
||||
|
@ -385,7 +386,6 @@ run
|
|||
vtols[13] TEMPLATE "SK-Panther-VTOL-TK"
|
||||
//Campaign 3
|
||||
vtols[14] TEMPLATE "SK-Retal-VTOL-Phosbomb"
|
||||
vtols[15] TEMPLATE "SK-Retre-VTOL-Thermite"
|
||||
vtols[16] TEMPLATE "SK-Retre-VTOL-PulseLsr"
|
||||
vtols[17] TEMPLATE "SK-Retre-VTOL-Scourge"
|
||||
*/
|
||||
|
@ -400,19 +400,19 @@ run
|
|||
vtolTarget[2] STRUCTURESTAT "A0CyborgFactory"
|
||||
vtolTargetWeight[2] int 60
|
||||
vtolTarget[3] STRUCTURESTAT "A0VTolFactory1"
|
||||
vtolTargetWeight[3] int 70
|
||||
vtolTargetWeight[3] int 100
|
||||
vtolTarget[4] STRUCTURESTAT "A0LasSatCommand"
|
||||
vtolTargetWeight[4] int 40
|
||||
vtolTargetWeight[4] int 90
|
||||
vtolTarget[5] STRUCTURESTAT "A0Sat-linkCentre"
|
||||
vtolTargetWeight[5] int 90
|
||||
vtolTargetWeight[5] int 10
|
||||
vtolTarget[6] STRUCTURESTAT "A0ResearchFacility"
|
||||
vtolTargetWeight[6] int 55
|
||||
vtolTargetWeight[6] int 10
|
||||
vtolTarget[7] STRUCTURESTAT "A0PowerGenerator"
|
||||
vtolTargetWeight[7] int 95
|
||||
vtolTargetWeight[7] int 15
|
||||
vtolTarget[8] STRUCTURESTAT "A0ResourceExtractor"
|
||||
vtolTargetWeight[8] int 100
|
||||
vtolTargetWeight[8] int 20
|
||||
vtolTarget[9] STRUCTURESTAT "A0RepairCentre3"
|
||||
vtolTargetWeight[9] int 20
|
||||
vtolTargetWeight[9] int 10
|
||||
|
||||
|
||||
// Structure types AI will rebuild when they get destroyed (per tech branch basis)
|
||||
|
|
Loading…
Reference in New Issue