Permalink
Browse files

Convert cam3-4(s){.vlo, .slo} to cam3-4(s).js.

- Uses more bases that were previously unused for this mission.
- libcampaign: Victory data allows for a video to be played at the end of a mission.

- Delete cam3-4.vlo
- Delete cam3-4s.vlo
- Delete cam3-4sx.vlo
- Delete cam3-4x.vlo
- Delete vtols3-4.vlo
- Delete cam3-4sx.slo
- Delete cam3-4x.slo
  • Loading branch information...
KJeff01 committed Nov 28, 2017
1 parent 2ce3d68 commit 5f144dda98d18f02c2546c504371f30ead5785e3
@@ -3,3 +3,4 @@ MB3_4_MSG2,0,1,1,cam3/cam3_4b.ogg,2,CAM3_4_MSG5,CAM3_4_MSG6,0,0000
MB3_4_MSG3,0,1,1,cam3/cam34fmv.ogg,0,0,0000
MB3_4_MSG4,0,1,1,cam3/cam34mu1.ogg,0,0,0000
MB3_4_MSG5,0,1,1,cam3/cam34mu2.ogg,0,0,0000
MB3_4_OUTRO,0,1,1,outro.ogg,0,0,0000
@@ -1,5 +1,6 @@
CM34_OBJ1,1,RUINS_MSG,2,1984,10688,0,pcv448.ogg,0
CM34_OBJ2,1,ENEMYBASE_MSG,2,3392,8768,0,pcv393.ogg,0
CM34_BASEA,1,ENEMYBASE_MSG,2,2000,2500,0,pcv393.ogg,0
CM34_BASEB,1,ENEMYBASE_MSG,2,8768,4032,0,pcv393.ogg,0
CM34_BASEC,1,ENEMYBASE_MSG,2,8256,1344,0,pcv393.ogg,0
CM34_BASED,1,ENEMYBASE_MSG,2,10816,10816,0,pcv393.ogg,0
@@ -0,0 +1,332 @@
include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");
const NEXUS_RES = [
"R-Defense-WallUpgrade09", "R-Struc-Materials09", "R-Struc-Factory-Upgrade06",
"R-Struc-Factory-Cyborg-Upgrade06", "R-Struc-VTOLFactory-Upgrade06",
"R-Struc-VTOLPad-Upgrade06", "R-Vehicle-Engine09", "R-Vehicle-Metals09",
"R-Cyborg-Metals08", "R-Vehicle-Armor-Heat06", "R-Cyborg-Armor-Heat06",
"R-Sys-Engineering03", "R-Vehicle-Prop-Hover02", "R-Vehicle-Prop-VTOL02",
"R-Wpn-Bomb-Accuracy03", "R-Wpn-Energy-Accuracy01", "R-Wpn-Energy-Damage03",
"R-Wpn-Energy-ROF03", "R-Wpn-Missile-Accuracy01", "R-Wpn-Missile-Damage03",
"R-Wpn-Rail-Damage03", "R-Wpn-Rail-ROF03", "R-Sys-Sensor-Upgrade01",
"R-Sys-NEXUSrepair", "R-Wpn-Flamer-Damage06",
];
camAreaEvent("factoryTriggerW", function() {
enableAllFactories();
});
camAreaEvent("factoryTriggerS", function() {
enableAllFactories();
});
function setupNexusPatrols()
{
camManageGroup(camMakeGroup("SWBaseCleanup"), CAM_ORDER_PATROL, {
pos:[
"SWPatrolPos1",
"SWPatrolPos2",
"SWPatrolPos3"
],
interval: 20000,
regroup: false,
repair: 45,
count: -1
});
camManageGroup(camMakeGroup("NEBaseCleanup"), CAM_ORDER_PATROL, {
pos:[
"NEPatrolPos1",
"NEPatrolPos2"
],
interval: 30000,
regroup: false,
repair: 45,
count: -1
});
camManageGroup(camMakeGroup("SEBaseCleanup"), CAM_ORDER_PATROL, {
pos:[
"SEPatrolPos1",
"SEPatrolPos2"
],
interval: 20000,
regroup: false,
repair: 45,
count: -1
});
camManageGroup(camMakeGroup("NWBaseCleanup"), CAM_ORDER_PATROL, {
pos:[
"NWPatrolPos1",
"NWPatrolPos2",
"NWPatrolPos3"
],
interval: 35000,
regroup: false,
repair: 45,
count: -1
});
}
function enableAllFactories()
{
const FACTORY_LIST = [
"NX-NWFactory1", "NX-NWFactory2", "NX-NEFactory", "NX-SWFactory",
"NX-SEFactory", "NX-VtolFactory1", "NX-NWCyborgFactory",
"NX-VtolFactory2", "NX-SWCyborgFactory1", "NX-SWCyborgFactory2",
];
for (var i = 0, l = FACTORY_LIST.length; i < l; ++i)
{
camEnableFactory(FACTORY_LIST[i]);
}
//Set the already placed VTOL fighters into action
camManageGroup(camMakeGroup("vtolBaseCleanup"), CAM_ORDER_ATTACK, {
regroup: false, count: -1
});
}
function enableReinforcements()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, undefined, {
area: "RTLZ",
reinforcements: 60, // 1 min
annihilate: true,
victoryVideo: "MB3_4_OUTRO"
});
}
function truckDefense()
{
var truckNum = countDroid(NEXUS, DROID_CONSTRUCT);
if (truckNum > 0)
{
var list = [
"Sys-NEXUSLinkTOW", "P0-AASite-SAM2", "Emplacement-PrisLas",
"NX-Tower-ATMiss", "Sys-NX-CBTower"
];
for (var i = 0; i < truckNum * 2; ++i)
{
camQueueBuilding(NEXUS, list[camRand(list.length)]);
}
}
queue("truckDefense", 300000); // 5 min
}
function eventStartLevel()
{
var startpos = getObject("startPosition");
var tpos = getObject("transportEntryExit");
var lz = getObject("landingZone");
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, undefined, {
area: "RTLZ",
reinforcements: -1,
annihilate: true,
victoryVideo: "MB3_4_OUTRO"
});
centreView(startpos.x, startpos.y);
setNoGoArea(lz.x, lz.y, lz.x2, lz.y2, CAM_HUMAN_PLAYER);
startTransporterEntry(tpos.x, tpos.y, CAM_HUMAN_PLAYER);
setTransporterExit(tpos.x, tpos.y, CAM_HUMAN_PLAYER);
setMissionTime(-1); //Infinite time
setPower(AI_POWER, NEXUS);
camCompleteRequiredResearch(NEXUS_RES, NEXUS);
setupNexusPatrols();
camManageTrucks(NEXUS);
truckDefense();
camSetArtifacts({
"NX-NWCyborgFactory": { tech: "R-Wpn-RailGun03" },
"NX-NEFactory": { tech: "R-Vehicle-Body10" }, //Vengeance
"NX-MissileEmplacement": { tech: "R-Wpn-HvArtMissile" },
});
camSetEnemyBases({
"NX-SWBase": {
cleanup: "SWBaseCleanup",
detectMsg: "CM34_OBJ2",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-NWBase": {
cleanup: "NWBaseCleanup",
detectMsg: "CM34_BASEA",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-NEBase": {
cleanup: "NEBaseCleanup",
detectMsg: "CM34_BASEB",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-WBase": {
cleanup: "WBaseCleanup",
detectMsg: "CM34_BASEC",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-SEBase": {
cleanup: "SEBaseCleanup",
detectMsg: "CM34_BASED",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
"NX-VtolBase": {
cleanup: "vtolBaseCleanup",
detectMsg: "CM34_BASEE",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
},
});
with (camTemplates) camSetFactories({
"NX-NWFactory1": {
order: CAM_ORDER_ATTACK,
groupSize: 6,
throttle: camChangeOnDiff(40000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxhgauss, nxmpulseh, nxmscouh, nxmsamh, nxmstrike]
},
"NX-NWFactory2": {
order: CAM_ORDER_ATTACK,
groupSize: 6,
throttle: camChangeOnDiff(40000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxhgauss, nxmpulseh, nxmscouh, nxmsamh, nxmstrike]
},
"NX-NWCyborgFactory": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(30000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxcyrail, nxcyscou, nxcylas]
},
"NX-NEFactory": {
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(10000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxhgauss, nxmpulseh, nxmscouh, nxmsamh, nxmstrike]
},
"NX-SWFactory": {
order: CAM_ORDER_PATROL,
groupSize: 4,
throttle: camChangeOnDiff(60000),
data: {
pos: [
camMakePos("SWPatrolPos1"),
camMakePos("SWPatrolPos2"),
camMakePos("SWPatrolPos3"),
camMakePos("NEPatrolPos1"),
camMakePos("NEPatrolPos2")
],
interval: 45000,
regroup: false,
repair: 45,
count: -1,
},
templates: [nxmlinkh, nxllinkh] //Nexus link factory
},
"NX-SWCyborgFactory1": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(35000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxcyrail, nxcyscou, nxcylas]
},
"NX-SWCyborgFactory2": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(35000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxcyrail, nxcyscou, nxcylas]
},
"NX-SEFactory": {
order: CAM_ORDER_PATROL,
groupSize: 5,
throttle: camChangeOnDiff(30000),
data: {
pos: [
camMakePos("SEPatrolPos1"),
camMakePos("NEPatrolPos1")
],
interval: 30000,
regroup: false,
repair: 45,
count: -1,
},
templates: [nxhgauss, nxmpulseh, nxmscouh, nxmsamh, nxmstrike]
},
"NX-VtolFactory1": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(60000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxmheapv, nxlscouv]
},
"NX-VtolFactory2": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(50000),
data: {
regroup: false,
repair: 45,
count: -1,
},
templates: [nxmpulsev]
},
});
const START_FACTORIES = [
"NX-VtolFactory1", "NX-VtolFactory2", "NX-SEFactory", "NX-NEFactory",
"NX-NWCyborgFactory"
];
for (var i = 0, l = START_FACTORIES.length; i < l; ++i)
{
camEnableFactory(START_FACTORIES[i]);
}
//Show Project transport flying video.
hackAddMessage("MB3_4_MSG3", MISS_MSG, CAM_HUMAN_PLAYER, true);
hackAddMessage("CM34_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER);
queue("enableReinforcements", 16000);
queue("enableAllFactories", camChangeOnDiff(600000)); // 10 min.
}
@@ -0,0 +1,13 @@
include("script/campaign/libcampaign.js");
function eventStartLevel()
{
camSetupTransporter(50, 245, 63, 118);
centreView(50, 245);
setNoGoArea(49, 244, 51, 246, CAM_HUMAN_PLAYER);
setScrollLimits(0, 137, 64, 256);
setMissionTime(1800); // 30 min.
setPower(50000, CAM_HUMAN_PLAYER);
camPlayVideos(["MB3_4_MSG", "MB3_4_MSG2"]);
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "CAM_3_4");
}
Oops, something went wrong.

0 comments on commit 5f144dd

Please sign in to comment.