diff --git a/Makefile b/Makefile index 898b28f433d2..ffb9998fb95d 100644 --- a/Makefile +++ b/Makefile @@ -120,7 +120,7 @@ check-scripts: @echo "Checking for Lua syntax errors..." @luac -p $(shell find mods/*/maps/* -iname '*.lua') @luac -p $(shell find lua/* -iname '*.lua') - @luac -p $(shell find mods/*/bits/scripts/* -iname '*.lua') + @luac -p $(shell find mods/*/scripts/* -iname '*.lua') test: all @echo diff --git a/make.ps1 b/make.ps1 index 129bb7d158b4..e4f3b8297378 100644 --- a/make.ps1 +++ b/make.ps1 @@ -144,7 +144,7 @@ function Check-Scripts-Command { luac -p $script } - foreach ($script in ls "mods/*/bits/scripts/*.lua") + foreach ($script in ls "mods/*/scripts/*.lua") { luac -p $script } diff --git a/mods/cnc/maps/cnc64gdi01/rules.yaml b/mods/cnc/maps/cnc64gdi01/rules.yaml index 5974ba1f891b..624aacef8fe0 100644 --- a/mods/cnc/maps/cnc64gdi01/rules.yaml +++ b/mods/cnc/maps/cnc64gdi01/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, cnc64gdi01.lua + Scripts: campaign.lua, utils.lua, cnc64gdi01.lua MusicPlaylist: StartingMusic: aoi MissionData: diff --git a/mods/cnc/maps/funpark01/rules.yaml b/mods/cnc/maps/funpark01/rules.yaml index f0321a3fc6a9..ed5d69bc9327 100644 --- a/mods/cnc/maps/funpark01/rules.yaml +++ b/mods/cnc/maps/funpark01/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, scj01ea.lua + Scripts: campaign.lua, utils.lua, scj01ea.lua MusicPlaylist: StartingMusic: j1 MissionData: diff --git a/mods/cnc/maps/gdi01/rules.yaml b/mods/cnc/maps/gdi01/rules.yaml index 909cfd1692c6..2103777e457f 100644 --- a/mods/cnc/maps/gdi01/rules.yaml +++ b/mods/cnc/maps/gdi01/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi01.lua + Scripts: campaign.lua, utils.lua, gdi01.lua MusicPlaylist: StartingMusic: aoi MissionData: diff --git a/mods/cnc/maps/gdi02/rules.yaml b/mods/cnc/maps/gdi02/rules.yaml index 5a60e81f82bc..1a3933cad5c6 100644 --- a/mods/cnc/maps/gdi02/rules.yaml +++ b/mods/cnc/maps/gdi02/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi02.lua + Scripts: campaign.lua, utils.lua, gdi02.lua MusicPlaylist: StartingMusic: befeared MissionData: diff --git a/mods/cnc/maps/gdi03/rules.yaml b/mods/cnc/maps/gdi03/rules.yaml index 241ad451063b..d19ff0f452b1 100644 --- a/mods/cnc/maps/gdi03/rules.yaml +++ b/mods/cnc/maps/gdi03/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi03.lua + Scripts: campaign.lua, utils.lua, gdi03.lua MusicPlaylist: StartingMusic: crep226m MissionData: diff --git a/mods/cnc/maps/gdi04a/rules.yaml b/mods/cnc/maps/gdi04a/rules.yaml index f30e998d5978..b562069855cb 100644 --- a/mods/cnc/maps/gdi04a/rules.yaml +++ b/mods/cnc/maps/gdi04a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi04a.lua + Scripts: campaign.lua, utils.lua, gdi04a.lua MusicPlaylist: StartingMusic: fist226m MissionData: diff --git a/mods/cnc/maps/gdi04b/rules.yaml b/mods/cnc/maps/gdi04b/rules.yaml index 1cf712f95c99..b45cfa49575e 100644 --- a/mods/cnc/maps/gdi04b/rules.yaml +++ b/mods/cnc/maps/gdi04b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi04b.lua + Scripts: campaign.lua, utils.lua, gdi04b.lua MusicPlaylist: StartingMusic: fist226m MissionData: diff --git a/mods/cnc/maps/gdi04c/rules.yaml b/mods/cnc/maps/gdi04c/rules.yaml index 8fe9733b2133..684c763e5af4 100644 --- a/mods/cnc/maps/gdi04c/rules.yaml +++ b/mods/cnc/maps/gdi04c/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi04c.lua + Scripts: campaign.lua, utils.lua, gdi04c.lua MusicPlaylist: StartingMusic: ind MissionData: diff --git a/mods/cnc/maps/gdi05a/rules.yaml b/mods/cnc/maps/gdi05a/rules.yaml index abd26bf6df58..87939d7f256b 100644 --- a/mods/cnc/maps/gdi05a/rules.yaml +++ b/mods/cnc/maps/gdi05a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi05a.lua + Scripts: campaign.lua, utils.lua, gdi05a.lua MusicPlaylist: StartingMusic: rain MissionData: diff --git a/mods/cnc/maps/gdi05b/rules.yaml b/mods/cnc/maps/gdi05b/rules.yaml index a1ac4abb9996..6e73d4f3c852 100644 --- a/mods/cnc/maps/gdi05b/rules.yaml +++ b/mods/cnc/maps/gdi05b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi05b.lua + Scripts: campaign.lua, utils.lua, gdi05b.lua MusicPlaylist: StartingMusic: rain MissionData: diff --git a/mods/cnc/maps/gdi05c/rules.yaml b/mods/cnc/maps/gdi05c/rules.yaml index b0d966a3835f..c0350711f393 100644 --- a/mods/cnc/maps/gdi05c/rules.yaml +++ b/mods/cnc/maps/gdi05c/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi05c.lua + Scripts: campaign.lua, utils.lua, gdi05c.lua MissionData: Briefing: A GDI field base is under attack. They have fended off one attack but will not survive another.\n\nMove to the base, repair the structures and then launch a strike force to destroy the Nod base in the area.\n\nDestroy all Nod units and structures. BackgroundVideo: podium.vqa diff --git a/mods/cnc/maps/gdi06/rules.yaml b/mods/cnc/maps/gdi06/rules.yaml index 77063332a680..92725d1ef49d 100644 --- a/mods/cnc/maps/gdi06/rules.yaml +++ b/mods/cnc/maps/gdi06/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi06.lua + Scripts: campaign.lua, utils.lua, gdi06.lua MusicPlaylist: BackgroundMusic: rain-ambient StartingMusic: rain diff --git a/mods/cnc/maps/gdi07/rules.yaml b/mods/cnc/maps/gdi07/rules.yaml index 9d46b56604fb..4d0d435d2ca2 100644 --- a/mods/cnc/maps/gdi07/rules.yaml +++ b/mods/cnc/maps/gdi07/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi07.lua + Scripts: campaign.lua, utils.lua, gdi07.lua MissionData: Briefing: Previous mission objective not complete.\nAirfield was to be targeted. \n\nNew objective: Build up a base and Destroy remaining Nod structures and units.\n\nReinforcements will be provided. BriefingVideo: gdi7.vqa diff --git a/mods/cnc/maps/gdi08a/rules.yaml b/mods/cnc/maps/gdi08a/rules.yaml index 78f0b1e18e83..965e0ae93e3e 100644 --- a/mods/cnc/maps/gdi08a/rules.yaml +++ b/mods/cnc/maps/gdi08a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi08a.lua, gdi08a-AI.lua + Scripts: campaign.lua, utils.lua, gdi08a.lua, gdi08a-AI.lua MusicPlaylist: StartingMusic: march VictoryMusic: gdi_win1 diff --git a/mods/cnc/maps/gdi08b/rules.yaml b/mods/cnc/maps/gdi08b/rules.yaml index c3d8e982c15f..9dd171821399 100644 --- a/mods/cnc/maps/gdi08b/rules.yaml +++ b/mods/cnc/maps/gdi08b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi08b.lua, gdi08b-AI.lua + Scripts: campaign.lua, utils.lua, gdi08b.lua, gdi08b-AI.lua MusicPlaylist: StartingMusic: march VictoryMusic: gdi_win1 diff --git a/mods/cnc/maps/gdi09/rules.yaml b/mods/cnc/maps/gdi09/rules.yaml index 037cb8c964c4..dc8e4b51d554 100644 --- a/mods/cnc/maps/gdi09/rules.yaml +++ b/mods/cnc/maps/gdi09/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, gdi09.lua, gdi09-AI.lua + Scripts: campaign.lua, utils.lua, gdi09.lua, gdi09-AI.lua MusicPlaylist: StartingMusic: march VictoryMusic: gdi_win1 diff --git a/mods/cnc/maps/nod01/rules.yaml b/mods/cnc/maps/nod01/rules.yaml index fb0e2252dfe1..3e57dd69709a 100644 --- a/mods/cnc/maps/nod01/rules.yaml +++ b/mods/cnc/maps/nod01/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod01.lua + Scripts: campaign.lua, utils.lua, nod01.lua MusicPlaylist: StartingMusic: nomercy VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod02a/rules.yaml b/mods/cnc/maps/nod02a/rules.yaml index df5f3ce90d13..c6ac76b18b36 100644 --- a/mods/cnc/maps/nod02a/rules.yaml +++ b/mods/cnc/maps/nod02a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod02a.lua + Scripts: campaign.lua, utils.lua, nod02a.lua MusicPlaylist: StartingMusic: ind2 VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod02b/rules.yaml b/mods/cnc/maps/nod02b/rules.yaml index cc17ed1c1786..79db193aafe0 100644 --- a/mods/cnc/maps/nod02b/rules.yaml +++ b/mods/cnc/maps/nod02b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, nod02b.lua + Scripts: campaign.lua, utils.lua, nod02b.lua MusicPlaylist: StartingMusic: ind2 VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod03a/rules.yaml b/mods/cnc/maps/nod03a/rules.yaml index 385588d32b25..f36404602a86 100644 --- a/mods/cnc/maps/nod03a/rules.yaml +++ b/mods/cnc/maps/nod03a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod03a.lua + Scripts: campaign.lua, utils.lua, nod03a.lua MusicPlaylist: StartingMusic: chrg226m VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod03b/rules.yaml b/mods/cnc/maps/nod03b/rules.yaml index ca09228bad28..387a12b5c85e 100644 --- a/mods/cnc/maps/nod03b/rules.yaml +++ b/mods/cnc/maps/nod03b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod03b.lua + Scripts: campaign.lua, utils.lua, nod03b.lua MusicPlaylist: StartingMusic: chrg226m VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod04a/rules.yaml b/mods/cnc/maps/nod04a/rules.yaml index abb26b01db35..a25d03a6b499 100644 --- a/mods/cnc/maps/nod04a/rules.yaml +++ b/mods/cnc/maps/nod04a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod04a.lua + Scripts: campaign.lua, utils.lua, nod04a.lua MusicPlaylist: StartingMusic: warfare VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod04b/rules.yaml b/mods/cnc/maps/nod04b/rules.yaml index 2ebbc0db0f8e..4f2c51cdaff8 100644 --- a/mods/cnc/maps/nod04b/rules.yaml +++ b/mods/cnc/maps/nod04b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod04b.lua + Scripts: campaign.lua, utils.lua, nod04b.lua MusicPlaylist: StartingMusic: valkyrie VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod05/rules.yaml b/mods/cnc/maps/nod05/rules.yaml index 91fc04a82075..b955aa593a92 100644 --- a/mods/cnc/maps/nod05/rules.yaml +++ b/mods/cnc/maps/nod05/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod05.lua + Scripts: campaign.lua, utils.lua, nod05.lua MusicPlaylist: StartingMusic: airstrik VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod06a/rules.yaml b/mods/cnc/maps/nod06a/rules.yaml index e8dd71ca2b9d..bb83010cda14 100644 --- a/mods/cnc/maps/nod06a/rules.yaml +++ b/mods/cnc/maps/nod06a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod06a.lua + Scripts: campaign.lua, utils.lua, nod06a.lua MusicPlaylist: StartingMusic: rout VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod06b/rules.yaml b/mods/cnc/maps/nod06b/rules.yaml index f66012a28dc8..3bf4d1c3b11e 100644 --- a/mods/cnc/maps/nod06b/rules.yaml +++ b/mods/cnc/maps/nod06b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod06b.lua + Scripts: campaign.lua, utils.lua, nod06b.lua MusicPlaylist: StartingMusic: rout VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod06c/rules.yaml b/mods/cnc/maps/nod06c/rules.yaml index 8260381f7cde..367debae0d85 100644 --- a/mods/cnc/maps/nod06c/rules.yaml +++ b/mods/cnc/maps/nod06c/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod06c.lua + Scripts: campaign.lua, utils.lua, nod06c.lua MusicPlaylist: StartingMusic: rout VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod07a/rules.yaml b/mods/cnc/maps/nod07a/rules.yaml index 7c05275f6553..a3e51c319654 100644 --- a/mods/cnc/maps/nod07a/rules.yaml +++ b/mods/cnc/maps/nod07a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod07a.lua, nod07a-AI.lua + Scripts: campaign.lua, utils.lua, nod07a.lua, nod07a-AI.lua MusicPlaylist: StartingMusic: justdoit VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod07b/rules.yaml b/mods/cnc/maps/nod07b/rules.yaml index f570cf437442..5c5bfa3b82d4 100644 --- a/mods/cnc/maps/nod07b/rules.yaml +++ b/mods/cnc/maps/nod07b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod07b.lua, nod07b-AI.lua + Scripts: campaign.lua, utils.lua, nod07b.lua, nod07b-AI.lua MusicPlaylist: StartingMusic: justdoit VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod07c/rules.yaml b/mods/cnc/maps/nod07c/rules.yaml index 094f7b06d91a..d00ca4182a00 100644 --- a/mods/cnc/maps/nod07c/rules.yaml +++ b/mods/cnc/maps/nod07c/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod07c.lua + Scripts: campaign.lua, utils.lua, nod07c.lua MusicPlaylist: StartingMusic: justdoit VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod08a/rules.yaml b/mods/cnc/maps/nod08a/rules.yaml index 81e9de007be4..42229a3a88ff 100644 --- a/mods/cnc/maps/nod08a/rules.yaml +++ b/mods/cnc/maps/nod08a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod08a.lua, nod08a-AI.lua + Scripts: campaign.lua, utils.lua, nod08a.lua, nod08a-AI.lua MusicPlaylist: StartingMusic: linefire VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod08b/rules.yaml b/mods/cnc/maps/nod08b/rules.yaml index ea49e7e2a163..863caa3498ed 100644 --- a/mods/cnc/maps/nod08b/rules.yaml +++ b/mods/cnc/maps/nod08b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod08b.lua, nod08b-AI.lua + Scripts: campaign.lua, utils.lua, nod08b.lua, nod08b-AI.lua MusicPlaylist: StartingMusic: linefire VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod09/rules.yaml b/mods/cnc/maps/nod09/rules.yaml index b0a135f6fdf2..a701efb0df1d 100644 --- a/mods/cnc/maps/nod09/rules.yaml +++ b/mods/cnc/maps/nod09/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod09.lua, nod09-AI.lua + Scripts: campaign.lua, utils.lua, nod09.lua, nod09-AI.lua MusicPlaylist: StartingMusic: march VictoryMusic: nod_win1 diff --git a/mods/cnc/maps/nod10a/rules.yaml b/mods/cnc/maps/nod10a/rules.yaml index dc549e646a1f..1c01916531cb 100644 --- a/mods/cnc/maps/nod10a/rules.yaml +++ b/mods/cnc/maps/nod10a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod10a.lua + Scripts: campaign.lua, utils.lua, nod10a.lua MissionData: Briefing: GDI is developing an orbital weapon. Our spies have told us of a large lake near the location of the R&D center.\n\nFind the base, and use the sniper to eliminate their scientist. BackgroundVideo: kanepre.vqa diff --git a/mods/cnc/maps/nod10b/rules.yaml b/mods/cnc/maps/nod10b/rules.yaml index 4d9932e462cf..78dd0a5ac4ae 100644 --- a/mods/cnc/maps/nod10b/rules.yaml +++ b/mods/cnc/maps/nod10b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, nod10b.lua + Scripts: campaign.lua, utils.lua, nod10b.lua MissionData: Briefing: GDI is developing a new, heavily armored tank. Our spies have located the GDI R&D base.\n\nUse your small strike force to locate and penetrate the center. Be sure to destroy the tanks in the base and the factory. BackgroundVideo: kanepre.vqa diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index d3e23131e439..02050f693ced 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -31,7 +31,8 @@ Packages: cnc|bits/jungle cnc|bits/desert cnc|bits/ss - cnc|bits/scripts + cnc|scripts + common|scripts cnc|uibits MapFolders: diff --git a/mods/cnc/bits/scripts/campaign-global.lua b/mods/cnc/scripts/campaign.lua similarity index 97% rename from mods/cnc/bits/scripts/campaign-global.lua rename to mods/cnc/scripts/campaign.lua index 28f8c3c50aba..11ce2b905633 100644 --- a/mods/cnc/bits/scripts/campaign-global.lua +++ b/mods/cnc/scripts/campaign.lua @@ -6,11 +6,8 @@ the License, or (at your option) any later version. For more information, see COPYING. ]] -IdleHunt = function(actor) - if actor.HasProperty("Hunt") and not actor.IsDead then - Trigger.OnIdle(actor, actor.Hunt) - end -end + +Difficulty = Map.LobbyOption("difficulty") InitObjectives = function(player) Trigger.OnObjectiveAdded(player, function(p, id) diff --git a/mods/common/scripts/utils.lua b/mods/common/scripts/utils.lua new file mode 100644 index 000000000000..c9b0dbfc51e5 --- /dev/null +++ b/mods/common/scripts/utils.lua @@ -0,0 +1,14 @@ +--[[ + Copyright 2007-2021 The OpenRA Developers (see AUTHORS) + This file is part of OpenRA, which is free software. It is made + available to you under the terms of the GNU General Public License + as published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. For more + information, see COPYING. +]] + +IdleHunt = function(actor) + if actor.HasProperty("Hunt") and not actor.IsDead then + Trigger.OnIdle(actor, actor.Hunt) + end +end diff --git a/mods/d2k/maps/atreides-01a/rules.yaml b/mods/d2k/maps/atreides-01a/rules.yaml index e0fd95f13829..91384c44cfb6 100644 --- a/mods/d2k/maps/atreides-01a/rules.yaml +++ b/mods/d2k/maps/atreides-01a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides01a.lua + Scripts: campaign.lua, utils.lua, atreides01a.lua MissionData: Briefing: Harvest Spice from the Imperial Basin. Construct a Spice Refinery and defend it against the Harkonnen troops scattered throughout the basin. You have been assigned only limited offensive forces - use them wisely.\n\nYou will have to learn the subtleties of mining as you go, but remember to build Silos to store the Spice. When you run out of storage space you can not gather more Spice. Also, any building without adequate concrete foundation will need immediate repair and be vulnerable to erosive damage from the harsh environment. Your greatest adversary may be the elements.\n\nGood luck.\n BriefingVideo: A_BR01_E.VQA diff --git a/mods/d2k/maps/atreides-01b/rules.yaml b/mods/d2k/maps/atreides-01b/rules.yaml index 6649ba15412c..e37a4c285354 100644 --- a/mods/d2k/maps/atreides-01b/rules.yaml +++ b/mods/d2k/maps/atreides-01b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides01b.lua + Scripts: campaign.lua, utils.lua, atreides01b.lua MissionData: Briefing: Harvest Spice from the Imperial Basin. Construct a Spice Refinery and defend it against the Harkonnen troops scattered throughout the basin. You have been assigned only limited offensive forces - use them wisely.\n\nYou will have to learn the subtleties of mining as you go, but remember to build Silos to store the Spice. When you run out of storage space you can not gather more Spice. Also, any building without adequate concrete foundation will need immediate repair and be vulnerable to erosive damage from the harsh environment. Your greatest adversary may be the elements.\n\nGood luck.\n BriefingVideo: A_BR01_E.VQA diff --git a/mods/d2k/maps/atreides-02a/rules.yaml b/mods/d2k/maps/atreides-02a/rules.yaml index 8f1fcb5e9a02..1b0187e1ef05 100644 --- a/mods/d2k/maps/atreides-02a/rules.yaml +++ b/mods/d2k/maps/atreides-02a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides02a.lua, atreides02a-AI.lua + Scripts: campaign.lua, utils.lua, atreides02a.lua, atreides02a-AI.lua MissionData: Briefing: Infiltrate the Imperial Basin and build up our forces until they are strong enough to eradicate the local Harkonnen presence.\n\nThe Harkonnen are reinforcing their troops by air, so be on your guard. Use the Outpost's radar to detect attacks from unexpected quarters.\n\nBe careful when mining the Spice. Spice mounds grow out of the sand. While a vital source of Spice, Spice mounds can damage or destroy any unit that blunders into them.\n\nGood luck.\n BriefingVideo: A_BR02_E.VQA diff --git a/mods/d2k/maps/atreides-02b/rules.yaml b/mods/d2k/maps/atreides-02b/rules.yaml index 770415a2fcfa..506f246cc434 100644 --- a/mods/d2k/maps/atreides-02b/rules.yaml +++ b/mods/d2k/maps/atreides-02b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides02b.lua, atreides02b-AI.lua + Scripts: campaign.lua, utils.lua, atreides02b.lua, atreides02b-AI.lua MissionData: Briefing: Infiltrate the Imperial Basin and build up our forces until they are strong enough to eradicate the local Harkonnen presence.\n\nThe Harkonnen are reinforcing their troops by air, so be on your guard. Use the Outpost's radar to detect attacks from unexpected quarters.\n\nBe careful when mining the Spice. Spice mounds grow out of the sand. While a vital source of Spice, Spice mounds can damage or destroy any unit that blunders into them.\n\nGood luck.\n BriefingVideo: A_BR02_E.VQA diff --git a/mods/d2k/maps/atreides-03a/rules.yaml b/mods/d2k/maps/atreides-03a/rules.yaml index abdf02b74896..7d32717adc93 100644 --- a/mods/d2k/maps/atreides-03a/rules.yaml +++ b/mods/d2k/maps/atreides-03a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides03a.lua, atreides03a-AI.lua + Scripts: campaign.lua, utils.lua, atreides03a.lua, atreides03a-AI.lua MissionData: Briefing: Bring the Atreides forces up to combat strength - quickly. Guard against surprise attacks and ensure Spice production.\n\nThe Ordos forces are light but numerous. To combat the Ordos, you have been granted license to produce Quads, which have a greater anti-vehicle capability than Trikes. Upgrade your Light Factories to allow production of these units.\n\nMeet any aggression with overwhelming force.\n\nGood luck.\n BriefingVideo: A_BR03_E.VQA diff --git a/mods/d2k/maps/atreides-03b/rules.yaml b/mods/d2k/maps/atreides-03b/rules.yaml index e7d08977535d..d995aa55ad59 100644 --- a/mods/d2k/maps/atreides-03b/rules.yaml +++ b/mods/d2k/maps/atreides-03b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides03b.lua, atreides03b-AI.lua + Scripts: campaign.lua, utils.lua, atreides03b.lua, atreides03b-AI.lua MissionData: Briefing: Bring the Atreides forces up to combat strength - quickly. Guard against surprise attacks and ensure Spice production.\n\nThe Ordos forces are light but numerous. To combat the Ordos, you have been granted license to produce Quads, which have a greater anti-vehicle capability than Trikes. Upgrade your Light Factories to allow production of these units.\n\nMeet any aggression with overwhelming force.\n\nGood luck.\n BriefingVideo: A_BR03_E.VQA diff --git a/mods/d2k/maps/atreides-04/rules.yaml b/mods/d2k/maps/atreides-04/rules.yaml index afad0b8a7403..c3e7d488566e 100644 --- a/mods/d2k/maps/atreides-04/rules.yaml +++ b/mods/d2k/maps/atreides-04/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides04.lua, atreides04-AI.lua + Scripts: campaign.lua, utils.lua, atreides04.lua, atreides04-AI.lua MissionData: Briefing: Our scouts have discovered the hidden Fremen base. The Harkonnen blockade of the Fremen must be broken.\n\nPowerful Harkonnen forces to the South are massing for an assault on the Fremen. Heavy forces have been allocated to you to smash through the Harkonnen fortifications and come to the aid of the Fremen.\n\nGood luck.\n BriefingVideo: A_BR04_E.VQA diff --git a/mods/d2k/maps/atreides-05/rules.yaml b/mods/d2k/maps/atreides-05/rules.yaml index f652486ab950..219a799d0fb4 100644 --- a/mods/d2k/maps/atreides-05/rules.yaml +++ b/mods/d2k/maps/atreides-05/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, atreides05.lua, atreides05-AI.lua + Scripts: campaign.lua, utils.lua, atreides05.lua, atreides05-AI.lua MissionData: Briefing: According to our spies, the Fremen are being held at the far Northwest corner of Sietch Tabr. Push your way through the Harkonnen ranks to rescue the hostages.\n\nScout the terrain before you launch the main assault. Our Engineers must reach the Barracks and capture it intact. The rest of the base can be razed to the ground.\n\nAdditionally, there are rumors of an illegal Smuggling operation in the area. A large shipment of contraband is expected at the Smuggler's Starport. If you can capture the Starport before the contraband arrives, you will be able to confiscate it for the Atreides war effort.\n\nBe warned, the Smugglers have Mercenary allies who may assist them if you interfere.\n\nGood luck.\n BriefingVideo: A_BR05_E.VQA diff --git a/mods/d2k/maps/harkonnen-01a/rules.yaml b/mods/d2k/maps/harkonnen-01a/rules.yaml index 239cf84d40f2..dbb1f4cea909 100644 --- a/mods/d2k/maps/harkonnen-01a/rules.yaml +++ b/mods/d2k/maps/harkonnen-01a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen01a.lua + Scripts: campaign.lua, utils.lua, harkonnen01a.lua MissionData: Briefing: Mine the Spice from the Imperial Basin, before the Atreides try to seize the area. Execute anyone who tries to stop you.\n\nBuild Silos to store the Spice. Remember to place buildings on concrete foundations to prevent erosion and gradual decline. To build without concrete would be inefficient. Inefficiency will not be tolerated.\n BriefingVideo: H_BR01_E.VQA diff --git a/mods/d2k/maps/harkonnen-01b/rules.yaml b/mods/d2k/maps/harkonnen-01b/rules.yaml index 4a69d99353f1..694a5cf41153 100644 --- a/mods/d2k/maps/harkonnen-01b/rules.yaml +++ b/mods/d2k/maps/harkonnen-01b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen01b.lua + Scripts: campaign.lua, utils.lua, harkonnen01b.lua MissionData: Briefing: Mine the Spice from the Imperial Basin, before the Atreides try to seize the area. Execute anyone who tries to stop you.\n\nBuild Silos to store the Spice. Remember to place buildings on concrete foundations to prevent erosion and gradual decline. To build without concrete would be inefficient. Inefficiency will not be tolerated.\n BriefingVideo: H_BR01_E.VQA diff --git a/mods/d2k/maps/harkonnen-02a/rules.yaml b/mods/d2k/maps/harkonnen-02a/rules.yaml index 4a58f303148f..f2c44cb36474 100644 --- a/mods/d2k/maps/harkonnen-02a/rules.yaml +++ b/mods/d2k/maps/harkonnen-02a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen02a.lua, harkonnen02a-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen02a.lua, harkonnen02a-AI.lua MissionData: Briefing: Strengthen your forces at our mining camp in the Imperial Basin. We must punish the Atreides for their insolence. Teach them the consequences of opposing House Harkonnen.\n\nOur radar will help you find your targets.\n BriefingVideo: H_BR02_E.VQA diff --git a/mods/d2k/maps/harkonnen-02b/rules.yaml b/mods/d2k/maps/harkonnen-02b/rules.yaml index 770051b86537..9f98afcbd012 100644 --- a/mods/d2k/maps/harkonnen-02b/rules.yaml +++ b/mods/d2k/maps/harkonnen-02b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen02b.lua, harkonnen02b-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen02b.lua, harkonnen02b-AI.lua MissionData: Briefing: Strengthen your forces at our mining camp in the Imperial Basin. We must punish the Atreides for their insolence. Teach them the consequences of opposing House Harkonnen.\n\nOur radar will help you find your targets.\n BriefingVideo: H_BR02_E.VQA diff --git a/mods/d2k/maps/harkonnen-03a/rules.yaml b/mods/d2k/maps/harkonnen-03a/rules.yaml index 71efa619b0df..2da33d4eb420 100644 --- a/mods/d2k/maps/harkonnen-03a/rules.yaml +++ b/mods/d2k/maps/harkonnen-03a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen03a.lua, harkonnen03a-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen03a.lua, harkonnen03a-AI.lua MissionData: Briefing: Attack and destroy the Atreides base at Sietch Tabr. Strike hard and eliminate all resistance.\n\nHeavier Quad vehicles will be made available for your attack. Upgrade your Light Factory to gain access to these vehicles.\n BriefingVideo: H_BR03_E.VQA diff --git a/mods/d2k/maps/harkonnen-03b/rules.yaml b/mods/d2k/maps/harkonnen-03b/rules.yaml index c260179c9148..b85175c99185 100644 --- a/mods/d2k/maps/harkonnen-03b/rules.yaml +++ b/mods/d2k/maps/harkonnen-03b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen03b.lua, harkonnen03b-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen03b.lua, harkonnen03b-AI.lua MissionData: Briefing: Attack and destroy the Atreides base at Sietch Tabr. Strike hard and eliminate all resistance.\n\nHeavier Quad vehicles will be made available for your attack. Upgrade your Light Factory to gain access to these vehicles.\n BriefingVideo: H_BR03_E.VQA diff --git a/mods/d2k/maps/harkonnen-04/rules.yaml b/mods/d2k/maps/harkonnen-04/rules.yaml index 10338cf9eb8e..c403e8d0d3e3 100644 --- a/mods/d2k/maps/harkonnen-04/rules.yaml +++ b/mods/d2k/maps/harkonnen-04/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen04.lua, harkonnen04-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen04.lua, harkonnen04-AI.lua MissionData: Briefing: The native Fremen must be dealt with. Assemble a strike force to lead a sweep through the mountains. Seek out the Fremen hold, and destroy it. If any House responds, destroy it.\n\nTanks have been deployed to grind the Fremen beneath their treads. Demonstrate the power of House Harkonnen. BriefingVideo: H_BR04_E.VQA diff --git a/mods/d2k/maps/harkonnen-05/rules.yaml b/mods/d2k/maps/harkonnen-05/rules.yaml index e0bfc2e6015d..58591d8da461 100644 --- a/mods/d2k/maps/harkonnen-05/rules.yaml +++ b/mods/d2k/maps/harkonnen-05/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen05.lua, harkonnen05-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen05.lua, harkonnen05-AI.lua MissionData: Briefing: Protect the Outpost at Habbanya to prevent Imperial interference. Rush ground troops through the mountain passes and secure our Outpost. Once this is done, turn on the Ordos and crush them. BriefingVideo: H_BR05_E.VQA diff --git a/mods/d2k/maps/harkonnen-06a/rules.yaml b/mods/d2k/maps/harkonnen-06a/rules.yaml index 9f853e064fe6..1b2b4c987c6a 100644 --- a/mods/d2k/maps/harkonnen-06a/rules.yaml +++ b/mods/d2k/maps/harkonnen-06a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen06a.lua, harkonnen06a-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen06a.lua, harkonnen06a-AI.lua MissionData: Briefing: The weak Ordos are no match for Harkonnen troops. However, smuggled Ixian technologies may upset this balance of power.\n\nThis cannot be allowed to happen. Establish a base on the plain, locate the Ordos Starport and destroy or capture it before the expensive shipments of Ixian weaponry begin to arrive. Time is short - the transports have already entered the system. BriefingVideo: H_BR06_E.VQA diff --git a/mods/d2k/maps/harkonnen-06b/rules.yaml b/mods/d2k/maps/harkonnen-06b/rules.yaml index 83c1fe7efc1d..0428a677353b 100644 --- a/mods/d2k/maps/harkonnen-06b/rules.yaml +++ b/mods/d2k/maps/harkonnen-06b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen06b.lua, harkonnen06b-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen06b.lua, harkonnen06b-AI.lua MissionData: Briefing: The weak Ordos are no match for Harkonnen troops. However, smuggled Ixian technologies may upset this balance of power.\n\nThis cannot be allowed to happen. Establish a base on the plain, locate the Ordos Starport and destroy or capture it before the expensive shipments of Ixian weaponry begin to arrive. Time is short - the transports have already entered the system. BriefingVideo: H_BR06_E.VQA diff --git a/mods/d2k/maps/harkonnen-07/rules.yaml b/mods/d2k/maps/harkonnen-07/rules.yaml index f50f9fbf7802..41d50e6ef873 100644 --- a/mods/d2k/maps/harkonnen-07/rules.yaml +++ b/mods/d2k/maps/harkonnen-07/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen07.lua, harkonnen07-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen07.lua, harkonnen07-AI.lua MissionData: Briefing: Your target is the Atreides High Tech Factory, the weak link of the Duke's plan to combine with the Imperial Troops. Without it, the Imperial Carryalls will soon fall into disrepair and not be able to ferry further reinforcements to the battle.\n\nThe Atreides force is large and well-fortified - a frontal assault will fail. However, one Construction Yard to the West of their position is isolated and lightly defended. A small strike force has been airlifted deep into enemy territory. Capture the Construction Yard and use it against the Atreides. BriefingVideo: H_BR07_E.VQA diff --git a/mods/d2k/maps/harkonnen-08/rules.yaml b/mods/d2k/maps/harkonnen-08/rules.yaml index 4738bcb5096d..6391beffae8f 100644 --- a/mods/d2k/maps/harkonnen-08/rules.yaml +++ b/mods/d2k/maps/harkonnen-08/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen08.lua, harkonnen08-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen08.lua, harkonnen08-AI.lua MissionData: Briefing: The Ordos continue to grow in strength, thanks to their acquisition of new weaponry. The Ordos know that the wrath of the Harkonnen will soon fall upon them, and have allied with the Atreides.\n\nThis will not protect them from our Atomics. Eliminate any Atreides you encounter, but focus upon the Ordos as the main target. Smash their army, burn their structures and bring back the spoils to decorate the walls of the Palace! Capturing or destroying the Ordos Palace will show the Atreides the true might of House of Harkonnen and will throw the Ordos allegiance into disarray.\n\nOur scouts report a Mercenary leader inspecting a nearby Heavy Factory. If the Heavy Factory can be captured, the Mercenaries could be persuaded to fight for the Harkonnen. The mercenaries receive reinforcements via the Starport, so this must remain in their possession for them to be of any use. BriefingVideo: H_BR08_E.VQA diff --git a/mods/d2k/maps/harkonnen-09a/rules.yaml b/mods/d2k/maps/harkonnen-09a/rules.yaml index 3bb7e5ee4a27..b5fcdcf2809a 100644 --- a/mods/d2k/maps/harkonnen-09a/rules.yaml +++ b/mods/d2k/maps/harkonnen-09a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen09a.lua, harkonnen09a-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen09a.lua, harkonnen09a-AI.lua MissionData: Briefing: Only the Atreides and Imperial forces now remain. The Sardaukar, still scattered from their long march from the North, cannot mass their forces to attack. Only the destruction of the Emperor's base encampment will stop the flow of Imperial forces.\n\nOnce this has been accomplished, turn on the Atreides and annihilate them. Claim Arrakis for House Harkonnen! BriefingVideo: H_BR09_E.VQA diff --git a/mods/d2k/maps/harkonnen-09b/rules.yaml b/mods/d2k/maps/harkonnen-09b/rules.yaml index f104258928a4..f77efb58ed46 100644 --- a/mods/d2k/maps/harkonnen-09b/rules.yaml +++ b/mods/d2k/maps/harkonnen-09b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, harkonnen09b.lua, harkonnen09b-AI.lua + Scripts: campaign.lua, utils.lua, harkonnen09b.lua, harkonnen09b-AI.lua MissionData: Briefing: Only the Atreides and Imperial forces now remain. The Sardaukar, still scattered from their long march from the North, cannot mass their forces to attack. Only the destruction of the Emperor's base encampment will stop the flow of Imperial forces.\n\nOnce this has been accomplished, turn on the Atreides and annihilate them. Claim Arrakis for House Harkonnen! BriefingVideo: H_BR09_E.VQA diff --git a/mods/d2k/maps/ordos-01a/rules.yaml b/mods/d2k/maps/ordos-01a/rules.yaml index 3005b47043d0..875549207ff3 100644 --- a/mods/d2k/maps/ordos-01a/rules.yaml +++ b/mods/d2k/maps/ordos-01a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos01a.lua + Scripts: campaign.lua, utils.lua, ordos01a.lua MissionData: Briefing: Spice is wealth. Serve the Ordos by harvesting Spice in the Imperial Basin. If Harkonnen forces attempt to interrupt the flow of the Spice - neutralize them.\n\nEfficiency dictates that Silos must be built to avoid loss of Spice. Build concrete foundations to avoid unnecessary damage from the elements. To do otherwise is wasteful. BriefingVideo: O_BR01_E.VQA diff --git a/mods/d2k/maps/ordos-01b/rules.yaml b/mods/d2k/maps/ordos-01b/rules.yaml index 6296ad363750..6dd494c0785a 100644 --- a/mods/d2k/maps/ordos-01b/rules.yaml +++ b/mods/d2k/maps/ordos-01b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos01b.lua + Scripts: campaign.lua, utils.lua, ordos01b.lua MissionData: Briefing: Spice is wealth. Serve the Ordos by harvesting Spice in the Imperial Basin. If Harkonnen forces attempt to interrupt the flow of the Spice - neutralize them.\n\nEfficiency dictates that Silos must be built to avoid loss of Spice. Build concrete foundations to avoid unnecessary damage from the elements. To do otherwise is wasteful. BriefingVideo: O_BR01_E.VQA diff --git a/mods/d2k/maps/ordos-02a/rules.yaml b/mods/d2k/maps/ordos-02a/rules.yaml index 01739d538c1a..112c11c5ae86 100644 --- a/mods/d2k/maps/ordos-02a/rules.yaml +++ b/mods/d2k/maps/ordos-02a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos02a.lua, ordos02a-AI.lua + Scripts: campaign.lua, utils.lua, ordos02a.lua, ordos02a-AI.lua MissionData: Briefing: Harkonnen forces are weakened in the Imperial Basin. Use the sensors in our Outpost to find them. Strike hard and destroy everything.\n BriefingVideo: O_BR02_E.VQA diff --git a/mods/d2k/maps/ordos-02b/rules.yaml b/mods/d2k/maps/ordos-02b/rules.yaml index 4da286732f68..09fa58031ebb 100644 --- a/mods/d2k/maps/ordos-02b/rules.yaml +++ b/mods/d2k/maps/ordos-02b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos02b.lua, ordos02b-AI.lua + Scripts: campaign.lua, utils.lua, ordos02b.lua, ordos02b-AI.lua MissionData: Briefing: Harkonnen forces are weakened in the Imperial Basin. Use the sensors in our Outpost to find them. Strike hard and destroy everything.\n BriefingVideo: O_BR02_E.VQA diff --git a/mods/d2k/maps/ordos-03a/rules.yaml b/mods/d2k/maps/ordos-03a/rules.yaml index a3cc66db4772..b5f3edeb4ff3 100644 --- a/mods/d2k/maps/ordos-03a/rules.yaml +++ b/mods/d2k/maps/ordos-03a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos03a.lua, ordos03a-AI.lua + Scripts: campaign.lua, utils.lua, ordos03a.lua, ordos03a-AI.lua MissionData: Briefing: The Harkonnen hinder the production of Spice. A Harkonnen attack will disrupt efficient production. Inefficiency cannot be tolerated. The Harkonnen must be eliminated.\n\nNew weapons are available - the Quads. Newer weapons are more powerful. Powerful weapons ensure victory. BriefingVideo: O_BR03_E.VQA diff --git a/mods/d2k/maps/ordos-03b/rules.yaml b/mods/d2k/maps/ordos-03b/rules.yaml index 11c5bc6dff07..bf327ca95220 100644 --- a/mods/d2k/maps/ordos-03b/rules.yaml +++ b/mods/d2k/maps/ordos-03b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos03b.lua, ordos03b-AI.lua + Scripts: campaign.lua, utils.lua, ordos03b.lua, ordos03b-AI.lua MissionData: Briefing: The Harkonnen hinder the production of Spice. A Harkonnen attack will disrupt efficient production. Inefficiency cannot be tolerated. The Harkonnen must be eliminated.\n\nNew weapons are available - the Quads. Newer weapons are more powerful. Powerful weapons ensure victory. BriefingVideo: O_BR03_E.VQA diff --git a/mods/d2k/maps/ordos-04/rules.yaml b/mods/d2k/maps/ordos-04/rules.yaml index 9e9815947721..ac8a85272f62 100644 --- a/mods/d2k/maps/ordos-04/rules.yaml +++ b/mods/d2k/maps/ordos-04/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos04.lua, ordos04-AI.lua + Scripts: campaign.lua, utils.lua, ordos04.lua, ordos04-AI.lua MissionData: Briefing: The Smugglers at Sietch Tabr must be neutralized. Capture the Outpost where their families have taken shelter as insurance. The children's lives will assure the loyalties of their fathers. Use an Engineer to enter and capture the building.\n\nThe Smugglers' new partners, the Harkonnen, may attempt to protect them. Harkonnen firepower is great, but we have recently acquired tanks that may counter this.\n\nEnsure our investment is used wisely.\n BriefingVideo: O_BR04_E.VQA diff --git a/mods/d2k/maps/ordos-05/rules.yaml b/mods/d2k/maps/ordos-05/rules.yaml index 02a2f3388557..6c82ae4573b9 100644 --- a/mods/d2k/maps/ordos-05/rules.yaml +++ b/mods/d2k/maps/ordos-05/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos05.lua, ordos05-AI.lua + Scripts: campaign.lua, utils.lua, ordos05.lua, ordos05-AI.lua MissionData: Briefing: Spice is paramount. The Atreides possess the Spice. We must capture their Starport and bring in an MCV to harvest the Spice.\n\nCombat is costly. Fight only if the Atreides obstruct the flow of Spice. Use the minimum amount of funds for defense.\n\nMine and store what is needed to pay our debt to the Ixians. Once that amount has been collected, Ordos forces will withdraw. BriefingVideo: O_BR05_E.VQA diff --git a/mods/d2k/maps/ordos-06a/rules.yaml b/mods/d2k/maps/ordos-06a/rules.yaml index d2cae88542d2..f918793ff668 100644 --- a/mods/d2k/maps/ordos-06a/rules.yaml +++ b/mods/d2k/maps/ordos-06a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, ordos06a.lua, ordos06a-AI.lua + Scripts: campaign.lua, utils.lua, ordos06a.lua, ordos06a-AI.lua MissionData: Briefing: The Starport must be protected. All other efforts are secondary. No House will be allowed to interfere with the arrival of our Ixian weaponry.\n\nOnce we possess these illegal technologies, we will confuse and crush our opponents. Until then, survive. This will give you a higher probability of success. BriefingVideo: O_BR06_E.VQA diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 212c7fc71dc4..f97780903ee7 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -18,8 +18,9 @@ Packages: ~SOUND.RS d2k|bits - d2k|bits/scripts d2k|bits/tex + d2k|scripts + common|scripts d2k|uibits MapFolders: diff --git a/mods/d2k/bits/scripts/campaign-global.lua b/mods/d2k/scripts/campaign.lua similarity index 100% rename from mods/d2k/bits/scripts/campaign-global.lua rename to mods/d2k/scripts/campaign.lua diff --git a/mods/ra/maps/allies-01/rules.yaml b/mods/ra/maps/allies-01/rules.yaml index 0db887ba2378..adaeaef06fe1 100644 --- a/mods/ra/maps/allies-01/rules.yaml +++ b/mods/ra/maps/allies-01/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: allies01.lua, campaign-global.lua + Scripts: allies01.lua, campaign.lua, utils.lua MissionData: Briefing: Rescue Einstein from the Headquarters inside this Soviet complex.\n\nOnce found, evacuate him via the helicopter at the signal flare.\n\nEinstein and Tanya must be kept alive at all costs.\n\nBeware the Soviet's Tesla Coils.\n\nDirect Tanya to destroy the westmost power plants to take them off-line.\n BackgroundVideo: prolog.vqa diff --git a/mods/ra/maps/allies-02/rules.yaml b/mods/ra/maps/allies-02/rules.yaml index f443fd5e44e0..1b360d0656ce 100644 --- a/mods/ra/maps/allies-02/rules.yaml +++ b/mods/ra/maps/allies-02/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: allies02.lua, campaign-global.lua + Scripts: allies02.lua, campaign.lua, utils.lua MissionData: Briefing: A critical supply convoy is due through this area in 10 minutes, but Soviet forces have blocked the road in several places.\n\nUnless you can clear them out, those supplies will never make it to the front.\n\nThe convoy will come from the northwest, and time is short so work quickly. BriefingVideo: ally2.vqa diff --git a/mods/ra/maps/allies-03a/rules.yaml b/mods/ra/maps/allies-03a/rules.yaml index 4e87edef1bfc..ccfacaeebaf1 100644 --- a/mods/ra/maps/allies-03a/rules.yaml +++ b/mods/ra/maps/allies-03a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: allies03a.lua, campaign-global.lua + Scripts: allies03a.lua, campaign.lua, utils.lua MissionData: Briefing: LANDCOM 16 HQS.\nTOP SECRET.\nTO: FIELD COMMANDER A9\n\nINTELLIGENCE RECON SHOWS HEAVY\nSOVIET MOVEMENT IN YOUR AREA.\nNEARBY BRIDGES ARE KEY TO SOVIET\nADVANCEMENT. DESTROY ALL BRIDGES\nASAP. TANYA WILL ASSIST. KEEP HER\nALIVE AT ALL COSTS.\n\nCONFIRMATION CODE 1612.\n\nTRANSMISSION ENDS.\n StartVideo: brdgtilt.vqa diff --git a/mods/ra/maps/allies-03b/rules.yaml b/mods/ra/maps/allies-03b/rules.yaml index 7d88aa7a3fef..cf85cea69b76 100644 --- a/mods/ra/maps/allies-03b/rules.yaml +++ b/mods/ra/maps/allies-03b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: allies03b.lua, campaign-global.lua + Scripts: allies03b.lua, campaign.lua, utils.lua MissionData: Briefing: LANDCOM 16 HQS.\nTOP SECRET.\nTO: FIELD COMMANDER A9\n\nINTELLIGENCE RECON SHOWS HEAVY\nSOVIET MOVEMENT IN YOUR AREA.\nNEARBY BRIDGES ARE KEY TO SOVIET\nADVANCEMENT. DESTROY ALL BRIDGES\nASAP. TANYA WILL ASSIST. KEEP HER\nALIVE AT ALL COSTS.\n\nCONFIRMATION CODE 1612.\n\nTRANSMISSION ENDS.\n StartVideo: brdgtilt.vqa diff --git a/mods/ra/maps/allies-04/rules.yaml b/mods/ra/maps/allies-04/rules.yaml index 0b465485236c..76a01b612926 100644 --- a/mods/ra/maps/allies-04/rules.yaml +++ b/mods/ra/maps/allies-04/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies04.lua, allies04-AI.lua + Scripts: campaign.lua, utils.lua, allies04.lua, allies04-AI.lua MissionData: Briefing: Soviet forces are trying to retake the pass you cleared for our convoys.\n\nDon't let this happen. Hold the pass and prevent the Soviets from taking this vital area.\n\nDestroy all Soviet units and buildings in this region. BriefingVideo: ally4.vqa diff --git a/mods/ra/maps/allies-05a/rules.yaml b/mods/ra/maps/allies-05a/rules.yaml index d5dc390b6eeb..d09c1c96c175 100644 --- a/mods/ra/maps/allies-05a/rules.yaml +++ b/mods/ra/maps/allies-05a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, allies05a.lua, allies05a-AI.lua + Scripts: campaign.lua, utils.lua, allies05a.lua, allies05a-AI.lua MissionData: Briefing: Rescue Tanya.\n\nOnce disguised, your spy can move past any enemy unit, except dogs, without being detected. Direct him into the weapons factory located at a nearby Soviet Base where he will hijack a truck and free Tanya.\n\nWith Tanya's help, take out the air defenses on the island and a Chinook will arrive to rescue her.\n\nThen destroy all remaining Soviet buildings and units. BriefingVideo: ally5.vqa diff --git a/mods/ra/maps/allies-05b/rules.yaml b/mods/ra/maps/allies-05b/rules.yaml index dc8a5a2643e0..cfecce035de5 100644 --- a/mods/ra/maps/allies-05b/rules.yaml +++ b/mods/ra/maps/allies-05b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: allies05b.lua, allies05b-AI.lua, campaign-global.lua + Scripts: allies05b.lua, allies05b-AI.lua, campaign.lua, utils.lua MissionData: BriefingVideo: ally5.vqa WinVideo: tanya2.vqa diff --git a/mods/ra/maps/allies-05c/rules.yaml b/mods/ra/maps/allies-05c/rules.yaml index 0de24a1a3111..b8d879b6c691 100644 --- a/mods/ra/maps/allies-05c/rules.yaml +++ b/mods/ra/maps/allies-05c/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: allies05c.lua, allies05c-AI.lua, campaign-global.lua + Scripts: allies05c.lua, allies05c-AI.lua, campaign.lua, utils.lua MissionData: BriefingVideo: ally5.vqa WinVideo: tanya2.vqa diff --git a/mods/ra/maps/allies-06a/rules.yaml b/mods/ra/maps/allies-06a/rules.yaml index 7f8c3ce95aaa..4a5e85a2e1fb 100644 --- a/mods/ra/maps/allies-06a/rules.yaml +++ b/mods/ra/maps/allies-06a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies06a.lua, allies06a-AI.lua + Scripts: campaign.lua, utils.lua, allies06a.lua, allies06a-AI.lua MissionData: Briefing: Priority one is to establish a base and get your spy into one of the Soviet Tech Centers in the base across the gulf.\nData on the Iron Curtain is in there and we need it.\n\nOnce you get the data complete your mission...\nWipe out everything. BriefingVideo: ally6.vqa diff --git a/mods/ra/maps/allies-06b/rules.yaml b/mods/ra/maps/allies-06b/rules.yaml index f319ba18588d..206a02f72284 100644 --- a/mods/ra/maps/allies-06b/rules.yaml +++ b/mods/ra/maps/allies-06b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies06b.lua, allies06b-AI.lua + Scripts: campaign.lua, utils.lua, allies06b.lua, allies06b-AI.lua MissionData: BriefingVideo: ally6.vqa WinVideo: allymorf.vqa diff --git a/mods/ra/maps/allies-07/rules.yaml b/mods/ra/maps/allies-07/rules.yaml index b6a24cd67c31..f3d55ecc16d3 100644 --- a/mods/ra/maps/allies-07/rules.yaml +++ b/mods/ra/maps/allies-07/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies07.lua, allies07-AI.lua + Scripts: campaign.lua, utils.lua, allies07.lua, allies07-AI.lua MissionData: Briefing: LANDCOM 16 HQS.\nTOP SECRET.\nTO: FIELD COMMANDER A9\n\nINTERCEPTION OF SOVIET COMMUNIQUE INDICATES THEIR IRON CURTAIN RESEARCH WAS SET BACK BY ESPIONAGE. EXCELLENT WORK, COMMANDER!\n\nCOMMUNIQUE WAS TRACED BACK TO SECRET SOVIET BASE IN BORNHOLM. INVESTIGATE POSSIBLE CONNECTION WITH IRON CURTAIN RESEARCH. CAPTURE RADAR CENTER AND DESTROY SUB PRODUCTION CAPABILITY.\n\nCONFIRMATION CODE 1138.\n\nTRANSMISSION ENDS.\n StartVideo: shorbom1.vqa diff --git a/mods/ra/maps/allies-08a/rules.yaml b/mods/ra/maps/allies-08a/rules.yaml index a0c8fed58912..cf1a3d1595fd 100644 --- a/mods/ra/maps/allies-08a/rules.yaml +++ b/mods/ra/maps/allies-08a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies08a.lua, allies08a-AI.lua + Scripts: campaign.lua, utils.lua, allies08a.lua, allies08a-AI.lua MissionData: Briefing: Our latest technology, the Chronosphere, is housed in this research station. The timer represents the appointed time for the completion of a vital experiment. The Soviets have learned of this and are moving in. \n\nProtect the Chronosphere and the Advanced-Tech research center. Make sure the base is fully powered at the appointed time. If not, all will be lost! BriefingVideo: ally8.vqa diff --git a/mods/ra/maps/allies-08b/rules.yaml b/mods/ra/maps/allies-08b/rules.yaml index 5351862d3830..324d1166c7c4 100644 --- a/mods/ra/maps/allies-08b/rules.yaml +++ b/mods/ra/maps/allies-08b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies08b.lua, allies08b-AI.lua + Scripts: campaign.lua, utils.lua, allies08b.lua, allies08b-AI.lua MissionData: Briefing: Our latest technology, the Chronosphere, is housed in this research station. The timer represents the appointed time for the completion of a vital experiment. The Soviets have learned of this and are moving in. \n\nProtect the Chronosphere and the Advanced-Tech research center. Make sure the base is fully powered at the appointed time. If not, all will be lost! BriefingVideo: ally8.vqa diff --git a/mods/ra/maps/allies-09a/rules.yaml b/mods/ra/maps/allies-09a/rules.yaml index 004df2cd91c2..ecd65c67a472 100644 --- a/mods/ra/maps/allies-09a/rules.yaml +++ b/mods/ra/maps/allies-09a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, allies09a.lua, allies09a-AI.lua + Scripts: campaign.lua, utils.lua, allies09a.lua, allies09a-AI.lua MissionData: Briefing: One of Stalin's top atomic strategists, Vladimir Kosygin, wishes to defect. His knowledge of Stalin's atomic strategies is invaluable to us. We will extract him from the Riga compound where he is stationed.\n\nUse a spy to infiltrate the Soviet command center and contact Kosygin. Once he is out of the building, guide him back to your base any way you can. StartVideo: diff --git a/mods/ra/maps/ant-01/rules.yaml b/mods/ra/maps/ant-01/rules.yaml index d2194d3b330d..0888854c788c 100644 --- a/mods/ra/maps/ant-01/rules.yaml +++ b/mods/ra/maps/ant-01/rules.yaml @@ -12,7 +12,7 @@ World: hard: Hard Default: normal LuaScript: - Scripts: ant-01.lua, ant-attack.lua, campaign-global.lua + Scripts: ant-01.lua, ant-attack.lua, campaign.lua, utils.lua MissionData: BackgroundVideo: antintro.vqa Briefing: We've lost contact with one of our outposts. Before it went off-line, we received a brief communique about giant ants. We're unsure what to make of this report, so we want you to investigate. \n\nScout the area, bring the outpost back on-line, and report your findings. If there is a threat, reinforcements will be sent in to help you. \n\nKeep the base functional and radio contact open -- we don't want to lose the outpost again. diff --git a/mods/ra/maps/ant-03/rules.yaml b/mods/ra/maps/ant-03/rules.yaml index e9ad3218bf62..0f6f85c3fd6a 100644 --- a/mods/ra/maps/ant-03/rules.yaml +++ b/mods/ra/maps/ant-03/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: ant-03.lua, ant-03-AI.lua, campaign-global.lua + Scripts: ant-03.lua, ant-03-AI.lua, campaign.lua, utils.lua MissionData: Briefing: The source of the ant's activity has been pinpointed in this area. We suspect that their nests are in this area -- they must be destroyed!\n\nA team of civilian specialists are en-route to your location. Use them to gas all the ant nests in the area. In addition, destroy all ants that you encounter.\n\nBe careful -- these things can chew through anything. Good luck. ScriptLobbyDropdown@difficulty: diff --git a/mods/ra/maps/evacuation/rules.yaml b/mods/ra/maps/evacuation/rules.yaml index c4532b58e5c3..c483d68f2c7a 100644 --- a/mods/ra/maps/evacuation/rules.yaml +++ b/mods/ra/maps/evacuation/rules.yaml @@ -8,7 +8,7 @@ World: MissionData: Briefing: One of our outposts is under heavy attack by a nearby Soviet base. Einstein, Tanya and many of our forces have been evacuated via helicopters, but those were shot down on the other side of the river. Fortunately they survived the crash, but are now in enemy territory. Tanya and the rest of the surviving forces need to fight their way out of there. The air defenses must be eliminated before another Search & Rescue helicopter can arrive.\n\nMeanwhile, the forces remaining at the base need to fend off the Soviet attacks.\n LuaScript: - Scripts: campaign-global.lua, evacuation.lua + Scripts: campaign.lua, utils.lua, evacuation.lua ScriptLobbyDropdown@difficulty: ID: difficulty Label: Difficulty diff --git a/mods/ra/maps/exodus/rules.yaml b/mods/ra/maps/exodus/rules.yaml index 4b6bf1db0f4a..6c29fef6e9bb 100644 --- a/mods/ra/maps/exodus/rules.yaml +++ b/mods/ra/maps/exodus/rules.yaml @@ -6,7 +6,7 @@ World: MissionData: Briefing: The Allies are now being flanked from both sides. Evacuate before the remaining Allied forces in the area are wiped out. Einstein has recently developed a technology which allows us to obscure units from the enemy. Pull out at least one prototype mobile gap generator intact. LuaScript: - Scripts: campaign-global.lua, exodus.lua + Scripts: campaign.lua, utils.lua, exodus.lua ScriptLobbyDropdown@difficulty: ID: difficulty Label: Difficulty diff --git a/mods/ra/maps/fall-of-greece-1-personal-war/rules.yaml b/mods/ra/maps/fall-of-greece-1-personal-war/rules.yaml index af21c122db2b..3ed349796780 100644 --- a/mods/ra/maps/fall-of-greece-1-personal-war/rules.yaml +++ b/mods/ra/maps/fall-of-greece-1-personal-war/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, personal-war.lua + Scripts: campaign.lua, utils.lua, personal-war.lua MissionData: WinVideo: toofar.vqa LossVideo: bmap.vqa diff --git a/mods/ra/maps/fall-of-greece-2-evacuation/rules.yaml b/mods/ra/maps/fall-of-greece-2-evacuation/rules.yaml index 44467f63ac0b..342bd20df3a6 100644 --- a/mods/ra/maps/fall-of-greece-2-evacuation/rules.yaml +++ b/mods/ra/maps/fall-of-greece-2-evacuation/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, evacuation.lua, evacuation-AI.lua + Scripts: campaign.lua, utils.lua, evacuation.lua, evacuation-AI.lua MissionData: WinVideo: allymorf.vqa LossVideo: snstrafe.vqa diff --git a/mods/ra/maps/in-the-nick-of-time/rules.yaml b/mods/ra/maps/in-the-nick-of-time/rules.yaml index 0f6f356fd292..700bd74310af 100644 --- a/mods/ra/maps/in-the-nick-of-time/rules.yaml +++ b/mods/ra/maps/in-the-nick-of-time/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, in-the-nick-of-time.lua + Scripts: campaign.lua, utils.lua, in-the-nick-of-time.lua MissionData: WinVideo: cronfail.vqa LossVideo: sfrozen.vqa diff --git a/mods/ra/maps/infiltration/rules.yaml b/mods/ra/maps/infiltration/rules.yaml index eb13121b6b80..f90422363507 100644 --- a/mods/ra/maps/infiltration/rules.yaml +++ b/mods/ra/maps/infiltration/rules.yaml @@ -6,7 +6,7 @@ World: MissionData: Briefing: The Soviets are currently developing a new weapon system at a secret research laboratory. This is a reconnaissance mission. Do not engage until we know what we are up against and wait for reinforcements. Our civilian contacts reported a heavily guarded installation under ruthless command. LuaScript: - Scripts: campaign-global.lua, infiltration.lua + Scripts: campaign.lua, utils.lua, infiltration.lua ScriptLobbyDropdown@difficulty: ID: difficulty Label: Difficulty diff --git a/mods/ra/maps/intervention/rules.yaml b/mods/ra/maps/intervention/rules.yaml index 73563a83f513..2c7e370f507c 100644 --- a/mods/ra/maps/intervention/rules.yaml +++ b/mods/ra/maps/intervention/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, intervention.lua + Scripts: campaign.lua, utils.lua, intervention.lua MissionData: Briefing: The Soviet Air Force is flying air raids against a civilian village.\n\nWe have to do everything in our power to stop them!\n\nYour job is to establish a base on the mainland ASAP. We can prevent the village's destruction by capturing the enemy's Air Force Headquarters building. The enemy base is heavily guarded, though. You will not have enough time to build a force big enough to overpower the Soviet defences. You will have to find a way to sneak in!\n\nGood luck, Commander!\n ScriptLobbyDropdown@difficulty: diff --git a/mods/ra/maps/monster-tank-madness/rules.yaml b/mods/ra/maps/monster-tank-madness/rules.yaml index 185ea91939d5..56d76890cd74 100644 --- a/mods/ra/maps/monster-tank-madness/rules.yaml +++ b/mods/ra/maps/monster-tank-madness/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, monster-tank-madness.lua + Scripts: campaign.lua, utils.lua, monster-tank-madness.lua -StartGameNotification: MissionData: Briefing: Dr. Demitri, creator of a Soviet Super Tank, wants to defect.\n\nWe planned to extract him while the Soviets were testing their new weapon, but something has gone wrong.\n\nThe Super Tanks are out of control, and Demitri is missing -- likely hiding in the village to the far south.\n\nFind our outpost and start repairs on it, then find and evacuate Demitri.\n\nAs for the tanks, we can reprogram them. Send a spy into the Soviet radar dome in the NE, turning the tanks on their creators.\n diff --git a/mods/ra/maps/production-disruption/rules.yaml b/mods/ra/maps/production-disruption/rules.yaml index 2f854a4fb1dc..ab48e7c08fb9 100644 --- a/mods/ra/maps/production-disruption/rules.yaml +++ b/mods/ra/maps/production-disruption/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, production-disruption.lua + Scripts: campaign.lua, utils.lua, production-disruption.lua MissionData: WinVideo: battle.vqa LossVideo: slntsrvc.vqa diff --git a/mods/ra/maps/sarin-gas-1-crackdown/rules.yaml b/mods/ra/maps/sarin-gas-1-crackdown/rules.yaml index 39ddb3a64673..5dc1e08eb8c2 100644 --- a/mods/ra/maps/sarin-gas-1-crackdown/rules.yaml +++ b/mods/ra/maps/sarin-gas-1-crackdown/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, crackdown.lua, crackdown-AI.lua + Scripts: campaign.lua, utils.lua, crackdown.lua, crackdown-AI.lua MissionData: Briefing: A Soviet convoy of Sarin nerve gas has stopped at a riverside outpost for refuelling. This is a perfect opportunity to destroy the Sarin shipment, and remove the Soviet threat in the area.\n\nUse your forces to destroy the convoy trucks and the base. It is imperative that none of the convoy trucks escape.\n\nThe Soviets keep their convoy information in their radar center. If a spy was to infiltrate the facility, it may help us locate the convoy escape routes. WinVideo: allymorf.vqa diff --git a/mods/ra/maps/sarin-gas-2-down-under/rules.yaml b/mods/ra/maps/sarin-gas-2-down-under/rules.yaml index b310ee65dbd9..0a6f3e4c767f 100644 --- a/mods/ra/maps/sarin-gas-2-down-under/rules.yaml +++ b/mods/ra/maps/sarin-gas-2-down-under/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, downunder.lua + Scripts: campaign.lua, utils.lua, downunder.lua MissionData: Briefing: We've traced the convoy's route to this underground facility. We suspect that this is a hidden access to the Soviet's main Sarin plant.\n\nLead your troops through the tunnels and remove any opposition you may find. Be careful -- the Soviets are conducting all kinds of research in this facility, and we don't know what they may throw at you.\n\nUse spies to scout and infiltrate factories where they can steal vehicles.\n\nThe mission is complete when your forces reach the far exit of the facility.\n WinVideo: spy.vqa diff --git a/mods/ra/maps/sarin-gas-3-controlled-burn/rules.yaml b/mods/ra/maps/sarin-gas-3-controlled-burn/rules.yaml index ee3b245bd6b9..e22b86fe1e71 100644 --- a/mods/ra/maps/sarin-gas-3-controlled-burn/rules.yaml +++ b/mods/ra/maps/sarin-gas-3-controlled-burn/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, controlledburn.lua, controlledburn-AI.lua + Scripts: campaign.lua, utils.lua, controlledburn.lua, controlledburn-AI.lua MissionData: WinVideo: apcescpe.vqa LossVideo: tesla.vqa diff --git a/mods/ra/maps/shock-therapy/rules.yaml b/mods/ra/maps/shock-therapy/rules.yaml index 26dff537d10c..4bb5f1336234 100644 --- a/mods/ra/maps/shock-therapy/rules.yaml +++ b/mods/ra/maps/shock-therapy/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, shock-therapy.lua + Scripts: campaign.lua, utils.lua, shock-therapy.lua MissionData: WinVideo: sovtstar.vqa LossVideo: sovcemet.vqa diff --git a/mods/ra/maps/siberian-conflict-1-fresh-tracks/rules.yaml b/mods/ra/maps/siberian-conflict-1-fresh-tracks/rules.yaml index b3fceb989980..310f0f2d16c1 100644 --- a/mods/ra/maps/siberian-conflict-1-fresh-tracks/rules.yaml +++ b/mods/ra/maps/siberian-conflict-1-fresh-tracks/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, fresh-tracks.lua + Scripts: campaign.lua, utils.lua, fresh-tracks.lua MissionData: WinVideo: sovbatl.vqa LossVideo: overrun.vqa diff --git a/mods/ra/maps/siberian-conflict-3-wasteland/rules.yaml b/mods/ra/maps/siberian-conflict-3-wasteland/rules.yaml index 19515d1f7971..568f4bd921e0 100644 --- a/mods/ra/maps/siberian-conflict-3-wasteland/rules.yaml +++ b/mods/ra/maps/siberian-conflict-3-wasteland/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, wasteland.lua, wasteland-AI.lua + Scripts: campaign.lua, utils.lua, wasteland.lua, wasteland-AI.lua MissionData: WinVideo: masasslt.vqa LossVideo: frozen.vqa diff --git a/mods/ra/maps/situation-critical/rules.yaml b/mods/ra/maps/situation-critical/rules.yaml index b1e5683d9da4..5beac28a1b89 100644 --- a/mods/ra/maps/situation-critical/rules.yaml +++ b/mods/ra/maps/situation-critical/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, situation-critical.lua + Scripts: campaign.lua, utils.lua, situation-critical.lua MissionData: WinVideo: flare.vqa LossVideo: nukestok.vqa diff --git a/mods/ra/maps/soviet-01/rules.yaml b/mods/ra/maps/soviet-01/rules.yaml index 16b1f4ac9c82..053ab8aa3053 100644 --- a/mods/ra/maps/soviet-01/rules.yaml +++ b/mods/ra/maps/soviet-01/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet01.lua + Scripts: campaign.lua, utils.lua, soviet01.lua MissionData: Briefing: A pitiful excuse for resistance has blockaded itself in this village.\n\nStalin has decided to make an example of them. Kill them all and destroy their homes. You will have Yak aircraft to use in teaching these rebels a lesson. BackgroundVideo: prolog.vqa diff --git a/mods/ra/maps/soviet-02a/rules.yaml b/mods/ra/maps/soviet-02a/rules.yaml index d7e4ded2cbf7..43ff5936cd65 100644 --- a/mods/ra/maps/soviet-02a/rules.yaml +++ b/mods/ra/maps/soviet-02a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet02a.lua + Scripts: campaign.lua, utils.lua, soviet02a.lua MissionData: Briefing: Tomorrow, the attack on Germany begins, but today, we must protect our facility from Allied attacks.\n\nKeep the Command Center intact at all costs, and destroy any Allied fortification you might find. BriefingVideo: soviet2.vqa diff --git a/mods/ra/maps/soviet-02b/rules.yaml b/mods/ra/maps/soviet-02b/rules.yaml index ab0b5c798818..9d5aafa02831 100644 --- a/mods/ra/maps/soviet-02b/rules.yaml +++ b/mods/ra/maps/soviet-02b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet02b.lua + Scripts: campaign.lua, utils.lua, soviet02b.lua MissionData: Briefing: Tomorrow, the attack on Germany begins, but today, we must protect our facility from Allied attacks.\n\nKeep the Command Center intact at all costs, and destroy any Allied fortification you might find. BriefingVideo: soviet2.vqa diff --git a/mods/ra/maps/soviet-03/rules.yaml b/mods/ra/maps/soviet-03/rules.yaml index e57cea9fad3d..9afbf96b0699 100644 --- a/mods/ra/maps/soviet-03/rules.yaml +++ b/mods/ra/maps/soviet-03/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet03.lua + Scripts: campaign.lua, utils.lua, soviet03.lua MissionData: Briefing: A spy who has compromised the security of one of the northern sarin gas sites has been traced back to Lund, Sweden, by Nadia's intelligence groups.\n\nHe has been marked for death and a squad of Soviet troops was dispatched to the location to hunt him down. BriefingVideo: soviet3.vqa diff --git a/mods/ra/maps/soviet-04a/rules.yaml b/mods/ra/maps/soviet-04a/rules.yaml index d03a9db79cd3..e00f1453faea 100644 --- a/mods/ra/maps/soviet-04a/rules.yaml +++ b/mods/ra/maps/soviet-04a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet04a.lua, soviet04a-AI.lua, soviet04a-reinforcements_teams.lua + Scripts: campaign.lua, utils.lua, soviet04a.lua, soviet04a-AI.lua, soviet04a-reinforcements_teams.lua MissionData: Briefing: The Allied base in this region is proving to be problematic.\n\nYour mission is to take it out so that we can begin to move forces through this area.\n\nAs long as they have communications they will be able to call upon heavy reinforcements.\n\nCrush their communications, and they should be easier to remove. BriefingVideo: soviet4.vqa diff --git a/mods/ra/maps/soviet-04b/rules.yaml b/mods/ra/maps/soviet-04b/rules.yaml index 20cc786cad0e..84c6a5daed96 100644 --- a/mods/ra/maps/soviet-04b/rules.yaml +++ b/mods/ra/maps/soviet-04b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet04b.lua, soviet04b-AI.lua, soviet04b-reinforcements_teams.lua + Scripts: campaign.lua, utils.lua, soviet04b.lua, soviet04b-AI.lua, soviet04b-reinforcements_teams.lua MissionData: Briefing: The Allied base in this region is proving to be problematic.\n\nYour mission is to take it out so that we can begin to move forces through this area.\n\nAs long as they have communications they will be able to call upon heavy reinforcements.\n\nCrush their communications, and they should be easier to remove. BriefingVideo: soviet4.vqa diff --git a/mods/ra/maps/soviet-05/rules.yaml b/mods/ra/maps/soviet-05/rules.yaml index 8ca0b01c81f4..29237fb65f9a 100644 --- a/mods/ra/maps/soviet-05/rules.yaml +++ b/mods/ra/maps/soviet-05/rules.yaml @@ -62,7 +62,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet05.lua, soviet05-AI.lua, soviet05-reinforcements_teams.lua + Scripts: campaign.lua, utils.lua, soviet05.lua, soviet05-AI.lua, soviet05-reinforcements_teams.lua MissionData: Briefing: Khalkis island contains a large quantity of ore that we need.\n\nThe Allies are well aware of our plans, and intend to establish their own base there. See to it that they fail.\n\nIn addition, capture their radar center so we can track Allied activity in this area. BriefingVideo: soviet5.vqa diff --git a/mods/ra/maps/soviet-06a/rules.yaml b/mods/ra/maps/soviet-06a/rules.yaml index 3e820288bca1..a19431f5c091 100644 --- a/mods/ra/maps/soviet-06a/rules.yaml +++ b/mods/ra/maps/soviet-06a/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet06a.lua, soviet06a-AI.lua, soviet06a-reinforcements_teams.lua + Scripts: campaign.lua, utils.lua, soviet06a.lua, soviet06a-AI.lua, soviet06a-reinforcements_teams.lua MissionData: Briefing: There is a special cargo that needs to be transported to a nearby Soviet base in the northeast.\n\nMake sure the trucks reach their destination intact. Along the way, there is a bridge which the Allies may have destroyed.\n\nIf so, use the Naval options at your disposal. Our attack subs will make short work of any Allied boats you discover. BriefingVideo: soviet6.vqa diff --git a/mods/ra/maps/soviet-06b/rules.yaml b/mods/ra/maps/soviet-06b/rules.yaml index 8154915e9fc4..07201a8e54ac 100644 --- a/mods/ra/maps/soviet-06b/rules.yaml +++ b/mods/ra/maps/soviet-06b/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, soviet06b.lua, soviet06b-AI.lua, soviet06b-reinforcements_teams.lua + Scripts: campaign.lua, utils.lua, soviet06b.lua, soviet06b-AI.lua, soviet06b-reinforcements_teams.lua MissionData: Briefing: There is a special cargo that needs to be transported to a nearby Soviet base in the northeast.\n\nMake sure the trucks reach their destination intact. Along the way, there is a bridge which the Allies may have destroyed.\n\nIf so, use the Naval options at your disposal. Our attack subs will make short work of any Allied boats you discover. BriefingVideo: soviet6.vqa diff --git a/mods/ra/maps/soviet-07/rules.yaml b/mods/ra/maps/soviet-07/rules.yaml index 8f1c8d0e8a5c..28d6e0141ebc 100644 --- a/mods/ra/maps/soviet-07/rules.yaml +++ b/mods/ra/maps/soviet-07/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet07.lua + Scripts: campaign.lua, utils.lua, soviet07.lua MissionData: Briefing: The Allies have infiltrated one of our nuclear reactors! They have tampered with the core so that a meltdown is imminent within 30 minutes. They must not succeed!\n\nEnter the base and find any remaining technicians. Guide them to the 4 coolant stations so they can activate them, then activate the main computer. The security systems have been armed so beware.\n\nKill any Allies you find. BriefingVideo: soviet7.vqa diff --git a/mods/ra/maps/soviet-08a/rules.yaml b/mods/ra/maps/soviet-08a/rules.yaml index 1b5c16fad0be..9efe3fc04e83 100644 --- a/mods/ra/maps/soviet-08a/rules.yaml +++ b/mods/ra/maps/soviet-08a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet08a.lua, soviet08a-AI.lua + Scripts: campaign.lua, utils.lua, soviet08a.lua, soviet08a-AI.lua MissionData: Briefing: We have detected Allied activity on Elba island. The Allies plan to use this island to stage an attack on the Soviet Empire.\n\nYou must ensure that the island ceases to be under Allied control. Destroy all Allied units on and around the island.\n\nThe local population has been aiding the Allies as well. There is only one punishment for helping the enemy - Death. BriefingVideo: soviet8.vqa diff --git a/mods/ra/maps/soviet-08b/rules.yaml b/mods/ra/maps/soviet-08b/rules.yaml index 6eb398132ade..59a0d5f8a602 100644 --- a/mods/ra/maps/soviet-08b/rules.yaml +++ b/mods/ra/maps/soviet-08b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet08b.lua, soviet08b-AI.lua + Scripts: campaign.lua, utils.lua, soviet08b.lua, soviet08b-AI.lua MissionData: Briefing: We have detected Allied activity on Elba island. The Allies plan to use this island to stage an attack on the Soviet Empire.\n\nYou must ensure that the island ceases to be under Allied control. Destroy all Allied units on and around the island.\n\nThe local population has been aiding the Allies as well. There is only one punishment for helping the enemy - Death. BriefingVideo: soviet8.vqa diff --git a/mods/ra/maps/soviet-09/rules.yaml b/mods/ra/maps/soviet-09/rules.yaml index 17aa5a74921d..e5dc2e9fd6cb 100644 --- a/mods/ra/maps/soviet-09/rules.yaml +++ b/mods/ra/maps/soviet-09/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet09.lua, soviet09-AI.lua + Scripts: campaign.lua, utils.lua, soviet09.lua, soviet09-AI.lua MissionData: BriefingVideo: soviet9.vqa WinVideo: v2rocket.vqa diff --git a/mods/ra/maps/soviet-10/rules.yaml b/mods/ra/maps/soviet-10/rules.yaml index 4072fa2229b7..e895c705e9c2 100644 --- a/mods/ra/maps/soviet-10/rules.yaml +++ b/mods/ra/maps/soviet-10/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet10.lua + Scripts: campaign.lua, utils.lua, soviet10.lua MissionData: Briefing: You must defend a Soviet convoy that is moving through Allied occupied territory. Using the new MIG jet and a compliment of Yaks, get the convoy through the area intact.\n\nBe careful -- your resources for this mission are very limited. If at least one truck makes it through to the other side, the mission will be a success. BriefingVideo: soviet10.vqa diff --git a/mods/ra/maps/soviet-11a/rules.yaml b/mods/ra/maps/soviet-11a/rules.yaml index ab655c63b157..884203aa4ae2 100644 --- a/mods/ra/maps/soviet-11a/rules.yaml +++ b/mods/ra/maps/soviet-11a/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet11a.lua, soviet11a-AI.lua + Scripts: campaign.lua, utils.lua, soviet11a.lua, soviet11a-AI.lua MissionData: BriefingVideo: soviet11.vqa WinVideo: sitduck.vqa diff --git a/mods/ra/maps/soviet-11b/rules.yaml b/mods/ra/maps/soviet-11b/rules.yaml index e97540e5c3c2..41b96b7f0ce6 100644 --- a/mods/ra/maps/soviet-11b/rules.yaml +++ b/mods/ra/maps/soviet-11b/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet11b.lua, soviet11b-AI.lua + Scripts: campaign.lua, utils.lua, soviet11b.lua, soviet11b-AI.lua MissionData: BriefingVideo: soviet11.vqa WinVideo: sitduck.vqa diff --git a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/rules.yaml b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/rules.yaml index c26a08f7b0d9..782cb1f28cfc 100644 --- a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/rules.yaml +++ b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, soviet-soldier-volkov-n-chitzkoi.lua, soviet-soldier-volkov-n-chitzkoi-AI.lua + Scripts: campaign.lua, utils.lua, soviet-soldier-volkov-n-chitzkoi.lua, soviet-soldier-volkov-n-chitzkoi-AI.lua MissionData: Briefing: The Allies have stolen a new armor plating from us. With it, they can make structures nearly invulnerable. Their processing plant must be destroyed.\n\nFor this critical mission, we are allowing you access to Soldier Volkov. Use him and his cybernetic dog to sabotage the Allied control center, allowing our units in the southeast access to the alloy facility.\n\nThe mission is a success when Volkov destroys the control center, and our units destroy the alloy facility.\n WinVideo: grvestne.vqa diff --git a/mods/ra/maps/survival01/rules.yaml b/mods/ra/maps/survival01/rules.yaml index da6f4e47eb01..d2da032060fa 100644 --- a/mods/ra/maps/survival01/rules.yaml +++ b/mods/ra/maps/survival01/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, survival01.lua + Scripts: campaign.lua, utils.lua, survival01.lua MissionData: Briefing: LANDCOM 66 HQS.\nTOP SECRET.\nTO: FIELD COMMANDER A34\n\nTHE SOVIETS STARTED HEAVY ATTACKS AT OUR POSITION.\n SURVIVE AND HOLD THE BASE UNTIL OUR FRENCH ALLIES ARRIVE.\n\nCONFIRMATION CODE 5593.\n\nTRANSMISSION ENDS. ScriptLobbyDropdown@difficulty: diff --git a/mods/ra/maps/survival02/rules.yaml b/mods/ra/maps/survival02/rules.yaml index de8ac60e3eba..7437354cfae5 100644 --- a/mods/ra/maps/survival02/rules.yaml +++ b/mods/ra/maps/survival02/rules.yaml @@ -4,7 +4,7 @@ Player: World: LuaScript: - Scripts: campaign-global.lua, survival02.lua + Scripts: campaign.lua, utils.lua, survival02.lua MissionData: Briefing: INCOMING REPORT:\n\nCommander! The Soviets have rendered us useless...\nReports indicate Soviet reinforcements are coming to finish us off... The situation looks bleak...\n diff --git a/mods/ra/maps/top-o-the-world/rules.yaml b/mods/ra/maps/top-o-the-world/rules.yaml index df31006e53e6..41e3dcda5163 100644 --- a/mods/ra/maps/top-o-the-world/rules.yaml +++ b/mods/ra/maps/top-o-the-world/rules.yaml @@ -1,6 +1,6 @@ World: LuaScript: - Scripts: campaign-global.lua, top-o-the-world.lua + Scripts: campaign.lua, utils.lua, top-o-the-world.lua MissionData: Briefing: A critical cargo held in this supply truck must reach the waystation atop this mountain. The way is blocked by Allied squads, but do not let that deter you -- the cargo must reach its destination.\n\nIn addition, the onset of nightfall has brought sub-zero temperatures with it. The Allies are prepared for this -- our units are not. The life expectancy of your troops in these extremes is limited. Infantry may last 12 minutes, while vehicles could survive for up to 36 minutes. You have little time. Go.\n WinVideo: sovtstar.vqa diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 13b2a94869d9..5529da868074 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -34,7 +34,8 @@ Packages: ~general.mix ra|bits ra|bits/desert - ra|bits/scripts + ra|scripts + common|scripts ra|uibits MapFolders: diff --git a/mods/ra/bits/scripts/campaign-global.lua b/mods/ra/scripts/campaign.lua similarity index 61% rename from mods/ra/bits/scripts/campaign-global.lua rename to mods/ra/scripts/campaign.lua index 26e8bd0687bb..0ac34b70ad78 100644 --- a/mods/ra/bits/scripts/campaign-global.lua +++ b/mods/ra/scripts/campaign.lua @@ -6,7 +6,33 @@ the License, or (at your option) any later version. For more information, see COPYING. ]] -IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end + +Difficulty = Map.LobbyOption("difficulty") + +InitObjectives = function(player) + Trigger.OnObjectiveAdded(player, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") + end) + + Trigger.OnObjectiveCompleted(player, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") + end) + Trigger.OnObjectiveFailed(player, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") + end) + + Trigger.OnPlayerLost(player, function() + Trigger.AfterDelay(DateTime.Seconds(1), function() + Media.PlaySpeechNotification(player, "MissionFailed") + end) + end) + + Trigger.OnPlayerWon(player, function() + Trigger.AfterDelay(DateTime.Seconds(1), function() + Media.PlaySpeechNotification(player, "MissionAccomplished") + end) + end) +end AttackAircraftTargets = { } InitializeAttackAircraft = function(aircraft, enemyPlayer)