diff --git a/mods/cnc/maps/gdi04a/gdi04a.lua b/mods/cnc/maps/gdi04a/gdi04a.lua new file mode 100644 index 0000000000..9651a21b58 --- /dev/null +++ b/mods/cnc/maps/gdi04a/gdi04a.lua @@ -0,0 +1,150 @@ +Nod1Template = { {HandOfNod, {"e1", "e1", "e1", "e3", "e3"}} } +Auto1Template = { {HandOfNod, {"e1", "e1", "e3"}} } + +if OpenRA.GetDifficulty() == "Easy" then + KillsUntilReinforcements = 8 + HeliDelay = {83, 137, 211} +else + KillsUntilReinforcements = 16 + HeliDelay = {57, 89, 123} +end + +GDIReinforcements = {"e2", "e2", "e2", "e2"} +GDIReinforcementsWaypoints = {GDIReinforcementsEntry, GDIReinforcementsWP1} + +NodHelis = { + {Utils.Seconds(HeliDelay[1]), {NodHeliEntry, NodHeliLZ1}, {"e1", "e3", "e3"}}, + {Utils.Seconds(HeliDelay[2]), {NodHeliEntry, NodHeliLZ2}, {"e1", "e1", "e1", "e1", "e1"}}, + {Utils.Seconds(HeliDelay[3]), {NodHeliEntry, NodHeliLZ3}, {"e1", "e1", "e3"}} + } + +SendHeli = function(heli, func) + Reinforcements.ReinforceWithCargo(nod, "tran", heli[2], heli[3], func) + OpenRA.RunAfterDelay(heli[1], function() SendHeli(heli, func) end) +end + +HeliAction = function(heliActor, team) + Actor.AfterMove(heliActor) + Actor.UnloadCargo(heliActor, true) + Actor.Wait(heliActor, Utils.Seconds(2)) + Actor.ScriptedMove(heliActor, NodHeliEntry) + 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 + +BuildNod1 = function() + Production.BuildTeamFromTemplate(nod, Nod1Template, function(team) + Team.Do(team, function(actor) + if not Actor.IsDead(actor) then + if OpenRA.GetDifficulty() == "Normal" then + Actor.OnIdle(actor, Actor.Hunt) + else + Actor.Scatter(actor) + end + Actor.OnKilled(actor, KillCounter) + end + end) + Team.AddEventHandler(team.OnAllKilled, BuildNod1) + end) +end + +BuildAuto1 = function() + Production.BuildTeamFromTemplate(nod, Auto1Template, function(team) + Team.Do(team, function(actor) + if not Actor.IsDead(actor) then + Actor.OnIdle(actor, Actor.Hunt) + Actor.OnKilled(actor, KillCounter) + end + end) + end) +end + +kills = 0 +KillCounter = function() kills = kills + 1 end + +Auto1Triggered = 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 Auto1Triggered then + -- FIXME: replace with cell trigger when available + local units = Map.FindUnitsInCircle(player, Auto1Trigger, 2) + if #units > 0 then + Auto1Triggered = true + BuildAuto1() + end + elseif not GDIHeliTriggered then + -- FIXME: replace with cell trigger when available + local units = Map.FindUnitsInCircle(player, GDIHeliLZ, 2) + if #units > 0 then + GDIHeliTriggered = true + Reinforcements.ReinforceWithCargo(player, "tran", {GDIHeliEntry, 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) + + Actor.Hunt(Hunter1) + Actor.Hunt(Hunter2) + + 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.RunAfterDelay(1, BuildNod1) + Utils.Do(NodHelis, function(heli) + OpenRA.RunAfterDelay(heli[1], function() SendHeli(heli, HeliAction) end) + end) + + OpenRA.SetViewportCenterPosition(Actor56.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/gdi04a/map.bin b/mods/cnc/maps/gdi04a/map.bin new file mode 100644 index 0000000000..0823eb4293 Binary files /dev/null and b/mods/cnc/maps/gdi04a/map.bin differ diff --git a/mods/cnc/maps/gdi04a/map.yaml b/mods/cnc/maps/gdi04a/map.yaml new file mode 100644 index 0000000000..82152b3445 --- /dev/null +++ b/mods/cnc/maps/gdi04a/map.yaml @@ -0,0 +1,578 @@ +Selectable: True + +MapFormat: 6 + +RequiresMod: cnc + +Title: Get the Rods back (a) + +Description: Nod has captured classified GDI property. You must find and retrieve the stolen equipment. It is being transported in a shipping crate. Use the new APC to strategically transport infantry through Nod forces. + +Author: Westwood Studios + +Tileset: TEMPERAT + +MapSize: 64,64 + +Bounds: 7,24,51,36 + +UseAsShellmap: False + +Type: Campaign + +Options: + Cheats: False + Crates: False + Fog: False + Shroud: True + AllyBuildRadius: False + FragileAlliances: False + StartingCash: 0 + ConfigurableStartingUnits: False + Difficulties: Easy,Normal + +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: cycl + Location: 26,59 + Owner: Neutral + Actor1: cycl + Location: 25,59 + Owner: Neutral + Actor2: cycl + Location: 24,59 + Owner: Neutral + Actor3: cycl + Location: 26,58 + Owner: Neutral + Actor4: cycl + Location: 24,58 + Owner: Neutral + Actor5: t11 + Location: 37,43 + Owner: Neutral + Actor6: t11 + Location: 24,43 + Owner: Neutral + Actor7: t08 + Location: 46,26 + Owner: Neutral + Actor8: t08 + Location: 48,23 + Owner: Neutral + Actor9: t17 + Location: 42,24 + Owner: Neutral + Actor10: tc02 + Location: 50,28 + Owner: Neutral + Actor11: tc03 + Location: 46,22 + Owner: Neutral + Actor12: tc01 + Location: 17,48 + Owner: Neutral + Actor13: tc04 + Location: 14,47 + Owner: Neutral + Actor14: tc02 + Location: 15,56 + Owner: Neutral + Actor15: tc03 + Location: 13,56 + Owner: Neutral + Actor16: tc05 + Location: 32,24 + Owner: Neutral + Actor17: tc05 + Location: 16,46 + Owner: Neutral + Actor18: tc05 + Location: 12,36 + Owner: Neutral + Actor19: tc04 + Location: 15,41 + Owner: Neutral + Actor20: tc04 + Location: 24,41 + Owner: Neutral + Actor21: tc04 + Location: 33,39 + Owner: Neutral + Actor22: tc04 + Location: 44,34 + Owner: Neutral + Actor23: tc04 + Location: 36,24 + Owner: Neutral + Actor24: tc04 + Location: 23,35 + Owner: Neutral + Actor25: tc03 + Location: 47,35 + Owner: Neutral + Actor26: tc02 + Location: 49,35 + Owner: Neutral + Actor27: tc04 + Location: 40,25 + Owner: Neutral + Actor28: tc01 + Location: 37,25 + Owner: Neutral + Actor29: t01 + Location: 11,29 + Owner: Neutral + Actor30: t08 + Location: 14,27 + Owner: Neutral + Actor31: t08 + Location: 22,35 + Owner: Neutral + Actor32: t07 + Location: 25,34 + Owner: Neutral + Actor33: t07 + Location: 21,27 + Owner: Neutral + Actor34: t08 + Location: 27,31 + Owner: Neutral + Actor35: t06 + Location: 26,31 + Owner: Neutral + Actor36: t06 + Location: 23,24 + Owner: Neutral + Actor37: t06 + Location: 3,23 + Owner: Neutral + Actor38: t07 + Location: 12,35 + Owner: Neutral + Actor39: t05 + Location: 13,42 + Owner: Neutral + Actor40: tc01 + Location: 14,57 + Owner: Neutral + Actor41: t11 + Location: 14,34 + Owner: Neutral + Actor42: t01 + Location: 36,39 + Owner: Neutral + Actor43: t08 + Location: 34,45 + Owner: Neutral + Actor44: t07 + Location: 33,44 + Owner: Neutral + Actor45: t06 + Location: 32,44 + Owner: Neutral + Actor46: tc03 + Location: 7,25 + Owner: Neutral + Actor47: t11 + Location: 11,24 + Owner: Neutral + Actor48: tc02 + Location: 35,38 + Owner: Neutral + Actor49: tc03 + Location: 33,38 + Owner: Neutral + Actor50: hq + Location: 29,57 + Owner: Nod + Health: 1 + Facing: 0 + Actor51: nuke + Location: 28,54 + Owner: Nod + Health: 1 + Facing: 0 + HandOfNod: hand + Location: 30,52 + Owner: Nod + Health: 1 + Facing: 0 + Hunter1: bggy + Location: 35,43 + Owner: Nod + Health: 1 + Facing: 192 + Actor54: bggy + Location: 55,53 + Owner: Nod + Health: 1 + Facing: 32 + Actor55: bggy + Location: 38,43 + Owner: Nod + Health: 1 + Facing: 64 + Actor56: jeep + Location: 13,53 + Owner: GDI + Health: 1 + Facing: 0 + Hunter2: bggy + Location: 32,43 + Owner: Nod + Health: 1 + Facing: 192 + Actor58: bggy + Location: 31,57 + Owner: Nod + Health: 1 + Facing: 32 + Actor59: apc + Location: 14,53 + Owner: GDI + Health: 1 + Facing: 0 + Actor60: apc + Location: 12,53 + Owner: GDI + Health: 1 + Facing: 0 + Actor61: bggy + Location: 26,27 + Owner: Nod + Health: 1 + Facing: 160 + Actor62: bggy + Location: 51,27 + Owner: Nod + Health: 1 + Facing: 160 + Actor63: ltnk + Location: 44,53 + Owner: Nod + Health: 1 + Facing: 192 + Actor64: e3 + Location: 45,36 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 1 + Actor65: e3 + Location: 40,25 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 0 + Actor66: e3 + Location: 36,41 + Owner: Nod + Health: 1 + Facing: 160 + SubCell: 0 + Actor67: e3 + Location: 39,42 + Owner: Nod + Health: 1 + Facing: 160 + SubCell: 3 + Actor68: e3 + Location: 12,24 + Owner: Nod + Health: 1 + Facing: 96 + SubCell: 4 + Actor69: e3 + Location: 37,43 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 4 + Actor70: e2 + Location: 14,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 3 + Actor71: e1 + Location: 12,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 1 + Actor72: e1 + Location: 12,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 3 + Actor73: e1 + Location: 15,41 + Owner: Nod + Health: 1 + Facing: 96 + SubCell: 4 + Actor74: e1 + Location: 24,35 + Owner: Nod + Health: 1 + Facing: 224 + SubCell: 4 + Actor75: e1 + Location: 36,29 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 1 + Actor76: e1 + Location: 28,27 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 4 + Actor77: e1 + Location: 32,30 + Owner: Nod + Health: 1 + Facing: 224 + SubCell: 0 + Actor78: e1 + Location: 33,44 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 4 + Actor79: e1 + Location: 45,36 + Owner: Nod + Health: 1 + Facing: 160 + SubCell: 2 + Actor80: e3 + Location: 52,44 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 2 + Actor81: e3 + Location: 52,43 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 0 + Actor82: e3 + Location: 52,44 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 1 + Actor83: e1 + Location: 13,27 + Owner: Nod + Health: 1 + Facing: 128 + SubCell: 2 + Actor84: e1 + Location: 13,36 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 3 + Actor85: e1 + Location: 11,29 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 4 + Actor86: e2 + Location: 14,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 2 + Actor87: e2 + Location: 14,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 1 + Actor88: e2 + Location: 14,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 4 + Actor89: e1 + Location: 12,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 2 + Actor90: e1 + Location: 12,54 + Owner: GDI + Health: 1 + Facing: 0 + SubCell: 4 + Actor91: e3 + Location: 55,41 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 2 + Actor92: e3 + Location: 48,42 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 2 + Actor93: e1 + Location: 50,26 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 4 + Actor94: e1 + Location: 50,28 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 0 + Actor95: e1 + Location: 52,26 + Owner: Nod + Health: 1 + Facing: 64 + SubCell: 3 + Actor96: e1 + Location: 25,43 + Owner: Nod + Health: 1 + Facing: 32 + SubCell: 4 + Actor97: e1 + Location: 25,26 + Owner: Nod + Health: 1 + Facing: 160 + SubCell: 1 + Actor98: e1 + Location: 30,30 + Owner: Nod + Health: 1 + Facing: 0 + SubCell: 4 + Actor99: e3 + Location: 21,50 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 1 + Actor100: e3 + Location: 25,53 + Owner: Nod + Health: 1 + Facing: 192 + SubCell: 3 + NodHeliLZ3: waypoint + Location: 53,32 + Owner: Neutral + NodHeliLZ2: waypoint + Location: 17,28 + Owner: Neutral + NodHeliLZ1: waypoint + Location: 31,39 + Owner: Neutral + GDIReinforcementsWP2: waypoint + Location: 11,51 + Owner: Neutral + GDIReinforcementsWP1: waypoint + Location: 11,52 + Owner: Neutral + GDIReinforcementsEntry: waypoint + Location: 7, 50 + Owner: Neutral + Auto1Trigger: waypoint + Location: 52, 47 + Owner: Neutral + NodHeliEntry: waypoint + Location: 41,23 + Owner: Neutral + GDIHeliEntry: waypoint + Location: 34,60 + Owner: Neutral + GDIHeliLZ: waypoint + Location: 27,58 + Owner: Neutral + crate: CRATE + Location: 25,58 + Owner: Neutral + +Smudges: + +Rules: + World: + -SpawnMPUnits: + -MPStartLocations: + -CrateSpawner: + LuaScriptInterface: + LuaScripts: gdi04a.lua + Player: + -ConquestVictoryConditions: + ^Infantry: + MustBeDestroyed: + CRATE: + Crate: + Lifetime: 9999 + LuaScriptEvents: + HealUnitsCrateAction: + -RevealMapCrateAction: + -GiveMcvCrateAction: + -GiveCashCrateAction: + -ExplodeCrateAction@fire: + -CloakCrateAction: + +Sequences: + +VoxelSequences: + +Weapons: + Tiberium: + Warhead: + Damage: 6 + +Voices: + +Notifications: + +Translations: