Skip to content

Commit

Permalink
Campaign structure update and more (#3552)
Browse files Browse the repository at this point in the history
Mainly:
Buffing structures a bit, make price and build times vary according to strength.
VTOL weapons buffed and 3-wave offmap VTOL spawn attacks.

Various tweaks to improve scripts.
  • Loading branch information
KJeff01 authored Dec 9, 2023
1 parent a19141c commit 007b31e
Show file tree
Hide file tree
Showing 73 changed files with 2,056 additions and 1,181 deletions.
1 change: 0 additions & 1 deletion data/base/script/campaign/cam1-1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

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

Expand Down
12 changes: 9 additions & 3 deletions data/base/script/campaign/cam1-1s.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ include("script/campaign/libcampaign.js");

var cheat;
var powModVideoPlayed;
const mis_Labels = {
startPos: {x: 13, y: 52},
lz: {x: 10, y: 51, x2: 12, y2: 53},
trPlace: {x: 11, y: 52},
trExit: {x: 1, y: 32}
};

function eventChat(from, to, message)
{
Expand Down Expand Up @@ -43,7 +49,7 @@ function checkForPowerModule()
{
if (cheat || powerModuleBuilt())
{
camSetupTransporter(11, 52, 1, 32);
camSetupTransporter(mis_Labels.trPlace.x, mis_Labels.trPlace.y, mis_Labels.trExit.x, mis_Labels.trExit.y);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(25))); // 25 min for offworld
secondVideo();

Expand All @@ -56,8 +62,8 @@ function checkForPowerModule()

function eventStartLevel()
{
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
centreView(mis_Labels.startPos.x, mis_Labels.startPos.y);
setNoGoArea(mis_Labels.lz.x, mis_Labels.lz.y, mis_Labels.lz.x2, mis_Labels.lz.y2, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(10))); // 10 min for building module.
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_1");
cheat = false;
Expand Down
9 changes: 4 additions & 5 deletions data/base/script/campaign/cam1-2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

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

Expand Down Expand Up @@ -87,14 +86,14 @@ function eventStartLevel()
"NorthGroup": {
cleanup: "NorthBase",
detectMsg: "C1-2_BASE1",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"WestGroup": {
cleanup: "WestBase",
detectMsg: "C1-2_BASE2",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"ScavLabGroup": {
cleanup: "ScavLabCleanup",
Expand Down
14 changes: 10 additions & 4 deletions data/base/script/campaign/cam1-2s.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

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

const mis_Labels = {
startPos: {x: 13, y: 52},
lz: {x: 10, y: 51, x2: 12, y2: 53},
trPlace: {x: 11, y: 52},
trExit: {x: 39, y: 1}
};

function eventStartLevel()
{
camSetupTransporter(11, 52, 39, 1);
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
camSetupTransporter(mis_Labels.trPlace.x, mis_Labels.trPlace.y, mis_Labels.trExit.x, mis_Labels.trExit.y);
centreView(mis_Labels.startPos.x, mis_Labels.startPos.y);
setNoGoArea(mis_Labels.lz.x, mis_Labels.lz.y, mis_Labels.lz.x2, mis_Labels.lz.y2, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(30)));
camPlayVideos({video: "SB1_2_MSG", type: CAMP_MSG});
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_2");
Expand Down
23 changes: 11 additions & 12 deletions data/base/script/campaign/cam1-3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

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

Expand All @@ -8,15 +7,15 @@ const mis_newParadigmRes = [
"R-Wpn-MG1Mk1", "R-Vehicle-Body01", "R-Sys-Spade1Mk1", "R-Vehicle-Prop-Wheels",
"R-Sys-Engineering01", "R-Wpn-MG-Damage03", "R-Wpn-MG-ROF01", "R-Wpn-Cannon-Damage01",
"R-Wpn-Flamer-Damage03", "R-Wpn-Flamer-Range01", "R-Wpn-Flamer-ROF01",
"R-Defense-WallUpgrade02", "R-Struc-Materials02", "R-Vehicle-Engine01",
"R-Defense-WallUpgrade01", "R-Struc-Materials01", "R-Vehicle-Engine01",
"R-Struc-RprFac-Upgrade01", "R-Wpn-Rocket-Damage01", "R-Wpn-Rocket-ROF02",
"R-Wpn-Mortar-Damage02", "R-Wpn-Mortar-ROF01",
];
const mis_scavengerRes = [
"R-Wpn-Flamer-Damage02", "R-Wpn-Flamer-Range01", "R-Wpn-Flamer-ROF01",
"R-Wpn-MG-Damage03", "R-Wpn-MG-ROF01", "R-Wpn-Cannon-Damage01",
"R-Wpn-Mortar-Damage02", "R-Wpn-Mortar-ROF01", "R-Wpn-Rocket-ROF03",
"R-Defense-WallUpgrade02","R-Struc-Materials02",
"R-Defense-WallUpgrade01","R-Struc-Materials01",
];
var NPDefenseGroup, NPScoutGroup, NPFactory;

Expand Down Expand Up @@ -79,7 +78,7 @@ function enableNP(args)
repair: 66,
});

camPlayVideos(["pcv455.ogg", {video: "SB1_3_MSG4", type: MISS_MSG}]);
camPlayVideos([cam_sounds.incoming.incomingTransmission, {video: "SB1_3_MSG4", type: MISS_MSG}]);
}

function NPReinforce()
Expand Down Expand Up @@ -141,7 +140,7 @@ function eventAttacked(victim, attacker) {

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
playSound(cam_sounds.reinforcementsAreAvailable);
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1C", {
area: "RTLZ",
message: "C1-3_LZ",
Expand Down Expand Up @@ -177,7 +176,7 @@ function camEnemyBaseEliminated_ScavBaseGroup()

function playNPWarningMessage()
{
camPlayVideos(["pcv455.ogg", {video: "SB1_3_MSG3", type: CAMP_MSG}]);
camPlayVideos([cam_sounds.incoming.incomingTransmission, {video: "SB1_3_MSG3", type: CAMP_MSG}]);
}

function eventDroidBuilt(droid, structure)
Expand Down Expand Up @@ -233,20 +232,20 @@ function eventStartLevel()
"ScavBaseGroup": {
cleanup: "ScavBase",
detectMsg: "C1-3_BASE1",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"NPBaseGroup": {
cleanup: "NPBase",
detectMsg: "C1-3_BASE2",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg"
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated
},
"ScavBaseGroupSouth": {
cleanup: "SouthScavBase",
detectMsg: "C1-3_OBJ2",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
});

Expand Down
14 changes: 10 additions & 4 deletions data/base/script/campaign/cam1-3s.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

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

const mis_Labels = {
startPos: {x: 13, y: 52},
lz: {x: 10, y: 51, x2: 12, y2: 53},
trPlace: {x: 11, y: 52},
trExit: {x: 39, y: 126}
};

function eventStartLevel()
{
camSetupTransporter(11, 52, 39, 126);
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
camSetupTransporter(mis_Labels.trPlace.x, mis_Labels.trPlace.y, mis_Labels.trExit.x, mis_Labels.trExit.y);
centreView(mis_Labels.startPos.x, mis_Labels.startPos.y);
setNoGoArea(mis_Labels.lz.x, mis_Labels.lz.y, mis_Labels.lz.x2, mis_Labels.lz.y2, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camHoursToSeconds(1)));
camPlayVideos({video: "SB1_3_UPDATE", type: CAMP_MSG});
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_3");
Expand Down
19 changes: 9 additions & 10 deletions data/base/script/campaign/cam1-4a.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

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

const mis_newParadigmRes = [
"R-Wpn-MG1Mk1", "R-Vehicle-Body01", "R-Sys-Spade1Mk1", "R-Vehicle-Prop-Wheels",
"R-Sys-Engineering01", "R-Wpn-MG-Damage04", "R-Wpn-MG-ROF01", "R-Wpn-Cannon-Damage03",
"R-Wpn-Flamer-Damage03", "R-Wpn-Flamer-Range01", "R-Wpn-Flamer-ROF01",
"R-Defense-WallUpgrade03", "R-Struc-Materials03", "R-Vehicle-Engine02",
"R-Defense-WallUpgrade02", "R-Struc-Materials02", "R-Vehicle-Engine02",
"R-Struc-RprFac-Upgrade03", "R-Wpn-Rocket-Damage02", "R-Wpn-Rocket-ROF03",
"R-Vehicle-Metals02", "R-Wpn-Mortar-Damage03", "R-Wpn-Rocket-Accuracy01",
"R-Wpn-RocketSlow-Damage02", "R-Wpn-Mortar-ROF01",
Expand All @@ -16,7 +15,7 @@ const mis_scavengerRes = [
"R-Wpn-MG-Damage04", "R-Wpn-MG-ROF01", "R-Wpn-Rocket-Damage02",
"R-Wpn-Cannon-Damage02", "R-Wpn-Mortar-Damage03", "R-Wpn-Mortar-ROF01",
"R-Wpn-Rocket-ROF03", "R-Vehicle-Metals02",
"R-Defense-WallUpgrade03", "R-Struc-Materials03",
"R-Defense-WallUpgrade02", "R-Struc-Materials02",
];

//Pursue player when nearby but do not go too far away from defense zone.
Expand Down Expand Up @@ -48,7 +47,7 @@ camAreaEvent("removeRedObjectiveBlip", function()

camAreaEvent("LandingZoneTrigger", function()
{
camPlayVideos(["pcv456.ogg", {video: "SB1_4_B", type: MISS_MSG}]);
camPlayVideos([cam_sounds.incoming.incomingIntelligenceReport, {video: "SB1_4_B", type: MISS_MSG}]);
hackRemoveMessage("C1-4_LZ", PROX_MSG, CAM_HUMAN_PLAYER); //Remove LZ 2 blip.

const lz = getObject("LandingZone2"); // will override later
Expand Down Expand Up @@ -137,20 +136,20 @@ function eventStartLevel()
"SouthScavBaseGroup": {
cleanup: "SouthScavBase",
detectMsg: "C1-4_BASE1",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"NorthScavBaseGroup": {
cleanup: "NorthScavBase",
detectMsg: "C1-4_BASE3",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"NPBaseGroup": {
cleanup: "NPBase",
detectMsg: "C1-4_BASE2",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg"
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated
},
});

Expand Down
14 changes: 10 additions & 4 deletions data/base/script/campaign/cam1-4as.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

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

const mis_Labels = {
startPos: {x: 13, y: 52},
lz: {x: 10, y: 51, x2: 12, y2: 53},
trPlace: {x: 11, y: 52},
trExit: {x: 80, y: 1}
};

function eventStartLevel()
{
camSetupTransporter(11, 52, 80, 1);
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
camSetupTransporter(mis_Labels.trPlace.x, mis_Labels.trPlace.y, mis_Labels.trExit.x, mis_Labels.trExit.y);
centreView(mis_Labels.startPos.x, mis_Labels.startPos.y);
setNoGoArea(mis_Labels.lz.x, mis_Labels.lz.y, mis_Labels.lz.x2, mis_Labels.lz.y2, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camMinutesToSeconds(30)));
camPlayVideos({video: "SB1_4_MSG", type: MISS_MSG});
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_4A");
Expand Down
21 changes: 10 additions & 11 deletions data/base/script/campaign/cam1-5.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

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

const mis_newParadigmRes = [
"R-Wpn-MG1Mk1", "R-Vehicle-Body01", "R-Sys-Spade1Mk1", "R-Vehicle-Prop-Wheels",
"R-Sys-Engineering01", "R-Wpn-MG-Damage04", "R-Wpn-MG-ROF02", "R-Wpn-Cannon-Damage03",
"R-Wpn-Flamer-Damage03", "R-Wpn-Flamer-Range01", "R-Wpn-Flamer-ROF01",
"R-Defense-WallUpgrade03", "R-Struc-Materials03", "R-Vehicle-Engine02",
"R-Defense-WallUpgrade02", "R-Struc-Materials02", "R-Vehicle-Engine02",
"R-Struc-RprFac-Upgrade03", "R-Wpn-Rocket-Damage02", "R-Wpn-Rocket-ROF03",
"R-Vehicle-Metals02", "R-Wpn-Mortar-Damage03", "R-Wpn-Rocket-Accuracy02",
"R-Wpn-RocketSlow-Damage02", "R-Wpn-Mortar-ROF01", "R-Cyborg-Metals03",
Expand All @@ -17,7 +16,7 @@ const mis_scavengerRes = [
"R-Wpn-MG-Damage04", "R-Wpn-MG-ROF01", "R-Wpn-Rocket-Damage02",
"R-Wpn-Cannon-Damage03", "R-Wpn-Mortar-Damage03", "R-Wpn-Mortar-ROF01",
"R-Wpn-Rocket-Accuracy02", "R-Wpn-Rocket-ROF03", "R-Vehicle-Metals02",
"R-Defense-WallUpgrade03", "R-Struc-Materials03", "R-Wpn-Cannon-Accuracy01",
"R-Defense-WallUpgrade02", "R-Struc-Materials02", "R-Wpn-Cannon-Accuracy01",
"R-Wpn-Mortar-Acc01",
];
var useHeavyReinforcement;
Expand Down Expand Up @@ -210,26 +209,26 @@ function eventStartLevel()
"ScavNorthGroup": {
cleanup: "ScavNorth",
detectMsg: "C1-5_BASE1",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"ScavSouthWestGroup": {
cleanup: "ScavSouthWest",
detectMsg: "C1-5_BASE2",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"ScavSouthEastGroup": {
cleanup: "ScavSouthEast",
detectMsg: "C1-5_BASE3",
detectSnd: "pcv374.ogg",
eliminateSnd: "pcv392.ogg"
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"NPBaseGroup": {
cleanup: "NPBase",
detectMsg: "C1-5_OBJ1",
detectSnd: "pcv379.ogg",
eliminateSnd: "pcv394.ogg",
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
player: CAM_NEW_PARADIGM
},
});
Expand Down
13 changes: 10 additions & 3 deletions data/base/script/campaign/cam1-5s.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
include("script/campaign/libcampaign.js");

const mis_Labels = {
startPos: {x: 13, y: 52},
lz: {x: 10, y: 51, x2: 12, y2: 53},
trPlace: {x: 11, y: 52},
trExit: {x: 100, y: 126}
};

function eventStartLevel()
{
camSetupTransporter(11, 52, 100, 126);
centreView(13, 52);
setNoGoArea(10, 51, 12, 53, CAM_HUMAN_PLAYER);
camSetupTransporter(mis_Labels.trPlace.x, mis_Labels.trPlace.y, mis_Labels.trExit.x, mis_Labels.trExit.y);
centreView(mis_Labels.startPos.x, mis_Labels.startPos.y);
setNoGoArea(mis_Labels.lz.x, mis_Labels.lz.y, mis_Labels.lz.x2, mis_Labels.lz.y2, CAM_HUMAN_PLAYER);
setMissionTime(camChangeOnDiff(camHoursToSeconds(1)));
camPlayVideos({video: "SB1_5_MSG", type: MISS_MSG});
camSetStandardWinLossConditions(CAM_VICTORY_PRE_OFFWORLD, "SUB_1_5");
Expand Down
Loading

0 comments on commit 007b31e

Please sign in to comment.