diff --git a/mods/cnc/maps/gdi04b/gdi04b.lua b/mods/cnc/maps/gdi04b/gdi04b.lua new file mode 100644 index 0000000000..23a4e6f061 --- /dev/null +++ b/mods/cnc/maps/gdi04b/gdi04b.lua @@ -0,0 +1,176 @@ +NodxTemplate = { {HandOfNod, {"e1", "e1", "e3", "e3"}} } +AutoTemplate = { {HandOfNod, {"e1", "e1", "e1", "e3", "e3"}} } + +KillsUntilReinforcements = 12 +kills = 0 +KillCounter = function() kills = kills + 1 end + +GDIReinforcements = {"e2", "e2", "e2", "e2"} +GDIReinforcementsWaypoints = {GDIReinforcementsEntry, GDIReinforcementsWP1} + +NodHeli = {{HeliEntry, NodHeliLZ}, {"e1", "e1", "e3", "e3"}} + +SendHeli = function(heli, func) + Reinforcements.ReinforceWithCargo(nod, "tran", heli[1], heli[2], func) +end + +HeliAction = function(heliActor, team) + Actor.AfterMove(heliActor) + Actor.UnloadCargo(heliActor, true) + Actor.Wait(heliActor, Utils.Seconds(2)) + Actor.ScriptedMove(heliActor, HeliEntry) + Actor.RemoveSelf(heliActor) + + Team.Do(team, function(actor) + Actor.Hunt(actor) + Actor.OnIdle(actor, Actor.Hunt) + Actor.OnKilled(actor, KillCounter) + end) +end + +SendGDIReinforcements = function() + Reinforcements.ReinforceWithCargo(player, "apc", GDIReinforcementsWaypoints, GDIReinforcements, function(apc, team) + Team.Add(team, apc) + Actor.OnKilled(apc, SendGDIReinforcements) + Team.Do(team, function(unit) Actor.SetStance(unit, "Defend") end) + end) +end + +Build = function(template, repeats, func) + Production.BuildTeamFromTemplate(nod, template, function(team) + Team.Do(team, function(actor) + if not Actor.IsDead(actor) then + func(actor) + end + end) + if repeats then + Team.AddEventHandler(team.OnAllKilled, function() + Build(template, repeats, func) + end) + end + end) + +end + +BuildNod1 = function() + Build(NodxTemplate, false, function(actor) + Actor.OnKilled(actor, KillCounter) + Actor.Patrol(actor, {waypoint1, waypoint2, waypoint3, waypoint4}, 0, false) + Actor.OnIdle(actor, Actor.Hunt) + end) +end + +BuildNod2 = function() + Build(NodxTemplate, false, function(actor) + Actor.OnKilled(actor, KillCounter) + Actor.Patrol(actor, {waypoint1, waypoint2}, 0, false) + Actor.OnIdle(actor, Actor.Hunt) + end) +end + +BuildAuto = function() + Build(AutoTemplate, true, function(actor) + Actor.OnKilled(actor, KillCounter) + Actor.OnIdle(actor, Actor.Hunt) + end) +end + +-- FIXME: replace with real cell trigger when available +CellTrigger = function(player, trigger, radius, func) + local units = Map.FindUnitsInCircle(player, trigger, radius) + if #units > 0 then + func() + end +end + +BhndTriggered = false +Atk1Triggered = false +Atk2Triggered = false +AutoTriggered = false +GDIHeliTriggered = false +ReinforcementsSent = false + +Tick = function() + if not ReinforcementsSent and kills >= KillsUntilReinforcements then + ReinforcementsSent = true + SendGDIReinforcements() + end + + if Mission.RequiredUnitsAreDestroyed(player) then + OpenRA.RunAfterDelay(Utils.Seconds(1), MissionFailed) + end + + if not BhndTriggered then + CellTrigger(player, BhndTrigger, 2, function() + BhndTriggered = true + SendHeli(NodHeli, HeliAction) + end) + end + + if not Atk1Triggered then + CellTrigger(player, Atk1Trigger, 2, function() + Atk1Triggered = true + BuildNod1() + end) + elseif not Atk2Triggered then + CellTrigger(player, Atk2Trigger, 2, function() + Atk2Triggered = true + BuildNod2() + end) + elseif not AutoTriggered then + CellTrigger(player, AutoTrigger, 2, function() + AutoTriggered = true + BuildAuto() + OpenRA.RunAfterDelay(Utils.Seconds(5), function() + Actor.Hunt(tank) + end) + end) + elseif not GDIHeliTriggered then + CellTrigger(player, HeliTrigger, 2, function() + GDIHeliTriggered = true + Reinforcements.ReinforceWithCargo(player, "tran", {HeliEntry, GDIHeliLZ}, nil, Actor.AfterMove) + end) + end +end + +SetupWorld = function() + OpenRA.GiveCash(nod, 10000) + Production.EventHandlers.Setup(nod) + + Utils.Do(Mission.GetGroundAttackersOf(nod), function(unit) + Actor.OnKilled(unit, KillCounter) + end) + + Utils.Do(Mission.GetGroundAttackersOf(player), function(unit) + Actor.SetStance(unit, "Defend") + end) + + hunters1 = Team.New({Hunter1, Hunter2}) + hunters2 = Team.New({Hunter3, Hunter4, Hunter5}) + + OpenRA.RunAfterDelay(1, function() Team.Do(hunters1, Actor.Hunt) end) + OpenRA.RunAfterDelay(1, function() Team.Do(hunters2, Actor.Hunt) end) + + Actor.OnRemovedFromWorld(crate, MissionAccomplished) +end + +WorldLoaded = function() + Media.PlayMovieFullscreen("bkground.vqa", function() Media.PlayMovieFullscreen("gdi4b.vqa", function() Media.PlayMovieFullscreen("nitejump.vqa") end) end) + + player = OpenRA.GetPlayer("GDI") + nod = OpenRA.GetPlayer("Nod") + + SetupWorld() + + OpenRA.SetViewportCenterPosition(GDIReinforcementsWP1.CenterPosition) +end + +MissionAccomplished = function() + Mission.MissionOver({ player }, nil, false) + Media.PlayMovieFullscreen("burdet1.vqa") +end + +MissionFailed = function() + Mission.MissionOver(nil, { player }, false) + Media.PlayMovieFullscreen("gameover.vqa") +end diff --git a/mods/cnc/maps/gdi04b/map.bin b/mods/cnc/maps/gdi04b/map.bin new file mode 100644 index 0000000000..f43ceb99ae Binary files /dev/null and b/mods/cnc/maps/gdi04b/map.bin differ diff --git a/mods/cnc/maps/gdi04b/map.png b/mods/cnc/maps/gdi04b/map.png new file mode 100644 index 0000000000..2fd72f67a9 Binary files /dev/null and b/mods/cnc/maps/gdi04b/map.png differ diff --git a/mods/cnc/maps/gdi04b/map.yaml b/mods/cnc/maps/gdi04b/map.yaml new file mode 100644 index 0000000000..fe20a8c6f3 --- /dev/null +++ b/mods/cnc/maps/gdi04b/map.yaml @@ -0,0 +1,664 @@ +Selectable: False + +MapFormat: 6 + +RequiresMod: cnc + +Title: Get the Rods back (b) + +Author: Westwood Studios + +Description: Nod has captured classified GDI property.\n\nYou must find and retrieve the stolen equipment.\n\nIt is being transported in a shipping crate.\n\nUse the new APC to strategically transport infantry through Nod forces. + +Tileset: TEMPERAT + +MapSize: 64,64 + +Bounds: 5,11,50,38 + +UseAsShellmap: False + +Type: Campaign + +Options: + Crates: False + Fog: False + Shroud: True + AllyBuildRadius: False + FragileAlliances: False + StartingCash: 0 + ConfigurableStartingUnits: False + +Players: + PlayerReference@Nod: + Name: Nod + Race: nod + ColorRamp: 3,255,127 + Allies: Nod + Enemies: GDI + PlayerReference@GDI: + Name: GDI + Playable: True + AllowBots: False + Required: True + LockRace: True + Race: gdi + LockColor: True + ColorRamp: 31,222,183 + LockSpawn: True + LockTeam: True + Allies: GDI + Enemies: Nod + PlayerReference@Neutral: + Name: Neutral + OwnsWorld: True + NonCombatant: True + Race: gdi + PlayerReference@Creeps: + Name: Creeps + NonCombatant: True + Race: gdi + +Actors: + Actor0: sbag + Location: 10,18 + Owner: Neutral + Actor1: sbag + Location: 9,18 + Owner: Neutral + Actor2: sbag + Location: 8,18 + Owner: Neutral + Actor3: sbag + Location: 7,18 + Owner: Neutral + Actor4: sbag + Location: 7,17 + Owner: Neutral + Actor5: sbag + Location: 6,17 + Owner: Neutral + Actor6: sbag + Location: 6,16 + Owner: Neutral + Actor7: sbag + Location: 6,15 + Owner: Neutral + Actor8: sbag + Location: 6,14 + Owner: Neutral + Actor9: cycl + Location: 15,13 + Owner: Neutral + Actor10: cycl + Location: 13,13 + Owner: Neutral + Actor11: sbag + Location: 6,13 + Owner: Neutral + Actor12: cycl + Location: 15,12 + Owner: Neutral + Actor13: cycl + Location: 14,12 + Owner: Neutral + Actor14: cycl + Location: 13,12 + Owner: Neutral + Actor15: sbag + Location: 6,12 + Owner: Neutral + Actor16: sbag + Location: 15,11 + Owner: Neutral + Actor17: sbag + Location: 14,11 + Owner: Neutral + Actor18: sbag + Location: 13,11 + Owner: Neutral + Actor19: sbag + Location: 12,11 + Owner: Neutral + Actor20: sbag + Location: 11,11 + Owner: Neutral + Actor21: sbag + Location: 10,11 + Owner: Neutral + Actor22: sbag + Location: 9,11 + Owner: Neutral + Actor23: sbag + Location: 8,11 + Owner: Neutral + Actor24: sbag + Location: 7,11 + Owner: Neutral + Actor25: sbag + Location: 6,11 + Owner: Neutral + Actor26: t05 + Location: 18,42 + Owner: Neutral + Actor27: t03 + Location: 17,39 + Owner: Neutral + Actor28: t02 + Location: 16,40 + Owner: Neutral + Actor29: t01 + Location: 16,39 + Owner: Neutral + Actor30: t03 + Location: 24,22 + Owner: Neutral + Actor31: t02 + Location: 24,21 + Owner: Neutral + Actor32: t08 + Location: 6,43 + Owner: Neutral + Actor33: t02 + Location: 28,15 + Owner: Neutral + Actor34: t06 + Location: 32,14 + Owner: Neutral + Actor35: t01 + Location: 29,15 + Owner: Neutral + Actor36: t06 + Location: 48,38 + Owner: Neutral + Actor37: t07 + Location: 48,39 + Owner: Neutral + Actor38: tc01 + Location: 37,40 + Owner: Neutral + Actor39: tc04 + Location: 43,44 + Owner: Neutral + Actor40: tc05 + Location: 43,46 + Owner: Neutral + Actor41: t08 + Location: 25,28 + Owner: Neutral + Actor42: tc03 + Location: 29,33 + Owner: Neutral + Actor43: t07 + Location: 25,34 + Owner: Neutral + Actor44: t08 + Location: 22,33 + Owner: Neutral + Actor45: t08 + Location: 9,36 + Owner: Neutral + Actor46: t16 + Location: 10,35 + Owner: Neutral + Actor47: tc04 + Location: 8,31 + Owner: Neutral + Actor48: tc04 + Location: 23,33 + Owner: Neutral + Actor49: tc04 + Location: 31,37 + Owner: Neutral + Actor50: t16 + Location: 32,38 + Owner: Neutral + Actor51: tc05 + Location: 28,38 + Owner: Neutral + Actor52: tc01 + Location: 48,14 + Owner: Neutral + Actor53: tc04 + Location: 44,11 + Owner: Neutral + Actor54: tc05 + Location: 49,13 + Owner: Neutral + Actor55: tc03 + Location: 31,40 + Owner: Neutral + Actor56: tc04 + Location: 28,44 + Owner: Neutral + Actor57: t03 + Location: 33,39 + Owner: Neutral + Actor58: t05 + Location: 33,38 + Owner: Neutral + Actor59: t05 + Location: 25,43 + Owner: Neutral + Actor60: tc01 + Location: 23,43 + Owner: Neutral + Actor61: tc02 + Location: 17,44 + Owner: Neutral + Actor62: t08 + Location: 22,44 + Owner: Neutral + Actor63: tc02 + Location: 19,25 + Owner: Neutral + Actor64: tc05 + Location: 32,27 + Owner: Neutral + Actor65: t07 + Location: 36,21 + Owner: Neutral + Actor66: t11 + Location: 37,20 + Owner: Neutral + Actor67: tc04 + Location: 7,45 + Owner: Neutral + Actor68: t08 + Location: 15,32 + Owner: Neutral + Actor69: t07 + Location: 9,20 + Owner: Neutral + Actor70: t08 + Location: 48,41 + Owner: Neutral + Actor71: t11 + Location: 46,40 + Owner: Neutral + Actor72: tc02 + Location: 48,30 + Owner: Neutral + Actor73: tc04 + Location: 50,29 + Owner: Neutral + Actor74: tc05 + Location: 49,31 + Owner: Neutral + Actor75: t07 + Location: 49,32 + Owner: Neutral + Actor76: t06 + Location: 33,29 + Owner: Neutral + Actor77: t06 + Location: 37,39 + Owner: Neutral + Actor78: t07 + Location: 42,35 + Owner: Neutral + Actor79: t08 + Location: 39,42 + Owner: Neutral + Actor80: tc04 + Location: 7,11 + Owner: Neutral + Actor81: tc01 + Location: 29,24 + Owner: Neutral + Actor82: t01 + Location: 28,24 + Owner: Neutral + Actor83: t01 + Location: 25,22 + Owner: Neutral + Actor84: t02 + Location: 26,23 + Owner: Neutral + Actor85: t03 + Location: 34,23 + Owner: Neutral + Actor86: t05 + Location: 35,23 + Owner: Neutral + HandOfNod: hand + Location: 15,14 + Owner: Nod + Health: 1 + Facing: 0 + Actor88: nuke + Location: 11,12 + Owner: Nod + Health: 1 + Facing: 0 + Actor89: hq + Location: 10,14 + Owner: Nod + Health: 1 + Facing: 0 + Hunter1: bggy + Location: 27,37 + Owner: Nod + Health: 1 + Facing: 0 + Hunter2: bggy + Location: 41,29 + Owner: Nod + Health: 1 + Facing: 128 + Actor92: jeep + Location: 49,45 + Owner: GDI + Health: 1 + Facing: 224 + Actor93: bggy + Location: 10,23 + Owner: Nod + Health: 1 + Facing: 96 + Actor94: apc + Location: 48,46 + Owner: GDI + Health: 1 + Facing: 224 + Actor95: apc + Location: 51,45 + Owner: GDI + Health: 1 + Facing: 224 + Actor96: bggy + Location: 34,18 + Owner: Nod + Health: 1 + Facing: 64 + Actor97: bggy + Location: 53,26 + Owner: Nod + Health: 1 + Facing: 128 + tank: ltnk + Location: 8,17 + Owner: Nod + Health: 1 + Facing: 96 + Actor99: e3 + Location: 8,45 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 3 + Actor100: e3 + Location: 9,45 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 3 + Actor101: e2 + Location: 51,46 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 1 + Actor102: e3 + Location: 36,15 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 2 + Actor103: e1 + Location: 50,47 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 1 + Actor104: e3 + Location: 25,33 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 3 + Actor105: e1 + Location: 11,46 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 3 + Actor106: e1 + Location: 30,37 + Owner: Nod + Health: 1 + Facing: 32 + SubCell: 3 + Actor107: e3 + Location: 17,44 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 0 + Actor108: e1 + Location: 23,33 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 0 + Actor109: e1 + Location: 28,31 + Owner: Nod + Health: 1 + Facing: 96 + SubCell: 1 + Actor110: e1 + Location: 10,31 + Owner: Nod + Health: 1 + Facing: 160 + SubCell: 0 + Actor111: e3 + Location: 33,20 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 2 + Actor112: e3 + Location: 25,18 + Owner: Nod + Health: 1 + Facing: 96 + SubCell: 0 + Actor113: e1 + Location: 49,46 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 4 + Actor114: e1 + Location: 49,46 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 3 + Actor115: e1 + Location: 49,47 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 2 + Actor116: e2 + Location: 51,46 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 2 + Actor117: e2 + Location: 51,46 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 4 + Actor118: e2 + Location: 52,46 + Owner: GDI + Health: 1 + Facing: 224 + SubCell: 3 + Actor119: e3 + Location: 39,32 + Owner: Nod + Health: 1 + Facing: 96 + SubCell: 4 + Actor120: e3 + Location: 12,16 + Owner: Nod + Health: 1 + Facing: 96 + SubCell: 2 + Actor121: e1 + Location: 10,35 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 4 + Actor122: e1 + Location: 12,20 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 4 + Actor123: e1 + Location: 14,20 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 4 + Actor124: e3 + Location: 52,29 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 3 + Actor125: e3 + Location: 8,31 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 0 + Actor126: e3 + Location: 19,25 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 4 + Hunter3: e3 + Location: 37,36 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 1 + Hunter4: e3 + Location: 38,35 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 1 + Hunter5: e3 + Location: 38,35 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 4 + waypoint26: waypoint + Location: 42,41 + Owner: Neutral + GDIHeliLZ: waypoint + Location: 8,14 + Owner: Neutral + NodHeliLZ: waypoint + Location: 40,30 + Owner: Neutral + waypoint4: waypoint + Location: 18,47 + Owner: Neutral + waypoint3: waypoint + Location: 11,42 + Owner: Neutral + waypoint2: waypoint + Location: 12,28 + Owner: Neutral + waypoint1: waypoint + Location: 13,19 + Owner: Neutral + GDIReinforcementsWP1: waypoint + Location: 50,45 + Owner: Neutral + crate: CRATE + Location: 14,13 + Owner: Neutral + BhndTrigger: waypoint + Location: 40,21 + Owner: Neutral + Atk1Trigger: waypoint + Location: 35,37 + Owner: Neutral + Atk2Trigger: waypoint + Location: 11,44 + Owner: Neutral + AutoTrigger: waypoint + Location: 12,30 + Owner: Neutral + HeliTrigger: waypoint + Location: 13,15 + Owner: Neutral + HeliEntry: waypoint + Location: 4,26 + Owner: Neutral + GDIReinforcementsEntry: waypoint + Location: 54,45 + Owner: Neutral + +Smudges: + +Rules: + World: + -SpawnMPUnits: + -MPStartLocations: + -CrateSpawner: + LuaScriptInterface: + LuaScripts: gdi04b.lua + Player: + -ConquestVictoryConditions: + ^Infantry: + MustBeDestroyed: + ^Vehicle: + MustBeDestroyed: + ^Tank: + MustBeDestroyed: + E3: + AutoTarget: + ScanRadius: 5 + CRATE: + Crate: + Lifetime: 9999 + LuaScriptEvents: + HealUnitsCrateAction: + -RevealMapCrateAction: + -GiveMcvCrateAction: + -GiveCashCrateAction: + -ExplodeCrateAction@fire: + -CloakCrateAction: + +Sequences: + +VoxelSequences: + +Weapons: + Tiberium: + Warhead: + Damage: 4 + +Voices: + +Notifications: + +Translations: + diff --git a/mods/cnc/missions.yaml b/mods/cnc/missions.yaml index cbe0779331..378cb1d7fd 100644 --- a/mods/cnc/missions.yaml +++ b/mods/cnc/missions.yaml @@ -3,6 +3,7 @@ Missions: mods/cnc/maps/gdi02 mods/cnc/maps/gdi03 mods/cnc/maps/gdi04a + mods/cnc/maps/gdi04b mods/cnc/maps/nod01 mods/cnc/maps/nod03a - mods/cnc/maps/nod03b \ No newline at end of file + mods/cnc/maps/nod03b