Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Zispah authored Jan 5, 2023
1 parent a219aaf commit 4e0dff0
Show file tree
Hide file tree
Showing 95 changed files with 34,173 additions and 11,683 deletions.
6 changes: 6 additions & 0 deletions campaigns/alpha.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name" : "Alpha Campaign",
"level" : "CAM_1A",
"video" : "cam1/c001.ogg",
"captions" : "cam1/c001.txa"
}
4 changes: 4 additions & 0 deletions campaigns/beta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name" : "Beta Campaign",
"level" : "CAM_2A"
}
4 changes: 4 additions & 0 deletions campaigns/gamma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name" : "Gamma Campaign",
"level" : "CAM_3A"
}
68 changes: 68 additions & 0 deletions script/campaign/cam1-1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");

//Ambush player from scav base - triggered from middle path
camAreaEvent("scavBaseTrigger", function()
{
var ambushGroup = camMakeGroup(enumArea("eastScavs", SCAV_7, false));
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", SCAV_7, false));
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", SCAV_7, false));
camManageGroup(ambushGroup, CAM_ORDER_DEFEND, {
pos: camMakePos("ambush2")
});
});

function eventPickup(feature, droid)
{
if (droid.player === CAM_HUMAN_PLAYER && feature.stattype === ARTIFACT)
{
hackRemoveMessage("C1-1_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER);
}
}

//Mission setup stuff
function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_2S", {
area: "RTLZ",
message: "C1-1_LZ",
reinforcements: -1, //No reinforcements
retlz: true
});

var startpos = getObject("startPosition");
var lz = getObject("landingZone"); //player lz
var tent = getObject("transporterEntry");
var text = getObject("transporterExit");
centreView(startpos.x, startpos.y);
setNoGoArea(lz.x, lz.y, lz.x2, lz.y2, CAM_HUMAN_PLAYER);
startTransporterEntry(tent.x, tent.y, CAM_HUMAN_PLAYER);
setTransporterExit(text.x, text.y, CAM_HUMAN_PLAYER);

//Get rid of the already existing crate and replace with another
camSafeRemoveObject("artifact1", false);
camSetArtifacts({
"artifactLocation": { tech: "R-Wpn-MG3Mk1" }, //Heavy machine gun
});

camPlayVideos("FLIGHT");
hackAddMessage("C1-1_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true);

}
68 changes: 68 additions & 0 deletions script/campaign/cam1-1s.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
include("script/campaign/libcampaign.js");

var cheat;

function eventChat(from, to, message)
{
if (camIsCheating() && message === "let me win")
{
cheat = true;
}
}

//Video if player does not yet have power module built
function resPowModVideo()
{
camPlayVideos("MB1_B2_MSG");
}

//Sector clear commander!
function secondVideo()
{
camPlayVideos("SB1_1_MSG");
}

//Has player built the power module?
function powerModuleBuilt()
{
var gens = enumStruct(CAM_HUMAN_PLAYER, POWER_GEN, false);
for (var x = 0, l = gens.length; x < l; ++x)
{
if ((gens[x].modules > 0) && (gens[x].status === BUILT))
{
return true;
}
}
return false;
}

//Only way to pass this mission is to build a power module or be in cheat mode.
function checkForPowerModule()
{
if (cheat || powerModuleBuilt())
{
camSetupTransporter(11, 52, 1, 32);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(15))); // 15 min for offworld
secondVideo();
}
else
{
queue("checkForPowerModule", camSecondsToMilliseconds(3));
}
}

function eventStartLevel()
{
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(10))); // 10 min for building module.
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_1");
cheat = false;

if (!powerModuleBuilt())
{
resPowModVideo();
}

checkForPowerModule();
}
135 changes: 135 additions & 0 deletions script/campaign/cam1-2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@

include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");

function exposeNorthBase()
{
camDetectEnemyBase("NorthGroup"); // no problem if already detected
camPlayVideos("SB1_2_MSG2");
}

function camArtifactPickup_ScavLab()
{
camCallOnce("exposeNorthBase");
camSetFactoryData("WestFactory", {
assembly: "WestAssembly",
order: CAM_ORDER_COMPROMISE,
data: {
pos: [
camMakePos("WestAssembly"),
camMakePos("GatesPos"),
camMakePos("RTLZ"), // changes
],
radius: 8
},
groupSize: 5,
maxSize: 9,
throttle: camChangeOnDiff(camSecondsToMilliseconds(10)),
templates: [ cTempl.trike, cTempl.bloke, cTempl.buggy, cTempl.bjeep ]
});
camEnableFactory("WestFactory");
}

function camEnemyBaseDetected_NorthGroup()
{
camCallOnce("exposeNorthBase");
}

camAreaEvent("NorthBaseTrigger", function(droid)
{
// frankly, this one happens silently
camEnableFactory("NorthFactory");
});

function enableWestFactory()
{
camEnableFactory("WestFactory");
camManageGroup(camMakeGroup("RaidGroup"), CAM_ORDER_ATTACK, {
pos: camMakePos("RTLZ"),
morale: 80,
fallback: camMakePos("ScavLab")
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_3S", {
area: "RTLZ",
message: "C1-2_LZ",
reinforcements: 60,
retlz: true
});

var startpos = getObject("StartPosition");
var lz = getObject("LandingZone");
var tent = getObject("TransporterEntry");
var text = getObject("TransporterExit");
centreView(startpos.x, startpos.y);
setNoGoArea(lz.x, lz.y, lz.x2, lz.y2, CAM_HUMAN_PLAYER);
startTransporterEntry(tent.x, tent.y, CAM_HUMAN_PLAYER);
setTransporterExit(text.x, text.y, CAM_HUMAN_PLAYER);

camSetEnemyBases({
"NorthGroup": {
cleanup: "NorthBase",
detectMsg: "C1-2_BASE1",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
},
"WestGroup": {
cleanup: "WestBase",
detectMsg: "C1-2_BASE2",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
},
"ScavLabGroup": {
cleanup: "ScavLabCleanup",
detectMsg: "C1-2_OBJ1",
},
});

camDetectEnemyBase("ScavLabGroup");

camSetArtifacts({
"ScavLab": { tech: "R-Wpn-Mortar01Lt" },
"NorthFactory": { tech: "R-Vehicle-Prop-Halftracks" },
});

camSetFactories({
"NorthFactory": {
assembly: "NorthAssembly",
order: CAM_ORDER_COMPROMISE,
data: {
pos: [
camMakePos("NorthAssembly"),
camMakePos("ScavLabPos"),
camMakePos("RTLZ"),
],
radius: 8
},
groupSize: 5,
maxSize: 9,
throttle: camChangeOnDiff(camSecondsToMilliseconds(15)),
group: camMakeGroup("NorthTankGroup"),
templates: [ cTempl.trike, cTempl.bloke, cTempl.buggy, cTempl.bjeep ]
},
"WestFactory": {
assembly: "WestAssembly",
order: CAM_ORDER_COMPROMISE,
data: {
pos: [
camMakePos("WestAssembly"),
camMakePos("GatesPos"),
camMakePos("ScavLabPos"),
],
radius: 8
},
groupSize: 5,
maxSize: 9,
throttle: camChangeOnDiff(camSecondsToMilliseconds(10)),
templates: [ cTempl.trike, cTempl.bloke, cTempl.buggy, cTempl.bjeep ]
},
});

queue("enableWestFactory", camSecondsToMilliseconds(30));
}
12 changes: 12 additions & 0 deletions script/campaign/cam1-2s.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

include("script/campaign/libcampaign.js");

function eventStartLevel()
{
camSetupTransporter(11, 52, 39, 1);
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(30)));
camPlayVideos("SB1_2_MSG");
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_2");
}
Loading

0 comments on commit 4e0dff0

Please sign in to comment.