Permalink
Browse files

More campaign regression fixing.

-cam1-a: Allow the truck and MG droid templates to be enabled without the HQ.
-cam1-1: Use v1.10 victory: Force return to LZ.
-cam1-2: Bring back v1.10 victory condition -> Forced return to LZ.
-cam1-3: Commander group is aggressive just like in v1.10. Use v1.10 victory -> Forced to annihilate map of all enemies.
-cam1-ca: Player must build seven structures on plateau like in v1.10.
-cam1-4a: Emulate lost behavior where trucks build stuff right away and the base is detected farther south of the red objective blip. Use v1.10 victory: Forced return to LZ.
-cam1-5: Use v1.10 victory: Forced total annihilation.
-cam2-8: Swap extra victory callback for the away mission victory parameter annihilate.
-cam3-b: The westPhantomFactory label used the wrong coordinate. Make
factory groups attack instead of staying in base.
-libcampaign: Introduce two new optional victory parameters: retlz and annihilate. retlz forces the player to return to the LZ to win and annihilate forces the player to destroy all enemy owned droids/structures on map to win.
  • Loading branch information...
KJeff01 committed Oct 2, 2017
1 parent 80502be commit 73e7f2565fcef866a3120e7574c8e12d9badaf68
@@ -8,27 +8,27 @@ const scavs = 7; //Scav player number
camAreaEvent("scavBaseTrigger", function()
{
var ambushGroup = camMakeGroup(enumArea("eastScavs", scavs, false));
camManageGroup(ambushGroup, CAM_ORDER_DEFEND,
{ pos: camMakePos("artifactLocation") }
);
camManageGroup(ambushGroup, CAM_ORDER_DEFEND, {
pos: camMakePos("artifactLocation")
});
});
//Moves west scavs units closer to the base - triggered from right path
camAreaEvent("ambush1Trigger", function()
{
var ambushGroup = camMakeGroup(enumArea("westScavs", scavs, false));
camManageGroup(ambushGroup, CAM_ORDER_DEFEND,
{ pos: camMakePos("ambush1") }
);
camManageGroup(ambushGroup, CAM_ORDER_DEFEND, {
pos: camMakePos("ambush1")
});
});
//Sends some units towards player LZ - triggered from left path
camAreaEvent("ambush2Trigger", function()
{
var ambushGroup = camMakeGroup(enumArea("northWestScavs", scavs, false));
camManageGroup(ambushGroup, CAM_ORDER_ATTACK,
{ pos: camMakePos("ambush2") }
);
camManageGroup(ambushGroup, CAM_ORDER_DEFEND, {
pos: camMakePos("ambush2")
});
});
function eventPickup(feature, droid)
@@ -45,7 +45,8 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_2S", {
area: "RTLZ",
message: "C1-1_LZ",
reinforcements: -1 //No reinforcements
reinforcements: -1, //No reinforcements
retlz: true
});
var startpos = getObject("startPosition");
@@ -57,7 +57,8 @@ function enableReinforcements()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_3S", {
area: "RTLZ",
message: "C1-2_LZ",
reinforcements: 60
reinforcements: 60,
retlz: true
});
}
@@ -66,9 +67,10 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_3S", {
area: "RTLZ",
message: "C1-2_LZ",
reinforcements: -1
reinforcements: -1,
retlz: true
});
var startpos = getObject("StartPosition");
var lz = getObject("LandingZone");
var tent = getObject("TransporterEntry");
@@ -59,10 +59,9 @@ function playYouAreInContraventionOfTheNewParadigm()
});
camManageGroup(NPDefenseGroup, CAM_ORDER_FOLLOW, {
droid: "NPCommander",
order: CAM_ORDER_DEFEND,
order: CAM_ORDER_ATTACK,
data: {
pos: camMakePos("NPCommander"),
radius: 15,
pos: camMakePos("LandingZone"),
repair: 30,
},
repair: 30
@@ -115,7 +114,8 @@ function enableReinforcements()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1C", {
area: "RTLZ",
message: "C1-3_LZ",
reinforcements: 120 // changes!
reinforcements: 120, // changes!
annihilate: true
});
}
@@ -149,7 +149,7 @@ function eventDroidBuilt(droid, structure)
// An example of manually managing factory groups.
if (!camDef(structure) || !structure || structure.id !== NPFactory.id)
return;
if (groupSize(NPDefenseGroup) < 6) // watch out! commander control limit
if (getObject("NPCommander") !== null && groupSize(NPDefenseGroup) < 6) // watch out! commander control limit
groupAdd(NPDefenseGroup, droid);
else if (groupSize(NPScoutGroup) < 4 && droid.body !== camTemplates.npsmc.body)
groupAdd(NPScoutGroup, droid);// heavy tanks don't go scouting
@@ -164,7 +164,8 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1C", {
area: "RTLZ",
message: "C1-3_LZ",
reinforcements: -1 // will override later
reinforcements: -1, // will override later
annihilate: true
});
var startpos = getObject("StartPosition");
@@ -17,30 +17,20 @@ const SCAVENGER_RES = [
"R-Wpn-MG-Damage03", "R-Wpn-Rocket-Damage02",
];
//Pursue player when nearby but do not go too far away from defense zone.
function camEnemyBaseDetected_NPBaseGroup()
{
// First wave of trucks
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower0");
camQueueBuilding(NEW_PARADIGM, "PillBox3", "BuildTower3");
camQueueBuilding(NEW_PARADIGM, "PillBox3", "BuildTower6");
// Second wave of trucks
camQueueBuilding(NEW_PARADIGM, "GuardTower3", "BuildTower1");
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower2");
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower4");
// Third wave of trucks
camQueueBuilding(NEW_PARADIGM, "GuardTower3", "BuildTower5");
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower7");
// Send tanks
camManageGroup(camMakeGroup("AttackGroupLight"), CAM_ORDER_COMPROMISE, {
pos: camMakePos("RTLZ"),
regroup: true,
camManageGroup(camMakeGroup("AttackGroupLight"), CAM_ORDER_DEFEND, {
pos: camMakePos("nearSensor"),
radius: 10,
regroup: true
});
camManageGroup(camMakeGroup("AttackGroupMedium"), CAM_ORDER_COMPROMISE, {
pos: camMakePos("RTLZ"),
regroup: true,
camManageGroup(camMakeGroup("AttackGroupMedium"), CAM_ORDER_DEFEND, {
pos: camMakePos("nearSensor"),
radius: 10,
regroup: true
});
}
@@ -54,13 +44,10 @@ camAreaEvent("NorthScavFactoryTrigger", function()
camEnableFactory("NorthScavFactory");
});
camAreaEvent("HeavyNPFactoryTrigger", function()
camAreaEvent("NPBaseDetectTrigger", function()
{
camDetectEnemyBase("NPBaseGroup");
camEnableFactory("HeavyNPFactory");
});
camAreaEvent("MediumNPFactoryTrigger", function()
{
camEnableFactory("MediumNPFactory");
});
@@ -92,7 +79,8 @@ function moreLandingZoneTrigger()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_5S", {
area: "RTLZ",
message: "C1-4_LZ",
reinforcements: 90 // changes!
reinforcements: 90, // changes!
retlz: true
});
// enables all factories
camEnableFactory("SouthScavFactory");
@@ -101,12 +89,30 @@ function moreLandingZoneTrigger()
camEnableFactory("MediumNPFactory");
}
function buildDefenses()
{
// First wave of trucks
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower0");
camQueueBuilding(NEW_PARADIGM, "PillBox3", "BuildTower3");
camQueueBuilding(NEW_PARADIGM, "PillBox3", "BuildTower6");
// Second wave of trucks
camQueueBuilding(NEW_PARADIGM, "GuardTower3", "BuildTower1");
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower2");
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower4");
// Third wave of trucks
camQueueBuilding(NEW_PARADIGM, "GuardTower3", "BuildTower5");
camQueueBuilding(NEW_PARADIGM, "GuardTower6", "BuildTower7");
}
function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_5S", {
area: "RTLZ",
message: "C1-4_LZ",
reinforcements: -1 // will override later
reinforcements: -1, // will override later
retlz: true
});
const NP_POWER = camChangeOnDiff(10000, true);
@@ -203,5 +209,6 @@ function eventStartLevel()
// and also to rebuild dead trucks.
camManageTrucks(NEW_PARADIGM);
queue("buildDefenses", 2000);
queue("enableSouthScavFactory", 10000);
}
@@ -94,7 +94,8 @@ function enableReinforcements()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1A-C", {
area: "RTLZ",
message: "C1-5_LZ",
reinforcements: 180 //3 min
reinforcements: 180, //3 min
annihilate: true
});
}
@@ -126,7 +127,8 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1A-C", {
area: "RTLZ",
message: "C1-5_LZ",
reinforcements: -1
reinforcements: -1,
annihilate: true
});
var lz = getObject("LandingZone1"); //player lz
@@ -123,6 +123,9 @@ function eventStartLevel()
enableStartingBuildings();
camCompleteRequiredResearch(PLAYER_RES, CAM_HUMAN_PLAYER);
//These are available without needing to build a HQ.
enableTemplate("ConstructionDroid");
enableTemplate("ViperLtMGWheels");
// give player briefing
hackAddMessage("CMB1_MSG", CAMP_MSG, CAM_HUMAN_PLAYER, false);
@@ -13,7 +13,7 @@ var totalTransportLoads;
function baseEstablished()
{
//Now we check if there is stuff built here already from cam1-C.
if (camCountStructuresInArea("buildArea") >= 4)
if (camCountStructuresInArea("buildArea") >= 7)
{
if (blipActive)
{
@@ -71,22 +71,13 @@ function enableFactories()
camEnableFactory("COVtolFac-b3");
}
//Everything must be destroyed.
function extraVictoryCondition()
{
if (!enumStruct(THE_COLLECTIVE).length)
{
return true;
}
}
function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_2END", {
area: "RTLZ",
reinforcements: 180, //3 min
callback: "extraVictoryCondition",
annihilate: true
});
}
@@ -95,6 +86,7 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_2END", {
area: "RTLZ",
reinforcements: -1,
annihilate: true
});
var startpos = getObject("startPosition");
@@ -176,15 +176,14 @@ function activateNexusGroups()
//fallback: camMakePos("westRetreat")
});
camManageGroup(camMakeGroup("gammaBaseCleanup"), CAM_ORDER_DEFEND, {
camManageGroup(camMakeGroup("gammaBaseCleanup"), CAM_ORDER_PATROL, {
pos: [
camMakePos("gammaBase"),
camMakePos("northEndOfPass"),
],
regroup: true,
count: -1,
morale: 10,
fallback: camMakePos("gammaBase")
interval: 30000,
regroup: false,
count: -1
});
}
@@ -242,13 +241,13 @@ function eventStartLevel()
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-EastBase": {
"NXEastBase": {
cleanup: "NXEastBaseCleanup",
detectMsg: "CM3B_BASE4",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-WestBase": {
"NXWestBase": {
cleanup: "NXWestBaseCleanup",
detectMsg: "CM3B_BASE6",
detectSnd: "pcv379.ogg",
@@ -258,34 +257,17 @@ function eventStartLevel()
with (camTemplates) camSetFactories({
"gammaFactory": {
order: CAM_ORDER_PATROL,
data: {
pos: [
camMakePos("northEndOfPass"),
camMakePos("southOfRidge"),
camMakePos("westRidge"),
camMakePos("eastRidge"),
],
interval: 45000,
count: -1
},
group: camMakeGroup("eastNXGroup"),
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(45000),
regroup: false,
regroup: true,
repair: 40,
templates: [nxmrailh, nxmscouh]
},
"gammaCyborgFactory": {
order: CAM_ORDER_DEFEND,
data: {
pos: [
camMakePos("gammaBase"),
camMakePos("northEndOfPass"),
]
},
order: CAM_ORDER_ATTACK,
group: camMakeGroup("gammaBaseCleanup"),
groupSize: 5,
groupSize: 6,
throttle: camChangeOnDiff(40000),
regroup: true,
repair: 40,
@@ -300,5 +282,5 @@ function eventStartLevel()
queue("transferPower", 3000);
queue("vtolAttack", camChangeOnDiff(300000)); //5 min
queue("enableAllFactories", camChangeOnDiff(300000)); //5 min
queue("enableAllFactories", camChangeOnDiff(301000)); //5 min
}
Oops, something went wrong.

0 comments on commit 73e7f25

Please sign in to comment.