diff --git a/OpenRA.sln b/OpenRA.sln index 5587c5b745..cc441d80f8 100644 --- a/OpenRA.sln +++ b/OpenRA.sln @@ -40,6 +40,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tiberian Dawn Lua scripts", mods\cnc\maps\nod04b\nod04b.lua = mods\cnc\maps\nod04b\nod04b.lua mods\cnc\maps\nod05\nod05.lua = mods\cnc\maps\nod05\nod05.lua mods\cnc\maps\funpark01\scj01ea.lua = mods\cnc\maps\funpark01\scj01ea.lua + mods\cnc\maps\nod06a\nod06a.lua = mods\cnc\maps\nod06a\nod06a.lua mods\cnc\maps\shellmap\shellmap.lua = mods\cnc\maps\shellmap\shellmap.lua EndProjectSection EndProject diff --git a/mods/cnc/audio/notifications.yaml b/mods/cnc/audio/notifications.yaml index 378ded87f3..01f0844fec 100644 --- a/mods/cnc/audio/notifications.yaml +++ b/mods/cnc/audio/notifications.yaml @@ -43,4 +43,9 @@ Sounds: TabClick: button ClickSound: button ClickDisabledSound: scold2 - Beacon: bleep2 \ No newline at end of file + Beacon: bleep2 + SignalFlare: flare1 + SignalFlareEast: flaree1 + SignalFlareNorth: flaren1 + SignalFlareSouth: flares1 + SignalFlareWest: flarew1 \ No newline at end of file diff --git a/mods/cnc/maps/nod06a/map.bin b/mods/cnc/maps/nod06a/map.bin new file mode 100644 index 0000000000..06818329b5 Binary files /dev/null and b/mods/cnc/maps/nod06a/map.bin differ diff --git a/mods/cnc/maps/nod06a/map.png b/mods/cnc/maps/nod06a/map.png new file mode 100644 index 0000000000..d7466e25f2 Binary files /dev/null and b/mods/cnc/maps/nod06a/map.png differ diff --git a/mods/cnc/maps/nod06a/map.yaml b/mods/cnc/maps/nod06a/map.yaml new file mode 100644 index 0000000000..49fb0ada6b --- /dev/null +++ b/mods/cnc/maps/nod06a/map.yaml @@ -0,0 +1,728 @@ +MapFormat: 7 + +RequiresMod: cnc + +Title: Steal The Detonator (a) + +Description: GDI has imported a Nuclear Detonator in an attempt to sway a few local political leaders. Penetrate the base and steal the detonator. A chopper will be sent to meet you at a designated landing zone. Look for the landing flare once you have stolen the device. + +Author: Westwood Studios + +Tileset: DESERT + +MapSize: 64,64 + +Bounds: 16,17,46,45 + +Visibility: MissionSelector + +Type: Campaign + +Videos: + Briefing: nod6.vqa + GameStart: sundial.vqa + GameLost: banner.vqa + +Options: + Crates: False + Creeps: False + Fog: True + Shroud: True + AllyBuildRadius: False + FragileAlliances: False + StartingCash: 0 + ConfigurableStartingUnits: False + ShortGame: False + +Players: + PlayerReference@Neutral: + Name: Neutral + OwnsWorld: True + NonCombatant: True + Race: gdi + Enemies: GDI, Nod + PlayerReference@GDI: + Name: GDI + Playable: False + Race: gdi + ColorRamp: 31,222,183 + Enemies: Nod + PlayerReference@Nod: + Name: Nod + Playable: True + AllowBots: False + Required: True + LockRace: True + Race: nod + LockColor: True + ColorRamp: 3,255,127 + LockSpawn: True + LockTeam: True + Enemies: GDI + +Actors: + Actor0: sbag + Location: 61,46 + Owner: GDI + Actor1: sbag + Location: 60,46 + Owner: GDI + Actor2: sbag + Location: 59,46 + Owner: GDI + Actor3: sbag + Location: 57,46 + Owner: GDI + Actor4: sbag + Location: 56,46 + Owner: GDI + Actor5: sbag + Location: 55,46 + Owner: GDI + Actor6: sbag + Location: 54,46 + Owner: GDI + Actor7: sbag + Location: 53,46 + Owner: GDI + Actor8: sbag + Location: 52,46 + Owner: GDI + Actor9: sbag + Location: 61,45 + Owner: GDI + Actor10: sbag + Location: 59,45 + Owner: GDI + Actor11: sbag + Location: 57,45 + Owner: GDI + Actor12: sbag + Location: 52,45 + Owner: GDI + Actor13: sbag + Location: 61,44 + Owner: GDI + Actor14: cycl + Location: 60,44 + Owner: Neutral + Actor15: cycl + Location: 59,44 + Owner: Neutral + Actor16: cycl + Location: 58,44 + Owner: Neutral + Actor17: sbag + Location: 61,43 + Owner: Neutral + Actor18: cycl + Location: 60,43 + Owner: Neutral + Actor19: cycl + Location: 58,43 + Owner: Neutral + Actor20: sbag + Location: 50,43 + Owner: GDI + Actor21: sbag + Location: 49,43 + Owner: GDI + Actor22: sbag + Location: 61,42 + Owner: GDI + Actor23: cycl + Location: 60,42 + Owner: Neutral + Actor24: cycl + Location: 59,42 + Owner: Neutral + Actor25: cycl + Location: 58,42 + Owner: Neutral + Actor26: sbag + Location: 49,42 + Owner: GDI + Actor27: sbag + Location: 61,41 + Owner: GDI + Actor28: sbag + Location: 49,41 + Owner: GDI + Actor29: sbag + Location: 61,40 + Owner: GDI + Actor30: sbag + Location: 49,40 + Owner: GDI + Actor31: sbag + Location: 61,39 + Owner: GDI + Actor32: sbag + Location: 49,39 + Owner: GDI + Actor33: sbag + Location: 61,38 + Owner: GDI + Actor34: sbag + Location: 49,38 + Owner: GDI + Actor35: sbag + Location: 61,37 + Owner: GDI + Actor36: sbag + Location: 49,37 + Owner: GDI + Actor37: sbag + Location: 61,36 + Owner: GDI + Actor38: sbag + Location: 49,36 + Owner: GDI + Actor39: sbag + Location: 61,35 + Owner: GDI + Actor40: sbag + Location: 49,35 + Owner: GDI + Actor41: sbag + Location: 61,34 + Owner: GDI + Actor42: sbag + Location: 49,34 + Owner: GDI + Actor43: sbag + Location: 61,33 + Owner: GDI + Actor44: sbag + Location: 49,33 + Owner: GDI + Actor45: sbag + Location: 61,32 + Owner: GDI + Actor46: sbag + Location: 49,32 + Owner: GDI + Actor47: sbag + Location: 61,31 + Owner: GDI + Actor48: sbag + Location: 60,31 + Owner: GDI + Actor49: sbag + Location: 59,31 + Owner: GDI + Actor50: sbag + Location: 58,31 + Owner: GDI + Actor51: sbag + Location: 57,31 + Owner: GDI + Actor52: sbag + Location: 56,31 + Owner: GDI + Actor53: sbag + Location: 55,31 + Owner: GDI + Actor54: sbag + Location: 54,31 + Owner: GDI + Actor55: sbag + Location: 53,31 + Owner: GDI + Actor56: sbag + Location: 52,31 + Owner: GDI + Actor57: sbag + Location: 51,31 + Owner: GDI + Actor58: sbag + Location: 50,31 + Owner: GDI + Actor59: sbag + Location: 49,31 + Owner: GDI + Actor60: t08 + Location: 46,23 + Owner: Neutral + Actor61: t18 + Location: 46,21 + Owner: Neutral + Actor62: t18 + Location: 49,19 + Owner: Neutral + Actor63: t18 + Location: 47,53 + Owner: Neutral + Actor64: t08 + Location: 25,30 + Owner: Neutral + Actor65: t08 + Location: 24,30 + Owner: Neutral + Actor66: rock6 + Location: 24,55 + Owner: Neutral + Actor67: rock1 + Location: 16,31 + Owner: Neutral + Actor68: t08 + Location: 29,42 + Owner: Neutral + Actor69: t08 + Location: 30,43 + Owner: Neutral + Actor70: t08 + Location: 31,36 + Owner: Neutral + Actor71: t08 + Location: 31,58 + Owner: Neutral + Actor72: t08 + Location: 30,58 + Owner: Neutral + Actor73: t08 + Location: 36,51 + Owner: Neutral + Actor74: t08 + Location: 37,46 + Owner: Neutral + Actor75: t08 + Location: 39,51 + Owner: Neutral + Actor76: t08 + Location: 52,53 + Owner: Neutral + Actor77: t08 + Location: 16,60 + Owner: Neutral + Actor78: t08 + Location: 19,57 + Owner: Neutral + Actor79: t08 + Location: 18,51 + Owner: Neutral + Actor80: t08 + Location: 17,50 + Owner: Neutral + Actor81: t08 + Location: 16,50 + Owner: Neutral + Actor82: t08 + Location: 23,33 + Owner: Neutral + Actor83: t08 + Location: 50,17 + Owner: Neutral + Actor84: t08 + Location: 38,17 + Owner: Neutral + Actor85: t08 + Location: 42,18 + Owner: Neutral + Actor86: t08 + Location: 43,24 + Owner: Neutral + Actor87: t08 + Location: 43,23 + Owner: Neutral + Actor88: t08 + Location: 42,23 + Owner: Neutral + Actor89: t08 + Location: 35,20 + Owner: Neutral + Actor90: t08 + Location: 30,22 + Owner: Neutral + Actor91: t08 + Location: 17,19 + Owner: Neutral + Actor92: t08 + Location: 16,19 + Owner: Neutral + Actor93: t08 + Location: 57,22 + Owner: Neutral + Actor94: t08 + Location: 52,50 + Owner: Neutral + Actor95: t08 + Location: 53,28 + Owner: Neutral + Actor96: t08 + Location: 54,23 + Owner: Neutral + Actor97: t08 + Location: 55,23 + Owner: Neutral + Actor99: v35 + Location: 36,19 + Owner: Neutral + Actor100: v34 + Location: 34,20 + Owner: Neutral + Actor101: v33 + Location: 34,19 + Owner: Neutral + Actor102: v31 + Location: 36,24 + Owner: Neutral + Actor103: v30 + Location: 41,17 + Owner: Neutral + Actor111: v23 + Location: 44,24 + Owner: Neutral + Actor113: v21 + Location: 44,23 + Owner: Neutral + Actor114: v20 + Location: 45,21 + Owner: Neutral + Actor117: fact + Location: 50,32 + Owner: GDI + Actor119: nuke + Location: 55,32 + Owner: GDI + Actor120: nuke + Location: 53,32 + Owner: GDI + Actor121: proc + Location: 50,35 + Owner: GDI + Actor122: silo + Location: 53,35 + Owner: GDI + Actor123: pyle + Location: 55,35 + Owner: GDI + Actor124: silo + Location: 53,37 + Owner: GDI + Actor125: jeep + Location: 59,25 + Owner: GDI + Facing: 160 + Actor126: jeep + Location: 50,42 + Owner: GDI + Facing: 128 + Actor127: mtnk + Location: 53,45 + Owner: GDI + Facing: 160 + Actor128: mtnk + Location: 59,38 + Owner: GDI + Actor129: mtnk + Location: 60,39 + Owner: GDI + Actor130: jeep + Location: 60,36 + Owner: GDI + Actor131: mtnk + Location: 59,36 + Owner: GDI + Actor134: mtnk + Location: 38,38 + Owner: GDI + Facing: 160 + Actor135: jeep + Location: 60,37 + Owner: GDI + Actor139: mtnk + Location: 28,33 + Owner: GDI + Facing: 224 + Actor140: e2 + Location: 24,29 + Owner: GDI + Facing: 224 + SubCell: 1 + Actor141: e2 + Location: 24,28 + Owner: GDI + Facing: 224 + SubCell: 3 + Actor142: e1 + Location: 58,38 + Owner: GDI + SubCell: 3 + Actor143: e2 + Location: 38,46 + Owner: GDI + SubCell: 1 + Actor144: e2 + Location: 38,46 + Owner: GDI + SubCell: 2 + Actor146: e1 + Location: 57,39 + Owner: GDI + SubCell: 2 + Actor147: e1 + Location: 57,38 + Owner: GDI + SubCell: 4 + Actor148: e1 + Location: 57,39 + Owner: GDI + SubCell: 1 + Actor149: e1 + Location: 57,38 + Owner: GDI + SubCell: 3 + Actor150: e2 + Location: 57,37 + Owner: GDI + SubCell: 1 + Actor151: e2 + Location: 57,37 + Owner: GDI + SubCell: 2 + Actor152: e2 + Location: 57,37 + Owner: GDI + SubCell: 3 + Actor153: e2 + Location: 57,37 + Owner: GDI + SubCell: 4 + Actor154: c3 + Location: 40,22 + Owner: Neutral + Facing: 192 + SubCell: 4 + Actor155: c5 + Location: 40,19 + Owner: Neutral + Facing: 96 + SubCell: 1 + Actor156: c6 + Location: 39,21 + Owner: Neutral + Facing: 96 + SubCell: 0 + Actor157: e1 + Location: 30,57 + Owner: GDI + SubCell: 4 + Actor158: e2 + Location: 32,58 + Owner: GDI + SubCell: 1 + Actor159: e2 + Location: 39,52 + Owner: GDI + SubCell: 0 + Actor160: e2 + Location: 40,51 + Owner: GDI + SubCell: 1 + waypoint27: waypoint + Location: 54,58 + Owner: Neutral + waypoint26: waypoint + Location: 16,17 + Owner: Neutral + waypoint25: waypoint + Location: 56,56 + Owner: Neutral + waypoint17: waypoint + Location: 55,57 + Owner: Neutral + waypoint16: waypoint + Location: 58,51 + Owner: Neutral + waypoint15: waypoint + Location: 59,30 + Owner: Neutral + waypoint14: waypoint + Location: 61,19 + Owner: Neutral + waypoint13: waypoint + Location: 49,18 + Owner: Neutral + waypoint11: waypoint + Location: 20,21 + Owner: Neutral + waypoint10: waypoint + Location: 31,41 + Owner: Neutral + waypoint9: waypoint + Location: 19,36 + Owner: Neutral + waypoint8: waypoint + Location: 20,54 + Owner: Neutral + waypoint7: waypoint + Location: 40,57 + Owner: Neutral + waypoint6: waypoint + Location: 36,29 + Owner: Neutral + waypoint5: waypoint + Location: 40,29 + Owner: Neutral + waypoint4: waypoint + Location: 44,44 + Owner: Neutral + waypoint3: waypoint + Location: 44,47 + Owner: Neutral + waypoint2: waypoint + Location: 59,39 + Owner: Neutral + waypoint1: waypoint + Location: 51,43 + Owner: Neutral + waypoint0: waypoint + Location: 56,39 + Owner: Neutral + UnitsEntryLeft: waypoint + Location: 20,17 + Owner: Neutral + UnitsRallyLeft: waypoint + Location: 20,20 + Owner: Neutral + UnitsEntryRight: waypoint + Location: 27,17 + Owner: Neutral + UnitsRallyRight: waypoint + Location: 27,20 + Owner: Neutral + ChnEnrty: waypoint + Location: 32,61 + Owner: Neutral + Obj2UnitsEntry: waypoint + Location: 48,17 + Owner: Neutral + Guard1: e2 + Location: 18,31 + Owner: GDI + SubCell: 0 + Guard2: e2 + Location: 17,31 + Owner: GDI + SubCell: 1 + Guard3: e2 + Location: 18,32 + Owner: GDI + SubCell: 2 + Atk1Activator1: gtwr + Location: 48,43 + Owner: GDI + Atk1Activator2: e1 + Location: 50,46 + Owner: GDI + Facing: 224 + SubCell: 4 + Atk2Activator1: gtwr + Location: 51,46 + Owner: GDI + Atk2Activator2: e1 + Location: 48,44 + Owner: GDI + Facing: 160 + SubCell: 4 + Atk3Activator: v25 + Location: 41,19 + Owner: GDI + Chn1Activator1: v29 + Location: 42,22 + Owner: GDI + Chn1Activator2: v27 + Location: 35,23 + Owner: GDI + Chn1Activator3: v26 + Location: 37,20 + Owner: GDI + Chn1Activator4: v24 + Location: 41,23 + Owner: GDI + Chn1Activator5: v22 + Location: 41,21 + Owner: GDI + Chn2Activator1: v27 + Location: 34,23 + Owner: GDI + Chn2Activator2: v30 + Location: 35,22 + Owner: GDI + Chn2Activator3: v27 + Location: 36,23 + Owner: GDI + Detonator: CRATE.plain + Location: 59, 43 + Owner: GDI + Radar: hq + Location: 57,32 + Owner: GDI + +Smudges: + +Rules: + Player: + -ConquestVictoryConditions: + MissionObjectives: + EarlyGameOver: true + EnemyWatcher: + World: + -CrateSpawner: + -SpawnMPUnits: + -MPStartLocations: + ObjectivesPanel: + PanelName: MISSION_OBJECTIVES + LuaScript: + Scripts: nod06a.lua + ^Vehicle: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + ^Tank: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + ^Infantry: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + AnnounceOnSeen: + ^Plane: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + ^Ship: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + ^Building: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + ^Husk: + Tooltip: + GenericVisibility: Enemy + ShowOwnerRow: false + ^CivBuildingHusk: + Tooltip: + ShowOwnerRow: false + HARV: + Harvester: + SearchFromProcRadius: 64 + FLARE: + Tooltip: + ShowOwnerRow: false + +Sequences: + +VoxelSequences: + +Weapons: + +Voices: + +Notifications: + +Translations: diff --git a/mods/cnc/maps/nod06a/nod06a.lua b/mods/cnc/maps/nod06a/nod06a.lua new file mode 100644 index 0000000000..f786a1b5a8 --- /dev/null +++ b/mods/cnc/maps/nod06a/nod06a.lua @@ -0,0 +1,215 @@ +NodStartUnitsRight = { 'ltnk', 'bike', 'e1', 'e1', 'e3', 'e3' } +NodStartUnitsLeft = { 'ltnk', 'ltnk', 'bggy', 'e1', 'e1', 'e1', 'e1', 'e3', 'e3', 'e3', 'e3' } +Chn1Units = { 'e1', 'e1', 'e1', 'e1', 'e1' } +Chn2Units = { 'e2', 'e2', 'e2', 'e2', 'e2' } +Obj2Units = { 'ltnk', 'bike', 'e1', 'e1', 'e1' } + +Chn3CellTriggerActivator = { CPos.New(49,58), CPos.New(48,58), CPos.New(49,57), CPos.New(48,57), CPos.New(49,56), CPos.New(48,56), CPos.New(49,55), CPos.New(48,55) } +DzneCellTriggerActivator = { CPos.New(61,45), CPos.New(60,45), CPos.New(59,45), CPos.New(58,45), CPos.New(57,45), CPos.New(61,44), CPos.New(60,44), CPos.New(59,44), CPos.New(58,44), CPos.New(57,44), CPos.New(61,43), CPos.New(60,43), CPos.New(58,43), CPos.New(57,43), CPos.New(61,42), CPos.New(60,42), CPos.New(59,42), CPos.New(58,42), CPos.New(57,42), CPos.New(61,41), CPos.New(60,41), CPos.New(59,41), CPos.New(58,41), CPos.New(57,41) } +Win1CellTriggerActivator = { CPos.New(59,43) } +Win2CellTriggerActivator = { CPos.New(54,58), CPos.New(53,58), CPos.New(52,58), CPos.New(54,57), CPos.New(53,57), CPos.New(52,57), CPos.New(54,56), CPos.New(53,56), CPos.New(52,56), CPos.New(54,55), CPos.New(53,55), CPos.New(52,55) } + +Grd2ActorTriggerActivator = { Guard1, Guard2, Guard3 } +Atk1ActorTriggerActivator = { Atk1Activator1, Atk1Activator2 } +Atk2ActorTriggerActivator = { Atk2Activator1, Atk2Activator2 } +Chn1ActorTriggerActivator = { Chn1Activator1, Chn1Activator2, Chn1Activator3, Chn1Activator4, Chn1Activator5 } +Chn2ActorTriggerActivator = { Chn2Activator1, Chn2Activator2, Chn2Activator3 } +Obj2ActorTriggerActivator = { Chn1Activator1, Chn1Activator2, Chn1Activator3, Chn1Activator4, Chn1Activator5, Chn2Activator1, Chn2Activator2, Chn2Activator3, Atk3Activator } + +Chn1Waypoints = { ChnEnrty.Location, waypoint5.Location } +Chn2Waypoints = { ChnEnrty.Location, waypoint6.Location } +Gdi3Waypoints = { waypoint1, waypoint3, waypoint7, waypoint8, waypoint9 } +Gdi4Waypoints = { waypoint4, waypoint10, waypoint9, waypoint11, waypoint9, waypoint10 } +Gdi5Waypoints = { waypoint1, waypoint4 } +Gdi6Waypoints = { waypoint2, waypoints3 } + +Grd1TriggerFunctionTime = DateTime.Seconds(3) + +Grd1TriggerFunction = function() + MyActors = Utils.Take(2, GDI.GetActorsByType('mtnk')) + Utils.Do(MyActors, function(actor) + MovementAndHunt(actor, Gdi3Waypoints) + end) +end + +Grd2TriggerFunction = function() + if not Grd2Switch then + for type, count in pairs({ ['e1'] = 2, ['e2'] = 1, ['jeep'] = 1 }) do + MyActors = Utils.Take(count, GDI.GetActorsByType(type)) + Utils.Do(MyActors, function(actor) + MovementAndHunt(actor, Gdi4Waypoints) + end) + end + Grd2Swicth = true + end +end + +Atk1TriggerFunction = function() + if not Atk1Switch then + for type, count in pairs({ ['e1'] = 3, ['e2'] = 3, ['jeep'] = 1 }) do + MyActors = Utils.Take(count, GDI.GetActorsByType(type)) + Utils.Do(MyActors, function(actor) + MovementAndHunt(actor, Gdi5Waypoints) + end) + end + Atk1Switch = true + end +end + +Atk2TriggerFunction = function() + if not Atk2Switch then + for type, count in pairs({ ['mtnk'] = 1, ['jeep'] = 1 }) do + MyActors = Utils.Take(count, GDI.GetActorsByType(type)) + Utils.Do(MyActors, function(actor) + MovementAndHunt(actor, Gdi6Waypoints) + end) + end + Atk2Switch = true + end +end + +Atk3TriggerFunction = function() + if not Atk3Switch then + Atk3Switch = true + if not Radar.IsDead then + local targets = Nod.GetGroundAttackers() + local target = targets[DateTime.GameTime % #targets + 1].CenterPosition + + if target then + Radar.SendAirstrike(target, false, 256 - 28) + end + end + end +end + +Chn1TriggerFunction = function() + local cargo = Reinforcements.ReinforceWithTransport(GDI, 'tran', Chn1Units, Chn1Waypoints, { waypoint14.Location })[2] + Utils.Do(cargo, function(actor) + IdleHunt(actor) + end) +end + +Chn2TriggerFunction = function() + local cargo = Reinforcements.ReinforceWithTransport(GDI, 'tran', Chn2Units, Chn2Waypoints, { waypoint14.Location })[2] + Utils.Do(cargo, function(actor) + IdleHunt(actor) + end) +end + +Obj2TriggerFunction = function() + Nod.MarkCompletedObjective(NodObjective2) + Reinforcements.Reinforce(Nod, Obj2Units, { Obj2UnitsEntry.Location, waypoint13.Location }, 15) +end + +MovementAndHunt = function(unit, waypoints) + if unit ~= nil then + Utils.Do(waypoints, function(waypoint) + unit.AttackMove(waypoint.Location) + end) + IdleHunt(unit) + end +end + +InsertNodUnits = function() + Camera.Position = UnitsRallyRight.CenterPosition + + Reinforcements.Reinforce(Nod, NodStartUnitsLeft, { UnitsEntryLeft.Location, UnitsRallyLeft.Location }, 15) + Reinforcements.Reinforce(Nod, NodStartUnitsRight, { UnitsEntryRight.Location, UnitsRallyRight.Location }, 15) +end + +WorldLoaded = function() + GDI = Player.GetPlayer("GDI") + Nod = Player.GetPlayer("Nod") + + Trigger.OnObjectiveAdded(Nod, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") + end) + + Trigger.OnObjectiveCompleted(Nod, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") + end) + + Trigger.OnObjectiveFailed(Nod, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") + end) + + Trigger.OnPlayerWon(Nod, function() + Media.PlaySpeechNotification(Nod, "Win") + end) + + Trigger.OnPlayerLost(Nod, function() + Media.PlaySpeechNotification(Nod, "Lose") + end) + + NodObjective1 = Nod.AddPrimaryObjective("Steal the GDI nuclear detonator") + NodObjective2 = Nod.AddSecondaryObjective("Destroy the houses of the GDI supporter \nin the village") + + GDIObjective = GDI.AddPrimaryObjective("Stop the Nod taskforce from escaping with the detonator") + + InsertNodUnits() + + Trigger.AfterDelay(Grd1TriggerFunctionTime, Grd1TriggerFunction) + + Utils.Do(Grd2ActorTriggerActivator, function(actor) + Trigger.OnDiscovered(actor, Grd2TriggerFunction) + end) + + OnAnyDamaged(Atk1ActorTriggerActivator, Atk1TriggerFunction) + + OnAnyDamaged(Atk2ActorTriggerActivator, Atk2TriggerFunction) + + Trigger.OnDamaged(Atk3Activator, Atk3TriggerFunction) + + Trigger.OnAllKilled(Chn1ActorTriggerActivator, Chn1TriggerFunction) + + Trigger.OnAllKilled(Chn2ActorTriggerActivator, Chn2TriggerFunction) + + Trigger.OnEnteredFootprint(Chn3CellTriggerActivator, function(a, id) + if a.Owner == Nod then + Reinforcements.Reinforce(Nod, { 'tran' }, { ChnEnrty.Location, waypoint17.Location }, 11) + Trigger.RemoveFootprintTrigger(id) + end + end) + + Trigger.OnEnteredFootprint(DzneCellTriggerActivator, function(a, id) + if a.Owner == Nod then + Actor.Create('flare', true, { Owner = Nod, Location = waypoint17.Location }) + Trigger.RemoveFootprintTrigger(id) + end + end) + + Trigger.OnAllRemovedFromWorld(Obj2ActorTriggerActivator, Obj2TriggerFunction) + + Trigger.OnEnteredFootprint(Win1CellTriggerActivator, function(a, id) + if a.Owner == Nod then + NodObjective3 = Nod.AddPrimaryObjective("Move to the evacuation point") + Nod.MarkCompletedObjective(NodObjective1) + Trigger.RemoveFootprintTrigger(id) + end + end) + + Trigger.OnEnteredFootprint(Win2CellTriggerActivator, function(a, id) + if a.Owner == Nod then + Nod.MarkCompletedObjective(NodObjective3) + Trigger.RemoveFootprintTrigger(id) + end + end) +end + +Tick = function() + if DateTime.GameTime > 2 and Nod.HasNoRequiredUnits() then + GDI.MarkCompletedObjective(GDIObjective) + end +end + +IdleHunt = function(unit) + if not unit.IsDead then + Trigger.OnIdle(unit, unit.Hunt) + end +end + +OnAnyDamaged = function(actors, func) + Utils.Do(actors, function(actor) + Trigger.OnDamaged(actor, func) + end) +end diff --git a/mods/cnc/missions.yaml b/mods/cnc/missions.yaml index d9fe71c965..b788cae5e0 100644 --- a/mods/cnc/missions.yaml +++ b/mods/cnc/missions.yaml @@ -17,6 +17,8 @@ Nod Campaign: ./mods/cnc/maps/nod04a ./mods/cnc/maps/nod04b ./mods/cnc/maps/nod05 + ./mods/cnc/maps/nod06a Funpark Campaign: ./mods/cnc/maps/funpark01 + diff --git a/mods/cnc/rules/misc.yaml b/mods/cnc/rules/misc.yaml index f6f7af2ae7..550502b179 100644 --- a/mods/cnc/rules/misc.yaml +++ b/mods/cnc/rules/misc.yaml @@ -67,4 +67,17 @@ CAMERA.small: RevealsShroud: Range: 6c0 BodyOrientation: - + +FLARE: + Immobile: + OccupiesSpace: false + RevealsShroud: + Range: 3c0 + RenderSprites: + Image: smokland + WithSpriteBody: + StartSequence: open + HiddenUnderFog: + Tooltip: + Name: Flare + BodyOrientation: diff --git a/mods/cnc/sequences/misc.yaml b/mods/cnc/sequences/misc.yaml index 28824e8f8b..12dcb6d553 100644 --- a/mods/cnc/sequences/misc.yaml +++ b/mods/cnc/sequences/misc.yaml @@ -384,3 +384,14 @@ craters: cr4: cr4 cr5: cr5 cr6: cr6 + +smokland: + open: + Length: 60 + Tick: 120 + ZOffset: 1023 + idle: + Start: 60 + Length: 32 + Tick: 120 + ZOffset: 1023 \ No newline at end of file