Permalink
Browse files

Updates for campaign.

libcampaign: Make sure to distinguish base group structures when loading a save if the base has a shared cleanup region. Also Improved VTOL hit and runners.
cam2-2: Increase default power for the Collective.
cam2-d: Must destroy all enemy objects to win.
cam2-a and cam3-a: Do not set transporters with experience.

Some minor campaign script syntax corrections.
  • Loading branch information...
KJeff01 committed Aug 26, 2017
1 parent 32d4fb4 commit 87fa69bbce448c13d174fff38d5bb81f65cebbc3
@@ -140,7 +140,6 @@ function playNPWarningMessage()
function playNPWarningSound()
{
var startpos = getObject("StartPosition");
playSound("pcv455.ogg");
queue("playNPWarningMessage", 2000);
}
@@ -182,4 +182,4 @@ function eventStartLevel()
victoryFlag = false;
queue("setupCyborgGroups", 5000);
queue("updateTransportUnits", 20000);
};
}
@@ -4,20 +4,20 @@ include("script/campaign/templates.js");
const warning = "pcv632.ogg"; // Collective commander escaping
const COLLEVTIVE_RES = [
"R-Defense-WallUpgrade03", "R-Struc-Materials04",
"R-Struc-Factory-Upgrade04", "R-Struc-Factory-Cyborg-Upgrade04",
"R-Vehicle-Engine04", "R-Vehicle-Metals03", "R-Cyborg-Metals03",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage04",
"R-Wpn-Cannon-ROF02", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage06", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage05", "R-Sys-Sensor-Upgrade01",
"R-Struc-VTOLFactory-Upgrade01", "R-Struc-VTOLPad-Upgrade01",
"R-Sys-Engineering02", "R-Wpn-Howitzer-Accuracy01",
"R-Wpn-Howitzer-Damage01", "R-Wpn-RocketSlow-ROF03",
"R-Defense-WallUpgrade03", "R-Struc-Materials04",
"R-Struc-Factory-Upgrade04", "R-Struc-Factory-Cyborg-Upgrade04",
"R-Vehicle-Engine04", "R-Vehicle-Metals03", "R-Cyborg-Metals03",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage04",
"R-Wpn-Cannon-ROF02", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage06", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage05", "R-Sys-Sensor-Upgrade01",
"R-Struc-VTOLFactory-Upgrade01", "R-Struc-VTOLPad-Upgrade01",
"R-Sys-Engineering02", "R-Wpn-Howitzer-Accuracy01",
"R-Wpn-Howitzer-Damage01", "R-Wpn-RocketSlow-ROF03",
];
var commandGroup;
@@ -96,30 +96,15 @@ camAreaEvent("failZone", function(droid)
resetLabel("failZone");
});
//Stop VTOLs from coming if HQ is destroyed.
function checkCollectiveHQ()
{
if(getObject("COCommandCenter") === null)
{
camToggleVtolSpawn();
}
else
{
queue("checkCollectiveHQ", 8000);
}
}
function vtolAttack()
{
var list; with (camTemplates) list = [colatv, colatv];
camSetVtolData(THE_COLLECTIVE, "vtolAppearPoint", "vtolRemovePoint", list, 120000);
checkCollectiveHQ();
camSetVtolData(THE_COLLECTIVE, "vtolAppearPoint", "vtolRemovePoint", list, camChangeOnDiff(120000), "COCommandCenter");
}
//Order the truck to build some defenses.
function truckDefense()
{
var truck = enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT);
if(enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT).length > 0)
queue("truckDefense", 160000);
@@ -171,7 +156,7 @@ function eventStartLevel()
"COCommander": { tech: "R-Wpn-RocketSlow-Accuracy03" },
});
setPower(camChangeOnDiff(12000, true), THE_COLLECTIVE);
setPower(camChangeOnDiff(40000, true), THE_COLLECTIVE);
camCompleteRequiredResearch(COLLEVTIVE_RES, THE_COLLECTIVE);
camSetEnemyBases({
@@ -2,20 +2,20 @@ include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");
const COLLECTIVE_RES = [
"R-Defense-WallUpgrade03", "R-Struc-Materials05",
"R-Struc-Factory-Upgrade05", "R-Struc-Factory-Cyborg-Upgrade05",
"R-Struc-VTOLFactory-Upgrade02", "R-Struc-VTOLPad-Upgrade01",
"R-Vehicle-Engine04", "R-Vehicle-Metals04", "R-Cyborg-Metals05",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Sys-Engineering02", "R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage04",
"R-Wpn-Cannon-ROF02", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage07", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage05", "R-Sys-Sensor-Upgrade01",
"R-Wpn-Howitzer-Accuracy01", "R-Wpn-RocketSlow-ROF03",
"R-Wpn-Howitzer-Damage01",
"R-Defense-WallUpgrade03", "R-Struc-Materials05",
"R-Struc-Factory-Upgrade05", "R-Struc-Factory-Cyborg-Upgrade05",
"R-Struc-VTOLFactory-Upgrade02", "R-Struc-VTOLPad-Upgrade01",
"R-Vehicle-Engine04", "R-Vehicle-Metals04", "R-Cyborg-Metals05",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Sys-Engineering02", "R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage04",
"R-Wpn-Cannon-ROF02", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage07", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage05", "R-Sys-Sensor-Upgrade01",
"R-Wpn-Howitzer-Accuracy01", "R-Wpn-RocketSlow-ROF03",
"R-Wpn-Howitzer-Damage01",
];
camAreaEvent("factoryTrigger", function(droid)
@@ -2,20 +2,20 @@ include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");
const COLLECTIVE_RES = [
"R-Defense-WallUpgrade05", "R-Struc-Materials05",
"R-Struc-Factory-Upgrade05", "R-Struc-Factory-Cyborg-Upgrade05",
"R-Struc-VTOLFactory-Upgrade03", "R-Struc-VTOLPad-Upgrade03",
"R-Vehicle-Engine05", "R-Vehicle-Metals05", "R-Cyborg-Metals05",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Sys-Engineering02", "R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage05",
"R-Wpn-Cannon-ROF03", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage07", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage06", "R-Sys-Sensor-Upgrade01",
"R-Wpn-Howitzer-Accuracy02", "R-Wpn-RocketSlow-ROF03",
"R-Wpn-Howitzer-Damage02",
"R-Defense-WallUpgrade05", "R-Struc-Materials05",
"R-Struc-Factory-Upgrade05", "R-Struc-Factory-Cyborg-Upgrade05",
"R-Struc-VTOLFactory-Upgrade03", "R-Struc-VTOLPad-Upgrade03",
"R-Vehicle-Engine05", "R-Vehicle-Metals05", "R-Cyborg-Metals05",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Sys-Engineering02", "R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage05",
"R-Wpn-Cannon-ROF03", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage07", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage06", "R-Sys-Sensor-Upgrade01",
"R-Wpn-Howitzer-Accuracy02", "R-Wpn-RocketSlow-ROF03",
"R-Wpn-Howitzer-Damage02",
];
camAreaEvent("groupTrigger", function(droid)
@@ -91,7 +91,6 @@ function mainBaseAttackGroup()
//Order the truck to build some defenses.
function truckDefense()
{
var truck = enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT);
if(enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT).length > 0)
queue("truckDefense", 160000);
@@ -2,6 +2,7 @@ include("script/campaign/transitionTech.js");
include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");
const TRANSPORT_LIMIT = 4;
var index; //Number of transport loads sent into the level
@@ -88,8 +89,6 @@ function sendCOTransporter()
//from the main menu. Otherwise a player can just bring in there Alpha units
function sendPlayerTransporter()
{
const TRANSPORT_LIMIT = 4;
if(!camDef(index))
{
index = 0;
@@ -116,7 +115,6 @@ function sendPlayerTransporter()
}
);
index = index + 1;
queue("sendPlayerTransporter", 300000); //5 min
}
@@ -137,24 +135,10 @@ function mapEdgeDroids()
queue("mapEdgeDroids", camChangeOnDiff(420000)); //7 min
}
//Stop VTOLs from coming if HQ is destroyed.
function checkCollectiveHQ()
{
if(getObject("COCommandCenter") === null)
{
camToggleVtolSpawn();
}
else
{
queue("checkCollectiveHQ", 8000);
}
}
function vtolAttack()
{
var list; with (camTemplates) list = [colcbv, colatv];
camSetVtolData(THE_COLLECTIVE, "vtolAppearPos", "vtolRemoveZone", list, camChangeOnDiff(300000)); //5 min
checkCollectiveHQ();
camSetVtolData(THE_COLLECTIVE, "vtolAppearPos", "vtolRemoveZone", list, camChangeOnDiff(300000), "COCommandCenter"); //5 min
}
function groupPatrol()
@@ -182,7 +166,6 @@ function groupPatrol()
//Build defenses around oil resource
function truckDefense()
{
var truck = enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT);
if(enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT).length > 0)
queue("truckDefense", 160000);
@@ -231,7 +214,7 @@ function setUnitRank()
const DROID_EXP = 32;
const MIN_TO_AWARD = 16;
var droids = enumDroid(CAM_HUMAN_PLAYER).filter(function(dr) {
return !camIsSystemDroid(dr);
return (!camIsSystemDroid(dr) && !camIsTransporter(dr));
});
for (var j = 0, i = droids.length; j < i; ++j)
@@ -250,6 +233,17 @@ function eventTransporterLanded(transport)
if (transport.player === CAM_HUMAN_PLAYER)
{
camCallOnce("setUnitRank");
if (!camDef(index))
{
index = 0;
}
index = index + 1;
if (index === TRANSPORT_LIMIT)
{
setReinforcementTime(LZ_COMPROMISED_TIME); // Stop any more transports
}
}
}
@@ -316,7 +310,7 @@ function eventStartLevel()
queue("secondVideo", 12000); // 12 sec
queue("truckDefense", 15000);// 15 sec.
queue("sendCOTransporter", 30000); //30 sec
queue("groupPatrol", 60000); // 60 sec
queue("vtolAttack", 300000); //5 min
queue("mapEdgeDroids", 420000); //7 min
queue("groupPatrol", camChangeOnDiff(60000)); // 60 sec
queue("vtolAttack", camChangeOnDiff(300000)); //5 min
queue("mapEdgeDroids", camChangeOnDiff(420000)); //7 min
}
@@ -90,29 +90,15 @@ function ambushPlayer()
});
}
//VTOL units stop coming when the Collective HQ is destroyed.
function checkCollectiveHQ()
{
if(getObject("COCommandCenter") === null)
{
camToggleVtolSpawn();
}
else
{
queue("checkCollectiveHQ", 8000);
}
}
function vtolAttack()
{
var list; with (camTemplates) list = [colcbv, colatv];
camSetVtolData(THE_COLLECTIVE, "vtolAppearPos", "vtolRemove", list, camChangeOnDiff(600000)); //10 min
camSetVtolData(THE_COLLECTIVE, "vtolAppearPos", "vtolRemove", list, camChangeOnDiff(600000), "COCommandCenter"); //10 min
checkCollectiveHQ();
}
function truckDefense()
{
var truck = enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT);
if(enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT).length > 0)
queue("truckDefense", 160000);
@@ -7,21 +7,21 @@ var capturedCivCount; //How many civilians have been captured. 59 for defeat.
var civilianPosIndex; //Current location of civilian groups.
var shepardGroup; //Enemy group that protects civilians.
const COLLECTIVE_RES = [
"R-Defense-WallUpgrade03", "R-Struc-Materials04",
"R-Struc-Factory-Upgrade04", "R-Struc-VTOLFactory-Upgrade01",
"R-Struc-VTOLPad-Upgrade01", "R-Struc-Factory-Cyborg-Upgrade04",
"R-Vehicle-Engine04", "R-Vehicle-Metals03", "R-Cyborg-Metals04",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage04",
"R-Wpn-Cannon-ROF03", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage07", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage05", "R-Sys-Sensor-Upgrade01",
"R-Struc-VTOLFactory-Upgrade01", "R-Struc-VTOLPad-Upgrade01",
"R-Sys-Engineering02", "R-Wpn-Howitzer-Accuracy02",
"R-Wpn-Howitzer-Damage02", "R-Wpn-RocketSlow-ROF03",
"R-Defense-WallUpgrade03", "R-Struc-Materials04",
"R-Struc-Factory-Upgrade04", "R-Struc-VTOLFactory-Upgrade01",
"R-Struc-VTOLPad-Upgrade01", "R-Struc-Factory-Cyborg-Upgrade04",
"R-Vehicle-Engine04", "R-Vehicle-Metals03", "R-Cyborg-Metals04",
"R-Vehicle-Armor-Heat02", "R-Cyborg-Armor-Heat02",
"R-Wpn-Cannon-Accuracy02", "R-Wpn-Cannon-Damage04",
"R-Wpn-Cannon-ROF03", "R-Wpn-Flamer-Damage06", "R-Wpn-Flamer-ROF03",
"R-Wpn-MG-Damage07", "R-Wpn-MG-ROF03", "R-Wpn-Mortar-Acc02",
"R-Wpn-Mortar-Damage06", "R-Wpn-Mortar-ROF03",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-Damage06",
"R-Wpn-Rocket-ROF03", "R-Wpn-RocketSlow-Accuracy03",
"R-Wpn-RocketSlow-Damage05", "R-Sys-Sensor-Upgrade01",
"R-Struc-VTOLFactory-Upgrade01", "R-Struc-VTOLPad-Upgrade01",
"R-Sys-Engineering02", "R-Wpn-Howitzer-Accuracy02",
"R-Wpn-Howitzer-Damage02", "R-Wpn-RocketSlow-ROF03",
];
//Play video about civilians being captured by the Collective. Triggered
@@ -120,7 +120,6 @@ function activateGroups()
function truckDefense()
{
var truck = enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT);
if(enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT).length > 0)
{
queue("truckDefense", 160000);
Oops, something went wrong.

0 comments on commit 87fa69b

Please sign in to comment.